12 Replies Latest reply on Dec 21, 2006 11:28 AM by salex

    jbossws 1.0.4GA - wstools fail on a webervice

    croisfert

      with jbossws 1.0.3 bundled in jbossAS 1.0.5GA it work fine with jbossws 1.0.4GA it give me the error "org.jboss.ws.WSException: String passed i
      s null"



      this is the webservice:

      http://www.atomic-x.com/xmlservices/HyperlinkExtractor.asmx?wsdl

      this is my wstools-config.xml file:

       <wsdl-java location="http://www.atomic-x.com/xmlservices/HyperlinkExtractor.asmx?wsdl">
       <mapping file="jaxrpc-mapping.xml" />
       </wsdl-java>
      


      .....

      this is the error:
       [exec] .
       [exec] Exception in thread "main" org.jboss.ws.WSException: String passed i
      s null
       [exec] at org.jboss.ws.metadata.wsdl.WSDLUtils.firstLetterUpperCase(WSD
      LUtils.java:455)
       [exec] at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava
      .java:138)
       [exec] at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava
      .java:114)
       [exec] at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.j
      ava:658)
       [exec] at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.j
      ava:651)
       [exec] at org.jboss.ws.tools.WSDLToJava.unwrapResponse(WSDLToJava.java:
      291)
       [exec] at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:5
      40)
       [exec] at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:3
      42)
       [exec] at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:4
      86)
       [exec] at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:518)
       [exec] at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:161
      )
       [exec] at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGenera
      tion(ToolsHelper.java:303)
       [exec] at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
       [exec] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
       [exec] at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
       [exec] Result: 1
      



        • 1. Re: jbossws 1.0.4GA - wstools fail on a webervice
          thomas.diesler
          • 2. Re: jbossws 1.0.4GA - wstools fail on a webervice
            thomas.diesler

            Confirmed using

            <configuration
             xmlns="http://www.jboss.org/jbossws-tools"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
            
             <wsdl-java location="http://www.atomic-x.com/xmlservices/HyperlinkExtractor.asmx?wsdl">
             <mapping file="jaxrpc-mapping.xml"/>
             </wsdl-java>
            
            </configuration>
            


            • 3. Re: jbossws 1.0.4GA - wstools fail on a webervice
              thomas.diesler
              • 4. Re: jbossws 1.0.4GA - wstools fail on a webervice
                adeel

                I also get the same error when generating types from amazon web service at http://www.xmlme.com/WSAmazonBox.asmx?wsdl using jbossws-1.0.4

                Adeel

                • 5. Re: jbossws 1.0.4GA - wstools fail on a webervice
                  croisfert

                  same error at Wolfram Research: http://webservices.wolfram.com/services/SearchServices/WolframSearch2.wsdl

                  and (new) other error:

                  Exception in thread "main" org.jboss.ws.metadata.wsdl.WSDLException:
                  WSDLException (at /definitions/binding/operation[1]/input): faultCode=INVALID_WSDL: Element '{http://schemas.xmlsoap.org/wsdl/}input' contained unexpected attributes: 'message':

                  here:
                  http://www.ebob42.com/cgi-bin/Romulan.exe/wsdl/IRoman

                  • 6. WSTOOLS: WSException: String passed is null on jbossws 1.0.4
                    bocio

                    Same error on the WSDL below.
                    WSDL is generated by Axis 1.2.1 Given that soap encoding is not supported we tried with document/literal and wrapped but always with the same results...

                    The problem lies in a simple string[] description

                    Our WSDL:

                    <?xml version="1.0" encoding="UTF-8" ?>
                    - <wsdl:definitions targetNamespace="http://127.0.0.1/services/BaseWebAdapterWS"

                    xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://127.0.0.1/services/BaseWebAdapterWS" xmlns:intf="http://127.0.0.1/services/BaseWebAdapterWS" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                    - <!--
                    WSDL created by Apache Axis version: 1.2.1
                    Built on Jun 14, 2005 (09:15:57 EDT)
                    -->
                    - <wsdl:types>
                    - <schema elementFormDefault="qualified" targetNamespace="http://127.0.0.1/services/BaseWebAdapterWS" xmlns="http://www.w3.org/2001/XMLSchema">
                    - <element name="getProcessorInstancesReturn">
                    - <complexType>
                    - <sequence>
                    <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:string" />
                    </sequence>
                    </complexType>
                    </element>
                    </schema>
                    </wsdl:types>
                    <wsdl:message name="getProcessorInstancesRequest" />
                    - <wsdl:message name="getProcessorInstancesResponse">
                    <wsdl:part element="impl:getProcessorInstancesReturn" name="getProcessorInstancesReturn" />
                    </wsdl:message>
                    - <wsdl:portType name="BaseWebAdapter">
                    - <wsdl:operation name="getProcessorInstances">
                    <wsdl:input message="impl:getProcessorInstancesRequest" name="getProcessorInstancesRequest" />
                    <wsdl:output message="impl:getProcessorInstancesResponse" name="getProcessorInstancesResponse" />
                    </wsdl:operation>
                    </wsdl:portType>
                    - <wsdl:binding name="BaseWebAdapterWSSoapBinding" type="impl:BaseWebAdapter">
                    <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
                    - <wsdl:operation name="getProcessorInstances">
                    <wsdlsoap:operation soapAction="" />
                    - <wsdl:input name="getProcessorInstancesRequest">
                    <wsdlsoap:body use="literal" />
                    </wsdl:input>
                    - <wsdl:output name="getProcessorInstancesResponse">
                    <wsdlsoap:body use="literal" />
                    </wsdl:output>
                    </wsdl:operation>
                    </wsdl:binding>
                    - <wsdl:service name="BaseWebAdapterService">
                    - <wsdl:port binding="impl:BaseWebAdapterWSSoapBinding" name="BaseWebAdapterWS">
                    <wsdlsoap:address location="http://127.0.0.1/services/BaseWebAdapterWS" />
                    </wsdl:port>
                    </wsdl:service>
                    </wsdl:definitions>


                    • 7. Re: jbossws 1.0.4GA - wstools fail on a webervice
                      klease

                      It looks like this is the same error reported earlier (http://jira.jboss.org/jira/browse/JBWS-1260), but that was only occurring on wsdl-java when the unwrap=true attribute was used.
                      It appears from the new stack trace that wsdl-java is using unwrap even when it is NOT specified.

                      • 8. Re: jbossws 1.0.4GA - wstools fail on a webervice
                        ste

                        Using an AXIS2 WSDL I fall in a slight variation the error:

                        17:29:35,379 WARN [WSDL11Reader] Unprocessed extension element: {http://schemas.xmlsoap.org/wsdl/http/}address


                        Exception in thread "main" org.jboss.ws.WSException: String passed is null
                         at org.jboss.ws.metadata.wsdl.WSDLUtils.firstLetterUpperCase(WSDLUtils.java:455)
                         at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:138)
                         at org.jboss.ws.tools.XSDTypeToJava.createJavaFile(XSDTypeToJava.java:114)
                         at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:658)
                         at org.jboss.ws.tools.WSDLToJava.generateJavaSource(WSDLToJava.java:651)
                         at org.jboss.ws.tools.WSDLToJava.unwrapResponse(WSDLToJava.java:291)
                         at org.jboss.ws.tools.WSDLToJava.getReturnType(WSDLToJava.java:540)
                         at org.jboss.ws.tools.WSDLToJava.appendMethods(WSDLToJava.java:342)
                         at org.jboss.ws.tools.WSDLToJava.createSEIFile(WSDLToJava.java:486)
                         at org.jboss.ws.tools.WSDLToJava.createSEI(WSDLToJava.java:518)
                         at org.jboss.ws.tools.WSDLToJava.generateSEI(WSDLToJava.java:161)
                         at org.jboss.ws.tools.helpers.ToolsHelper.handleWSDLToJavaGeneration(ToolsHelper.java:303)
                         at org.jboss.ws.tools.WSTools.process(WSTools.java:138)
                         at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
                         at org.jboss.ws.tools.WSTools.main(WSTools.java:61)


                        with this WSDL:

                        <wsdl:definitions xmlns:axis2="http://axisversion.sample" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://axisversion.sample/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://axisversion.sample">
                        <wsdl:documentation>Version</wsdl:documentation>
                        - <wsdl:types>
                        - <xs:schema xmlns:ns="http://axisversion.sample/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://axisversion.sample/xsd">
                        - <xs:element name="getVersionFault">
                        - <xs:complexType>
                        - <xs:sequence>
                        <xs:element name="getVersionFault" type="xs:anyType" />
                        </xs:sequence>
                        </xs:complexType>
                        </xs:element>
                        - <xs:element name="getVersionResponse">
                        - <xs:complexType>
                        - <xs:sequence>
                        <xs:element name="return" nillable="true" type="xs:string" />
                        </xs:sequence>
                        </xs:complexType>
                        </xs:element>
                        </xs:schema>
                        </wsdl:types>
                        <wsdl:message name="getVersionMessage" />
                        - <wsdl:message name="getVersionResponse">
                        <wsdl:part name="part1" element="ns0:getVersionResponse" />
                        </wsdl:message>
                        - <wsdl:message name="getVersionFault">
                        <wsdl:part name="part1" element="ns0:getVersionFault" />
                        </wsdl:message>
                        - <wsdl:portType name="VersionPortType">
                        - <wsdl:operation name="getVersion">
                        <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:getVersionMessage" wsaw:Action="urn:getVersion" />
                        <wsdl:output message="axis2:getVersionResponse" />
                        <wsdl:fault message="axis2:getVersionFault" name="getVersionFault" />
                        </wsdl:operation>
                        </wsdl:portType>
                        - <wsdl:binding name="VersionSOAP11Binding" type="axis2:VersionPortType">
                        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
                        - <wsdl:operation name="getVersion">
                        <soap:operation soapAction="urn:getVersion" style="document" />
                        - <wsdl:input>
                        <soap:body use="literal" />
                        </wsdl:input>
                        - <wsdl:output>
                        <soap:body use="literal" />
                        </wsdl:output>
                        - <wsdl:fault name="getVersionFault">
                        <soap:body use="literal" />
                        </wsdl:fault>
                        </wsdl:operation>
                        </wsdl:binding>
                        - <wsdl:binding name="VersionSOAP12Binding" type="axis2:VersionPortType">
                        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
                        - <wsdl:operation name="getVersion">
                        <soap12:operation soapAction="urn:getVersion" style="document" />
                        - <wsdl:input>
                        <soap12:body use="literal" />
                        </wsdl:input>
                        - <wsdl:output>
                        <soap12:body use="literal" />
                        </wsdl:output>
                        - <wsdl:fault name="getVersionFault">
                        <soap12:fault use="literal" name="getVersionFault" />
                        </wsdl:fault>
                        </wsdl:operation>
                        </wsdl:binding>
                        - <wsdl:binding name="VersionHttpBinding" type="axis2:VersionPortType">
                        <http:binding verb="POST" />
                        - <wsdl:operation name="getVersion">
                        <http:operation location="getVersion" />
                        - <wsdl:input>
                        <mime:content type="text/xml" />
                        </wsdl:input>
                        - <wsdl:output>
                        <mime:content type="text/xml" />
                        </wsdl:output>
                        </wsdl:operation>
                        </wsdl:binding>
                        - <wsdl:service name="Version">
                        - <wsdl:port name="VersionSOAP11port_http" binding="axis2:VersionSOAP11Binding">
                        <soap:address location="http://127.0.0.1:8080/axis2/services/Version" />
                        </wsdl:port>
                        - <wsdl:port name="VersionSOAP12port_http" binding="axis2:VersionSOAP12Binding">
                        <soap12:address location="http://127.0.0.1:8080/axis2/services/Version" />
                        </wsdl:port>
                        - <wsdl:port name="VersionHttpport1" binding="axis2:VersionHttpBinding">
                        <http:address location="http://127.0.0.1:8080/axis2/rest/Version" />
                        </wsdl:port>
                        </wsdl:service>
                        </wsdl:definitions>


                        • 9. Re: jbossws 1.0.4GA - wstools fail on a webervice
                          bocio

                          We are still stuck into this.
                          It's a new project so we tried to write the server with different vendors.

                          AFAIK for WS which returns arrays JBossWS seems to be able to generate a client only for WSDL generated from a JBossWS stack.

                          Comparing different WSDL, I saw that when array comes in, other vendors generates the WSDL in this way:

                          <s:complexType>


                          while JBossWS:

                          <complexType name="String.Array">


                          So the WSTOOLS complain about the
                          String passed is null


                          When do you foresee a new version?


                          • 10. Re: jbossws 1.0.4GA - wstools fail on a webervice
                            dlofthouse

                            The reason this is suddenly apeared for JBossWS 1.0.4.GA is because we now unwrap the parameters by default.

                            While we are working on this you can workaround the problem by setting the parameter-style to 'bare' e.g.

                            <wsdl-java location="SomeWSDL.wsdl" parameter-style="bare">


                            • 11. Re: jbossws 1.0.4GA - wstools fail on a webervice
                              ste

                               

                              "darran.lofthouse@jboss.com" wrote:
                              The reason this is suddenly apeared for JBossWS 1.0.4.GA is because we now unwrap the parameters by default.

                              While we are working on this you can workaround the problem by setting the parameter-style to 'bare' e.g.

                              <wsdl-java location="SomeWSDL.wsdl" parameter-style="bare">


                              With the same WSDL as before I was able to generate the client but when I invoke the web service I get this exception:

                              16:13:18,323 DEBUG [CommandFactory] Command called: it.sogei.testweb.web.command.TestCommand
                              16:13:18,383 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,383 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,393 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,393 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,393 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,393 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,403 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,403 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,413 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,413 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,413 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,413 WARN [WSDLDefinitions] Multiple WSDL bindings referrence the same interface: {http://neo.sogei.com}BaseWebAdapterPortType
                              16:13:18,504 WARN [ServiceMetaData] Multiple possible endpoints implementing SEI: com.sogei.neo.BaseWebAdapter_PortType
                              16:13:18,504 WARN [ServiceMetaData] Multiple possible endpoints implementing SEI: com.sogei.neo.BaseWebAdapter_PortType
                              16:13:18,504 ERROR [ServiceProxy] Service error
                              javax.xml.rpc.ServiceException: Cannot create proxy
                               at org.jboss.ws.jaxrpc.ServiceImpl.createProxy(ServiceImpl.java:380)
                               at org.jboss.ws.jaxrpc.ServiceImpl.getPort(ServiceImpl.java:329)
                               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                               at java.lang.reflect.Method.invoke(Method.java:585)
                               at org.jboss.ws.jaxrpc.ServiceProxy.invoke(ServiceProxy.java:130)
                               at $Proxy57.getBaseWebAdapterSOAP11port_http(Unknown Source)
                               at it.sogei.testweb.web.command.TestCommand.execute(TestCommand.java:49)
                               at com.sogei.lib.web.FrontController.processRequest(FrontController.java:107)
                               at com.sogei.lib.web.FrontController.doGet(FrontController.java:73)
                               at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
                               at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                               at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                               at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                               at java.lang.Thread.run(Thread.java:595)
                              Caused by: org.jboss.ws.WSException: Unexpected number of input parameters: 0
                               at org.jboss.ws.jaxrpc.ParameterWrapping.assertOperationMetaData(ParameterWrapping.java:68)
                               at org.jboss.ws.jaxrpc.ParameterWrapping.matchRequestParameters(ParameterWrapping.java:79)
                               at org.jboss.ws.metadata.OperationMetaData.getJavaMethod(OperationMetaData.java:182)
                               at org.jboss.ws.metadata.EndpointMetaData.getOperation(EndpointMetaData.java:324)
                               at org.jboss.ws.jaxrpc.MetaDataSynchronization.synchronizeServiceEndpointInterface(MetaDataSynchronization.java:57)
                               at org.jboss.ws.jaxrpc.ServiceImpl.createProxy(ServiceImpl.java:365)
                               ... 30 more


                              • 12. Re: jbossws 1.0.4GA - wstools fail on a webervice
                                salex

                                hI.

                                I ran into the same problem. Try using

                                <wsdl-java location="..." parameter-style="bare">
                                


                                Worked for me.