RE: Can't use JAX-WS + SOAP 1.2 ?
Martin Gainty <[email protected]>
| Newsgroups | gmane.text.xml.axis.user |
|---|---|
| Message-ID | <[email protected]> |
From: [email protected] Date: Thu, 16 Jun 2016 13:37:23 +0000 Subject: Re: Can't use JAX-WS + SOAP 1.2 ? To: [email protected] Thank you for your reply! I changed these parameters to like the below in axis2.xml, but got the same result... Any idea? ``` <parameter name="disableREST" locked="true">true</parameter> <!-- false to true --> <parameter name="disableSOAP12" locked="true">false</parameter> <parameter name="disableSOAP11" locked="true">true</parameter> <!-- added --> ``` On Thu, Jun 16, 2016 at 9:33 PM Martin Gainty <[email protected]> wrote: From: [email protected] Date: Thu, 16 Jun 2016 10:09:07 +0000 Subject: Can't use JAX-WS + SOAP 1.2 ? To: [email protected] Hi, I'm new to here. I think Axis2 supports JAX-WS + SOAP 1.2, but apparently the generated wsdl accessing 'http://some-domain/path/to/<servicename>?wsdl' is always treated as SOAP 1.1 though the service class added @BindingType(SOAPBinding.SOAP12HTTP_BINDING). the related code is here: https://github.com/apache/axis2-java/blob/v1.7.3/modules/metadata/src/org/apache/axis2/jaxws/description/builder/JAXWSRIWSDLGenerator.java#L389 And I've created a simple reproducer. Am I missing something? https://github.com/emag/axis2-jaxws-soap12-demo MG>your client code: public class Client { public String invokeSayHello(String text) { HelloWorld_Service service = new HelloWorld_Service(); MG>create a valid JAX-WS service using YOUR parameters populated into QName MG>javax.xml.ws.Service service = Service.create(new QName( "http://org/apache/axis2/jaxws/test/OMELEMENT", "OMElementService")); MG>programatically add SOAP1.2 port using SOAP12HTTP_BINDING parms to your JAXWS service: MG>service.addPort( new QName( "http://org/apache/axis2/jaxws/test/OMELEMENT", "OMElementPort"), javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING,"http://localhost:6060/axis2/services/OMElementProviderService.OMElementProviderPort");//tweak above port parameter to YOUR PORT //grab all the configured ports and print them out MG>java.util.Iterator<javax.xml.namespace.QName> ports = service.getPorts(); MG>while(ports.hasNext()) { MG> javax.xml.namespace.QName QNamePort port=(javax.xml.namespace.QName)ports.next(); MG> log.debug("port namespaceURI="+port.getNamespaceURI()); MG> log.debug("port localPart="+port.getLocalPart()); MG> log.debug(" port prefix="+port.getPrefix()); MG> } HelloWorld stub = service.getHelloWorldPort(); //service was not respecting SOAP12HTTP_BINDING return stub.sayHello(text); } } MG>reference org.apache.axis2.jaxws.dispatch.OMElementDispatchTest MG>do you see SOAP12_HTTP_BINDING Port?