Last Modified: 11/7/2005
Dispatch
client please refer to the Dispatch
documents.<?xml version="1.0" encoding="UTF-8"?>JAXWS 2.0 generates WSDL on the fly when requested by a client. If this binding attribute is present and is equal to SOAP 1.2 HTTP binding WSDL with SOAP 1.2 binding is generated. Based on this binding descriptor jaxws runtime configures itself to handle SOAP 1.2 messages.
<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>
<endpoint
name='fromjava-soap12'
implementation='fromjava_soap12.server.AddNumbersImpl'
binding="http://www.w3.org/2003/05/soap/bindings/HTTP/"
url-pattern='/addnumbers'/>
</endpoints>
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 178
SOAPAction: ""
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<addNumbers xmlns="http://duke.org">
<arg0>10</arg0>
<arg1>20</arg1>
</addNumbers >
</soapenv:Body>
</soapenv:Envelope>
A SOAP 1.2 Fault message generated by JAXWS:
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 476
SOAPAction: ""
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<soapenv:Fault>
<soapenv:Code>
<soapenv:Value>soapenv:Sender</soapenv:Value>
</soapenv:Code>
<soapenv:Reason>
<soapenv:Text xml:lang="en">Negative number cant be added!</soapenv:Text>
</soapenv:Reason>
<soapenv:Detail>
<AddNumbersFault xmlns="http://duke.org">
<faultInfo>Numbers: -10, 20</faultInfo>
<message>Negative number cant be added!</message>
</AddNumbersFault >
</soapenv:Detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>