2 Replies Latest reply on Nov 19, 2007 12:20 PM by ahmedmhyd

    wsconsume

    aleks

      On the "other side" was made web service with Borland Developer Studio 2006.
      WSDL file is:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="Iws1CAccessservice" targetNamespace="http://tempuri.org/"
       xmlns = "http://schemas.xmlsoap.org/wsdl/"
       xmlns:xs = "http://www.w3.org/2001/XMLSchema"
       xmlns:tns = "http://tempuri.org/"
       xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:soapenc = "http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:mime = "http://schemas.xmlsoap.org/wsdl/mime/"
       xmlns:ns1 = "urn:ws1CAccessUnit">
       <types>
       <xs:schema targetNamespace="urn:ws1CAccessUnit" xmlns="urn:ws1CAccessUnit">
       <xs:complexType name="T1CDocumentList">
       <xs:complexContent>
       <xs:restriction base="soapenc:Array">
       <xs:sequence/>
       <xs:attribute ref="soapenc:arrayType" n1:arrayType="ns1:T1CDocument[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
       </xs:restriction>
       </xs:complexContent>
       </xs:complexType>
       <xs:complexType name="T1CDocument">
       <xs:sequence>
       <xs:element name="Date" type="xs:dateTime"/>
       <xs:element name="Number" type="xs:string"/>
       <xs:element name="Rows" type="ns1:T1CDocumentRows"/>
       </xs:sequence>
       </xs:complexType>
       <xs:complexType name="T1CDocumentRows">
       <xs:complexContent>
       <xs:restriction base="soapenc:Array">
       <xs:sequence/>
       <xs:attribute ref="soapenc:arrayType" n1:arrayType="ns1:T1CDocumentRow[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/"/>
       </xs:restriction>
       </xs:complexContent>
       </xs:complexType>
       <xs:complexType name="T1CDocumentRow">
       <xs:sequence>
       <xs:element name="Product" type="xs:string"/>
       <xs:element name="ProductID" type="xs:string"/>
       <xs:element name="Quantity" type="xs:double"/>
       <xs:element name="QuantityRequested" type="xs:double"/>
       <xs:element name="Price" type="xs:double"/>
       <xs:element name="Amount" type="xs:double"/>
       <xs:element name="Total" type="xs:double"/>
       <xs:element name="Cell" type="xs:string"/>
       </xs:sequence>
       </xs:complexType>
       </xs:schema>
       </types>
       <message name="Get1CDocumentList0Request">
       <part name="dDateFrom" type="xs:dateTime"/>
       <part name="dDateTo" type="xs:dateTime"/>
       </message>
       <message name="Get1CDocumentList0Response">
       <part name="return" type="ns1:T1CDocumentList"/>
       </message>
       <portType name="Iws1CAccess">
       <operation name="Get1CDocumentList">
       <input message="tns:Get1CDocumentList0Request"/>
       <output message="tns:Get1CDocumentList0Response"/>
       </operation>
       </portType>
       <binding name="Iws1CAccessbinding" type="tns:Iws1CAccess">
       <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="Get1CDocumentList">
       <soap:operation soapAction="urn:ws1CAccessUnit-Iws1CAccess#Get1CDocumentList" style="rpc"/>
       <input message="tns:Get1CDocumentList0Request">
       <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ws1CAccessUnit-Iws1CAccess"/>
       </input>
       <output message="tns:Get1CDocumentList0Response">
       <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:ws1CAccessUnit-Iws1CAccess"/>
       </output>
       </operation>
       </binding>
       <service name="Iws1CAccessservice">
       <port name="Iws1CAccessPort" binding="tns:Iws1CAccessbinding">
       <soap:address location="http://my.domain.ru/cgi-bin/ws1CAccess.exe/soap/Iws1CAccess"/>
       </port>
       </service>
      </definitions>
      


      I try to consume this web service with wsconsume and get the error:

      [WARNING] src-resolve.4.2: Error resolving component 'soapenc:Array'. It was detected that 'soapenc:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'file:/home/alex/webapps/korund-ws.xml#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 'soapenc:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:wsdl.xml#types?schema1'.
       line 14 of file:wsdl.xml#types?schema1
      
      [ERROR] undefined simple or complex type 'soapenc:Array'
       line 14 of file:wsdl.xml
      
      [ERROR] undefined attribute 'soapenc:arrayType'
       line 16 of file:wsdl.xml
      
      [ERROR] undefined simple or complex type 'soapenc:Array'
       line 29 of file:wsdl.xml
      
      [ERROR] undefined attribute 'soapenc:arrayType'
       line 31 of file:wsdl.xml
      
      Failed to invoke WsImport
      java.lang.NullPointerException
       at com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:237)
       at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:518)
       at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:232)
       at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
       at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:120)
       at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2173)
       at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:173)
       at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:119)
       at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:148)
       at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:187)
       at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:216)
       at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:79)
      


      On wich side is the problem?

        • 1. Re: wsconsume
          asoldano

          JBossWS cannot process rpc/encoded wsdl style; WS-I BP disallowed use of rpc/enc. I would suggest to create at least a rpc/literal wsdl on the "other side".

          • 2. Re: wsconsume
            ahmedmhyd

            I also got the same problem when trying to consume googlesearch.wsdl .Where u able to solve it?
            Ahmed



            Error:

            [exec] parsing WSDL...
            [exec] [WARNING] src-resolve.4.2: Error resolving component 'soapenc:Array'. It was detected that 'soapenc:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'file:/C:/Workspace/wsdl/GoogleSearch.wsdl#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 'soapenc:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/C:/Workspace/wsdl/GoogleSearch.wsdl#types?schema1'.
            [exec] line 57 of file:/C:/Workspace/wsdl/GoogleSearch.wsdl#types?schema1
            [exec] [ERROR] undefined simple or complex type 'soapenc:Array'
            [exec] line 57 of file:/C:/Workspace/wsdl/GoogleSearch.wsdl
            [exec] [ERROR] undefined attribute 'soapenc:arrayType'
            [exec] line 58 of file:/C:/Workspace/wsdl/GoogleSearch.wsdl
            [exec] [ERROR] undefined simple or complex type 'soapenc:Array'
            [exec] line 65 of file:/C:/Workspace/wsdl/GoogleSearch.wsdl
            [exec] [ERROR] undefined attribute 'soapenc:arrayType'
            [exec] line 66 of file:/C:/Workspace/wsdl/GoogleSearch.wsdl
            [exec] Failed to invoke WsImport
            [exec] java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/jboss-4.2.2.GA/client/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
            [exec] at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:172)
            [exec] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
            [exec] at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:286)
            [exec] at com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:332)
            [exec] at com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:231)
            [exec] at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:518)
            [exec] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:232)
            [exec] at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
            [exec] at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:120)
            [exec] at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2173)
            [exec] at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:173)
            [exec] at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:119)
            [exec] at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:148)
            [exec] at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:187)
            [exec] at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:216)
            [exec] at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:79)