View Javadoc

1   /*
2    * $Id: AbstractWebServiceWrapperComponent.java 12230 2008-07-03 03:43:26Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
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  }