org.apache.ode.axis2.util

## Class SoapMessageConverter

- java.lang.Object
- - org.apache.ode.axis2.util.SoapMessageConverter

-     public class SoapMessageConverter
      extends java.lang.Object

  SOAP/ODE Message converter. Uses WSDL binding information to convert the protocol-neutral ODE representation into a SOAP representation and vice versa.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SoapMessageConverter(javax.wsdl.Definition def, javax.xml.namespace.QName serviceName, java.lang.String portName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createSoapBody(org.apache.axiom.soap.SOAPBody sb, javax.wsdl.extensions.soap.SOAPBody soapBody, javax.wsdl.Message msgDef, org.w3c.dom.Element message, java.lang.String rpcWrapper)`
    `org.apache.axiom.soap.SOAPFault` | `createSoapFault(org.w3c.dom.Element message, javax.xml.namespace.QName faultName, javax.wsdl.Operation op)`
    `void` | `createSoapHeaders(org.apache.axiom.soap.SOAPEnvelope soapEnv, java.util.List<javax.wsdl.extensions.soap.SOAPHeader> headerDefs, javax.wsdl.Message msgdef, java.util.Map<java.lang.String,org.w3c.dom.Node> headers)`
    `void` | `createSoapRequest(org.apache.axis2.context.MessageContext msgCtx, Message message, javax.wsdl.Operation op)`
    `void` | `createSoapResponse(org.apache.axis2.context.MessageContext msgCtx, Message message, javax.wsdl.Operation op)`
    `void` | `extractSoapBodyParts(Message message, org.apache.axiom.soap.SOAPBody soapBody, javax.wsdl.extensions.soap.SOAPBody bodyDef, javax.wsdl.Message msg, java.lang.String rpcWrapper)`
    `void` | `extractSoapHeaderParts(Message message, org.apache.axiom.soap.SOAPHeader soapHeader, java.util.List<javax.wsdl.extensions.soap.SOAPHeader> headerDefs, javax.wsdl.Message msg)`
    `static <T> T` | `getFirstExtensibilityElement(javax.wsdl.extensions.ElementExtensible parent, java.lang.Class<T> cls)`
    `java.lang.String` | `getSoapAction(java.lang.String operation)` Attempts to extract the SOAP Action is defined in the WSDL document.
    `static javax.wsdl.extensions.soap.SOAPBody` | `getSOAPBody(javax.wsdl.extensions.ElementExtensible ee)`
    `static java.util.List<javax.wsdl.extensions.soap.SOAPHeader>` | `getSOAPHeaders(javax.wsdl.extensions.ElementExtensible eee)`
    `java.lang.String` | `getWSAInputAction(java.lang.String operation)` Attempts to extract the WS-Addressing "Action" attribute value from the operation definition.
    `javax.wsdl.Fault` | `parseSoapFault(org.w3c.dom.Element odeMsgEl, org.apache.axiom.soap.SOAPEnvelope envelope, javax.wsdl.Operation operation)`
    `void` | `parseSoapRequest(Message odeMessage, org.apache.axiom.soap.SOAPEnvelope envelope, javax.wsdl.Operation op)`
    `void` | `parseSoapResponse(Message odeMessage, org.apache.axiom.soap.SOAPEnvelope envelope, javax.wsdl.Operation op)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SoapMessageConverter

          public SoapMessageConverter(javax.wsdl.Definition def,
                              javax.xml.namespace.QName serviceName,
                              java.lang.String portName)
                               throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

  - ### Method Detail

    - #### createSoapRequest

          public void createSoapRequest(org.apache.axis2.context.MessageContext msgCtx,
                               Message message,
                               javax.wsdl.Operation op)
                                 throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### createSoapResponse

          public void createSoapResponse(org.apache.axis2.context.MessageContext msgCtx,
                                Message message,
                                javax.wsdl.Operation op)
                                  throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### createSoapHeaders

          public void createSoapHeaders(org.apache.axiom.soap.SOAPEnvelope soapEnv,
                               java.util.List<javax.wsdl.extensions.soap.SOAPHeader> headerDefs,
                               javax.wsdl.Message msgdef,
                               java.util.Map<java.lang.String,org.w3c.dom.Node> headers)
                                 throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### createSoapFault

          public org.apache.axiom.soap.SOAPFault createSoapFault(org.w3c.dom.Element message,
                                                        javax.xml.namespace.QName faultName,
                                                        javax.wsdl.Operation op)
                                                          throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### parseSoapRequest

          public void parseSoapRequest(Message odeMessage,
                              org.apache.axiom.soap.SOAPEnvelope envelope,
                              javax.wsdl.Operation op)
                                throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### parseSoapResponse

          public void parseSoapResponse(Message odeMessage,
                               org.apache.axiom.soap.SOAPEnvelope envelope,
                               javax.wsdl.Operation op)
                                 throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### createSoapBody

          public void createSoapBody(org.apache.axiom.soap.SOAPBody sb,
                            javax.wsdl.extensions.soap.SOAPBody soapBody,
                            javax.wsdl.Message msgDef,
                            org.w3c.dom.Element message,
                            java.lang.String rpcWrapper)
                              throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### extractSoapBodyParts

          public void extractSoapBodyParts(Message message,
                                  org.apache.axiom.soap.SOAPBody soapBody,
                                  javax.wsdl.extensions.soap.SOAPBody bodyDef,
                                  javax.wsdl.Message msg,
                                  java.lang.String rpcWrapper)
                                    throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### extractSoapHeaderParts

          public void extractSoapHeaderParts(Message message,
                                    org.apache.axiom.soap.SOAPHeader soapHeader,
                                    java.util.List<javax.wsdl.extensions.soap.SOAPHeader> headerDefs,
                                    javax.wsdl.Message msg)
                                      throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### getSOAPBody

          public static javax.wsdl.extensions.soap.SOAPBody getSOAPBody(javax.wsdl.extensions.ElementExtensible ee)

    - #### getSOAPHeaders

          public static java.util.List<javax.wsdl.extensions.soap.SOAPHeader> getSOAPHeaders(javax.wsdl.extensions.ElementExtensible eee)

    - #### getFirstExtensibilityElement

          public static <T> T getFirstExtensibilityElement(javax.wsdl.extensions.ElementExtensible parent,
                                           java.lang.Class<T> cls)

    - #### getWSAInputAction

          public java.lang.String getWSAInputAction(java.lang.String operation)

      Attempts to extract the WS-Addressing "Action" attribute value from the operation definition. When WS-Addressing is being used by a service provider, the "Action" is specified in the portType->operation instead of the SOAP binding->operation.
      Parameters:
        `operation` - The name of the operation to extract the SOAP Action from
      Returns:
        the SOAPAction value if one is specified, otherwise empty string

    - #### getSoapAction

          public java.lang.String getSoapAction(java.lang.String operation)

      Attempts to extract the SOAP Action is defined in the WSDL document.
      Parameters:
        `operation` - The name of the operation to extract the SOAP Action from
      Returns:
        the SOAPAction value if one is specified, otherwise empty string

    - #### parseSoapFault

          public javax.wsdl.Fault parseSoapFault(org.w3c.dom.Element odeMsgEl,
                                        org.apache.axiom.soap.SOAPEnvelope envelope,
                                        javax.wsdl.Operation operation)
                                          throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`