1
2
3
4
5
6
7 package org.mule.module.cxf.component;
8
9 import org.mule.api.lifecycle.InitialisationException;
10 import org.mule.component.AbstractComponent;
11 import org.mule.config.i18n.CoreMessages;
12
13 import org.apache.commons.logging.Log;
14 import org.apache.commons.logging.LogFactory;
15
16 public abstract class AbstractWebServiceWrapperComponent extends AbstractComponent
17 {
18 protected transient Log logger = LogFactory.getLog(getClass());
19
20 public static final String WS_SERVICE_URL = "ws.service.url";
21
22 protected String address;
23 protected boolean addressFromMessage = false;
24
25 protected void doInitialise() throws InitialisationException
26 {
27 if (address == null && !addressFromMessage)
28 {
29 throw new InitialisationException(CoreMessages.objectIsNull("webServiceUrl"), this);
30 }
31 }
32
33 public String getAddress()
34 {
35 return address;
36 }
37
38 public void setAddress(String address)
39 {
40 this.address = address;
41 }
42
43 public boolean isAddressFromMessage()
44 {
45 return addressFromMessage;
46 }
47
48 public void setAddressFromMessage(boolean addressFromMessage)
49 {
50 this.addressFromMessage = addressFromMessage;
51 }
52
53 }