wsconsume
aleks Nov 7, 2007 5:40 AMOn 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?