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