org.jboss.soa.esb.actions.soap
Class MBeanSoapUIInvoker

java.lang.Object
  extended by org.jboss.soa.esb.actions.soap.MBeanSoapUIInvoker
All Implemented Interfaces:
SoapUIInvoker

public class MBeanSoapUIInvoker
extends java.lang.Object
implements SoapUIInvoker

Invoker the soapui-client Service.

Author:
tom.fennelly@jboss.com

Constructor Summary
MBeanSoapUIInvoker()
           
 
Method Summary
 java.lang.String buildFault(java.lang.String wsdl, java.lang.String operation, java.lang.String wServiceName, java.lang.String faultName, java.util.Map params, java.util.Properties httpClientProps, java.lang.String smooksResource, java.lang.String soapNs)
           
 java.lang.String buildRequest(java.lang.String wsdl, java.lang.String operation, java.lang.String wServiceName, java.util.Map params, java.util.Properties httpClientProps, java.lang.String smooksResource, java.lang.String soapNs)
          Build a SOAP request for the specified operation on the specified WSDL.
 java.lang.String buildResponse(java.lang.String wsdl, java.lang.String operation, java.lang.String wServiceName, java.util.Map params, java.util.Properties httpClientProps, java.lang.String smooksResource, java.lang.String soapNs)
          Build a SOAP response for the specified operation on the specified WSDL.
 java.lang.String getContentType(java.lang.String wsdl, java.lang.String wServiceName, java.util.Properties httpClientProps)
          Get the Content Type for the appropriate SOAP version of the 1st interface from the specified WSDL.
 java.lang.String getEndpoint(java.lang.String wsdl, java.lang.String wServiceName, java.util.Properties httpClientProps)
          Get the 1st endpoint from the specified WSDL.
 java.lang.String mergeResponseTemplate(java.lang.String wsdl, java.lang.String operation, java.lang.String wServiceName, java.lang.String response, java.util.Properties httpClientProps, java.lang.String smooksResource, java.lang.String soapNs)
          Merge a SOAP response for the specified operation on the specified WSDL with its template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBeanSoapUIInvoker

public MBeanSoapUIInvoker()
Method Detail

buildRequest

public java.lang.String buildRequest(java.lang.String wsdl,
                                     java.lang.String operation,
                                     java.lang.String wServiceName,
                                     java.util.Map params,
                                     java.util.Properties httpClientProps,
                                     java.lang.String smooksResource,
                                     java.lang.String soapNs)
                              throws java.io.IOException,
                                     java.lang.UnsupportedOperationException,
                                     org.xml.sax.SAXException
Build a SOAP request for the specified operation on the specified WSDL.

Specified by:
buildRequest in interface SoapUIInvoker
Parameters:
wsdl - WSDL URL.
operation - Operation name.
params - Message parameter map.
httpClientProps - HttpClient creation properties.
smooksResource - Smooks transformation configuration resource file. Null if no transformations are to be performed on the SOAP message before serializing it for return.
soapNs - the SOAP namespace. If null one of the defaults will be used: http://schemas.xmlsoap.org/soap/envelope/ http://www.w3.org/2003/05/soap-envelope
Returns:
The SOAP Message.
Throws:
java.io.IOException - Failed to load WSDL.
java.lang.UnsupportedOperationException - Operation not supported on specified WSDL.
org.xml.sax.SAXException - Failed to parse the SOAP UI generated request message.

buildResponse

public java.lang.String buildResponse(java.lang.String wsdl,
                                      java.lang.String operation,
                                      java.lang.String wServiceName,
                                      java.util.Map params,
                                      java.util.Properties httpClientProps,
                                      java.lang.String smooksResource,
                                      java.lang.String soapNs)
                               throws java.io.IOException,
                                      java.lang.UnsupportedOperationException,
                                      org.xml.sax.SAXException
Build a SOAP response for the specified operation on the specified WSDL.

Specified by:
buildResponse in interface SoapUIInvoker
Parameters:
wsdl - WSDL URL.
operation - Operation name.
params - Message parameter map.
httpClientProps - HttpClient creation properties.
smooksResource - Smooks transformation configuration resource file. Null if no transformations are to be performed on the SOAP message before serializing it for return.
soapNs - the SOAP namespace. If null one of the defaults will be used: http://schemas.xmlsoap.org/soap/envelope/ http://www.w3.org/2003/05/soap-envelope
Returns:
The SOAP Message.
Throws:
java.io.IOException - Failed to load WSDL.
java.lang.UnsupportedOperationException - Operation not supported on specified WSDL.
org.xml.sax.SAXException - Failed to parse the SOAP UI generated request message.

buildFault

public java.lang.String buildFault(java.lang.String wsdl,
                                   java.lang.String operation,
                                   java.lang.String wServiceName,
                                   java.lang.String faultName,
                                   java.util.Map params,
                                   java.util.Properties httpClientProps,
                                   java.lang.String smooksResource,
                                   java.lang.String soapNs)
                            throws java.io.IOException,
                                   java.lang.UnsupportedOperationException,
                                   org.xml.sax.SAXException
Specified by:
buildFault in interface SoapUIInvoker
Throws:
java.io.IOException
java.lang.UnsupportedOperationException
org.xml.sax.SAXException

getEndpoint

public java.lang.String getEndpoint(java.lang.String wsdl,
                                    java.lang.String wServiceName,
                                    java.util.Properties httpClientProps)
                             throws java.io.IOException
Get the 1st endpoint from the specified WSDL.

Specified by:
getEndpoint in interface SoapUIInvoker
Parameters:
wsdl - WSDL URL.
httpClientProps - HttpClient creation properties.
Returns:
The operation endpoint URL.
Throws:
java.io.IOException - Failed to load WSDL.

getContentType

public java.lang.String getContentType(java.lang.String wsdl,
                                       java.lang.String wServiceName,
                                       java.util.Properties httpClientProps)
                                throws java.io.IOException
Get the Content Type for the appropriate SOAP version of the 1st interface from the specified WSDL.

Specified by:
getContentType in interface SoapUIInvoker
Parameters:
wsdl - WSDL URL.
httpClientProps - HttpClient creation properties.
Returns:
The operation endpoint URL.
Throws:
java.io.IOException - Failed to load WSDL.

mergeResponseTemplate

public java.lang.String mergeResponseTemplate(java.lang.String wsdl,
                                              java.lang.String operation,
                                              java.lang.String wServiceName,
                                              java.lang.String response,
                                              java.util.Properties httpClientProps,
                                              java.lang.String smooksResource,
                                              java.lang.String soapNs)
                                       throws java.io.IOException,
                                              java.lang.UnsupportedOperationException,
                                              org.xml.sax.SAXException
Merge a SOAP response for the specified operation on the specified WSDL with its template.

Specified by:
mergeResponseTemplate in interface SoapUIInvoker
Parameters:
wsdl - WSDL URL.
operation - Operation name.
response - The actual response.
httpClientProps - HttpClient creation properties.
smooksResource - Smooks transformation configuration resource file. Null if no transformations are to be performed on the SOAP message before serializing it for return.
soapNs - the SOAP namespace. If null one of the defaults will be used: http://schemas.xmlsoap.org/soap/envelope/ http://www.w3.org/2003/05/soap-envelope
Returns:
The SOAP Message.
Throws:
java.io.IOException - Failed to load WSDL.
java.lang.UnsupportedOperationException - Operation not supported on specified WSDL.
org.xml.sax.SAXException - Failed to parse the SOAP UI generated request message.