org.mule.module.cxf
Class WSProxyService
java.lang.Object
org.mule.module.cxf.WSProxyService
- All Implemented Interfaces:
- org.mule.api.lifecycle.Callable, org.mule.api.lifecycle.EventListener, org.mule.api.lifecycle.Initialisable, org.mule.api.service.ServiceAware
public class WSProxyService
- extends Object
- implements org.mule.api.lifecycle.Callable, org.mule.api.service.ServiceAware, org.mule.api.lifecycle.Initialisable
This class is implemented to act as a Proxy for a Web Service. It listens for
requests on the inbound endpoint and if it encounters the "WSDL" property in the
address, it will fetch the WSDL from the original web service and return it back.
In case the wsdlFile property is set, when the WSProxyService encounters a request
for the wsdl, instead of fetching the WSDL from the original web service, it will
return back the file expressed in the property. When a normal SOAP request is
encountered, it will forward the call to the web service with no modifications to
the SOAP message. The outbound router of this class must include the address of
the webservice to be proxied. No need to include the method name as a parameter in
the address, since it will be in the SOAP message as well. Furthermore a property
named uriWsdl can optionally be set which as the name suggests, indicate the URL
of the WSDL for the service. If this property is not set, the address of the WSDL
will be assumed to be the value of uriWebservice followed by "?WSDL". It is
important to note that both urls' of the webservice to be proxied and the WSDL
address must contain no cxf or axis endpoints, just plain http endpoints. Even
the inbound endpoint of the WSProxyService must be residing on an http protocol
(with no cxf or axis).
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
PHASE_NAME |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static transient Log logger
WSProxyService
public WSProxyService()
getWsdlEndpoint
public String getWsdlEndpoint()
- Returns:
- returns the url of the WSDL
setWsdlEndpoint
public void setWsdlEndpoint(String urlWsdl)
- Parameters:
urlWsdl - Sets the property urlWsdl (the url of the WSDL of the web
service)
getWsdlFile
public String getWsdlFile()
- Returns:
- returns the location of the local wsdl
setWsdlFile
public void setWsdlFile(String wsdlFile)
- Parameters:
wsdlFile - sets the location of the local wsdl file
onCall
public Object onCall(org.mule.api.MuleEventContext eventContext)
throws Exception
- Specified by:
onCall in interface org.mule.api.lifecycle.Callable
- Throws:
Exception
setService
public void setService(org.mule.api.service.Service service)
- Specified by:
setService in interface org.mule.api.service.ServiceAware
initialise
public void initialise()
throws org.mule.api.lifecycle.InitialisationException
- Specified by:
initialise in interface org.mule.api.lifecycle.Initialisable
- Throws:
org.mule.api.lifecycle.InitialisationException
Copyright © 2003-2011 MuleSoft, Inc.. All Rights Reserved.