1 Reply Latest reply on Nov 15, 2006 8:04 PM by Thomas Diesler

    SOAP 1.2 WSDL

    Zar Zar Tun Newbie

      Hi,

      I'm having problems building a web service using a WSDL with a SOAP 1.2 binding. (The WSDL is given at the bottom.) The web service works fine when using the SOAP 1.1 binding. Problems arise only when changing to SOAP 1.2. I'm using JBoss version 4.0.5.GA and generating code from WSDL using wstools. There are problems at both the client- and server- side.

      On the client-side, the code doesn't complain about the SOAP 1.2 WSDL, but sends the SOAP message using the SOAP 1.1 namespace.

      On the server-side, I get a NullPointerException when I deploy the web service war file. The stack trace is given below.

      Is there a SOAP 1.2 setting to turn on that I'm missing?

      Thanks,
      Zar



      =========================
      Server-side stack trace

      java.lang.NullPointerException
      at java.net.URI$Parser.parse(URI.java:3010)
      at java.net.URI.(URI.java:578)
      at org.jboss.ws.deployment.AbstractMetaDataBuilder.getUriScheme(Abstract
      MetaDataBuilder.java:277)
      at org.jboss.ws.deployment.AbstractMetaDataBuilder.replaceAddressLocatio
      n(AbstractMetaDataBuilder.java:166)
      at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR
      109ServerMetaDataBuilder.java:210)
      at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpoin
      tDeployer.java:78)
      at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInt
      erceptor.java:80)
      at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(Deployer
      InterceptorJSE.java:74)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
      create(SubDeployerInterceptorSupport.java:180)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
      ptor.java:91)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy39.create(Unknown Source)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:610)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:274)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:225)

      ===========================
      WSDL

      <?xml version="1.0"?>
      <definitions
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:tns="http://www.example.com/Example"
       xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
       targetNamespace="http://www.example.com/Example"
       name="Example"
       >
      
       <types>
       <xsd:schema
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       targetNamespace="http://www.example.com/Example"
       elementFormDefault="qualified"
       >
      
       <xsd:element name="Echo">
       <xsd:complexType>
       <xsd:sequence>
       <xsd:element name="value" type="xsd:string"
       minOccurs="1" maxOccurs="1"
       />
       </xsd:sequence>
       </xsd:complexType>
       </xsd:element>
      
       <xsd:element name="EchoResponse">
       <xsd:complexType>
       <xsd:sequence>
       <xsd:element name="result" type="xsd:string"
       minOccurs="1" maxOccurs="1"
       />
       </xsd:sequence>
       </xsd:complexType>
       </xsd:element>
      
       </xsd:schema>
       </types>
      
       <message name="EchoInMsg">
       <part name="echo" element="tns:Echo"/>
       </message>
      
       <message name="EchoOutMsg">
       <part name="echo" element="tns:EchoResponse"/>
       </message>
      
       <portType name="ExamplePort">
       <operation name="Echo">
       <input message="tns:EchoInMsg"/>
       <output message="tns:EchoOutMsg"/>
       </operation>
       </portType>
      
       <binding name="ExampleBinding" type="tns:ExamplePort">
       <soap:binding style="document"
       transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="Echo">
       <soap:operation style="document"
       soapAction="http://www.example.com/Example/Echo"/>
       <input>
       <soap:body use="literal"/>
       </input>
       <output>
       <soap:body use="literal"/>
       </output>
       </operation>
       </binding>
      
       <service name="ExampleService">
       <port name="ExamplePort" binding="tns:ExampleBinding">
       <soap:address location="http://REPLACE_WITH_ACTUAL_URL" />
       </port>
       </service>
      
      </definitions>