Hi, Try the XMLBeans databinding with the -d xmlbeans On 4/27/06, Koelle, Christian <[EMAIL PROTECTED]> wrote: > Hi, > > would someone please mind taking a glimpse on the following wsdl-file > regarding axis1 and axis2 compatibility? Thanks in advance. All new for me, > and I don't know where to look first. Seems that the first wsdl-file I got > is not a good start. > > Background: > I can run axis 1.2.1 WSDL2Java on the wsdl without problem, i.e. generate > stubs, but get an runtime error, if I execute a method on my stubs. The > response returned is exactly how it should be, but there seems to be a > problem in the object mapping. > > I get a similar error for stubs generated with axis 1.3 WSDL2Java. > > I cannot run axis 2 WSDL2Java on the the file via ant or provided script as > I am getting a "Unsupported content Simple Content Extension !" > > All at all, I assume that the WSDL-File is not "optimized" for Axis. I > appreciate all of your comments, as I do not know exactly where to start to > look first. It is fairly new for me. I will get into all this but it is far > to much to assess the situation now. > > Thanks in advance & Regards > Chris > > Below: > WSDL2-Java error Axis2 0.95 > Runtime-error Axis 1.2.1 > Soap Request > Soap Response > WSDL-file provided > > ########################################################### > Error while running Axis 2 0.95-WSDL2Java > > Exception in thread "main" > org.apache.axis2.wsdl.codegen.CodeGenerationException: > java.lang.RuntimeException: > org.apache.axis2.schema.SchemaCompilationException : > Unsupported content Simple Content Extension ! > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener > ationEngine.java:146) > at > org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) > at > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > Caused by: java.lang.RuntimeException: > org.apache.axis2.schema.SchemaCompilation > Exception: Unsupported content Simple Content Extension ! > at > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp > leDBExtension.java:162) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener > ationEngine.java:101) > ... 2 more > Caused by: > org.apache.axis2.schema.SchemaCompilationException: > Unsupported content Simple Content Extension ! > at > org.apache.axis2.schema.SchemaCompiler.processSimpleContent(SchemaCompiler.java:803) > at > org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:672) > at > org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:654) > at > org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:604) > at > org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:569) > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:360) > at > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:338) > at > org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:220) > at > org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:179) > at > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:115) > ... 3 more > #################################################### > Error with "Axis 1.2.1"-generated stubs during runtime when calling: > StaticAttributeProfileService service = new > StaticAttributeProfileServiceLocator(); > StaticAttributeProfile myStub = > service.getStaticAttributeProfileSOAPPort(); > Stub axisStub2 = (Stub) myStub; > [...] > myStub.getDocumentTypes(epc); > > > 2006-04-27 10:22:47,410 DEBUG [main] > org.apache.axis.encoding.DeserializationContext: Popped > element stack to > org.apache.axis.message.RPCElement:schemaList > 2006-04-27 10:22:47,410 DEBUG [main] > org.apache.axis.encoding.DeserializationContext: Exit: > DeserializationContext::endElement() > 2006-04-27 10:22:47,410 DEBUG [main] > org.apache.axis.i18n.ProjectResourceBundle: > org.apache.axis.i18n.resource::handleGetObject(exception00) > 2006-04-27 10:22:47,410 ERROR [main] org.apache.axis.client.Call: > Exception: > org.apache.axis.types.URI$MalformedURIException: No scheme > found in URI. > at > org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180) > at > org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:502) > at > org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) > at > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) > at > org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) > at > org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) > at > org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) > at org.apache.axis.client.Call.invoke(Call.java:2448) > at org.apache.axis.client.Call.invoke(Call.java:2347) > at org.apache.axis.client.Call.invoke(Call.java:1804) > at > _1.wsdl.xml.StaticAttributeProfile.EPCIS.interchange.specification.epc.StaticAttributeProfileSoapBindingStub.getDocumentTypes(StaticAttributeProfileSoapBindingStub.java:535) > ... > #################################################### > Request, as expected > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <soapenv:Header> > <AuthInfo > soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" > soapenv:mustUnderstand="0"> > <ns1:UserToken > xmlns:ns1="urn:epc:specification:interchange:EPCIS:Authentication:xml:schema:1"> > <ns1:UserName>XXX</ns1:UserName> > <ns1:Password>XXX</ns1:Password> > </ns1:UserToken> > </AuthInfo> > </soapenv:Header> > <soapenv:Body> > <getDocumentTypes > xmlns="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1"> > <epc>urn:epc:id:sgtin:0434687.075859.12</epc> > </getDocumentTypes> > </soapenv:Body> > </soapenv:Envelope> > #################################################### > Request, as expected > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <soapenv:Body> > <schemaList > xmlns="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1"> > <schema > xmlns="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:schema:1"> > product_information > </schema> > </schemaList> > </soapenv:Body> > </soapenv:Envelope> > #################################################### > WSDL > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions name="StaticDataProfile" > targetNamespace="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1" > xmlns="http://schemas.xmlsoap.org/wsdl/" > xmlns:auth="urn:epc:specification:interchange:EPCIS:Authentication:xml:schema:1" > xmlns:pmlidentifier="urn:epc:specification:universal:Identifier:xml:schema:1" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:static="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <wsdl:types><!-- Begin Auth info schema--> > <xsd:schema attributeFormDefault="unqualified" > elementFormDefault="qualified" > targetNamespace="urn:epc:specification:interchange:EPCIS:Authentication:xml:schema:1" > xmlns:auth="urn:epc:specification:interchange:EPCIS:Authentication:xml:schema:1" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <xsd:complexType name="UserTokenType"> > <xsd:sequence> > <xsd:element name="UserName" type="xsd:string" /> > <xsd:element name="Password" type="xsd:string" /> > </xsd:sequence> > </xsd:complexType> > <xsd:complexType name="AuthInfoType"> > <xsd:sequence> > <xsd:element name="UserToken" > type="auth:UserTokenType" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="AuthInfo" type="auth:AuthInfoType" /> > </xsd:schema><!-- End of Auth info schema--><!-- Start of Identifier info > schema--> > <xsd:schema attributeFormDefault="unqualified" > elementFormDefault="qualified" > targetNamespace="urn:epc:specification:universal:Identifier:xml:schema:1" > version="1.0" > xmlns:pmlidentifier="urn:epc:specification:universal:Identifier:xml:schema:1" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <xsd:element name="ID" > type="pmlidentifier:IdentifierType" /> > <xsd:complexType name="IdentifierType"> > <xsd:simpleContent> > <xsd:extension base="xsd:token"> > <xsd:attribute name="schemeID" > type="xsd:token" use="optional" /> > <xsd:attribute name="schemeAgencyID" > type="xsd:token" use="optional" /> > <xsd:attribute name="schemeVersionID" > type="xsd:token" use="optional" /> > <xsd:attribute name="schemeURI" > type="xsd:anyURI" use="optional" /> > </xsd:extension> > </xsd:simpleContent> > </xsd:complexType> > </xsd:schema><!-- End of Identifier info schema--><!-- Start of element > declarations for StaticProfile Schema--> > <xsd:schema attributeFormDefault="unqualified" > elementFormDefault="qualified" > targetNamespace="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:schema:1" > version="1.0" > xmlns:sap="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:schema:1" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <xsd:complexType mixed="true" name="xmlType"> > <xsd:sequence> > <xsd:any maxOccurs="unbounded" minOccurs="0" > namespace="##any" /> > </xsd:sequence> > </xsd:complexType> > <xsd:complexType name="schemaList"> > <xsd:sequence> > <xsd:element maxOccurs="unbounded" minOccurs="0" > name="schema" type="sap:schemaType" /> > </xsd:sequence> > </xsd:complexType> > <xsd:simpleType name="schemaType"> > <xsd:restriction base="xsd:anyURI" /> > </xsd:simpleType> > <xsd:complexType name="epcList"> > <xsd:sequence> > <xsd:element maxOccurs="unbounded" minOccurs="0" > name="epc" type="sap:epcType" /> > </xsd:sequence> > </xsd:complexType> > <xsd:simpleType name="epcType"> > <xsd:restriction base="xsd:anyURI" /> > </xsd:simpleType> > <xsd:simpleType name="successType"> > <xsd:restriction base="xsd:boolean" /> > </xsd:simpleType> > <xsd:complexType name="xpathType"> > <xsd:sequence> > <xsd:element name="expr" type="xsd:string" /> > <xsd:element minOccurs="0" name="nsdecl" > type="xsd:string"> > <xsd:annotation> > <xsd:documentation> > The namespace declarations used by > the xpath expression. This is a list > of space delimited NS declarations > usually of the for > xmlns:[somePrefix]=[someURI] > </xsd:documentation> > </xsd:annotation> > </xsd:element> > </xsd:sequence> > </xsd:complexType> > </xsd:schema><!-- End of elements for Static Profile Schema--> > <!-- Start of element declerations for StaticProfile wsdl--> > <xsd:schema attributeFormDefault="unqualified" > elementFormDefault="qualified" > targetNamespace="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1" > xmlns:pmlidentifier="urn:epc:specification:universal:Identifier:xml:schema:1" > xmlns:sap="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:schema:1" > xmlns:static="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <xsd:import > namespace="urn:epc:specification:interchange:EPCIS:Authentication:xml:schema:1" > /> > <xsd:import > namespace="urn:epc:specification:universal:Identifier:xml:schema:1" > /> > <xsd:import > namespace="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:schema:1" > /> > <xsd:complexType name="attributeDataIn"> > <xsd:sequence> > <xsd:element name="epc" > type="pmlidentifier:IdentifierType" /> > <xsd:element name="schema" > type="sap:schemaType" /> > <xsd:element name="xpath" type="sap:xpathType" /> > <xsd:element form="unqualified" name="value" > type="sap:xmlType" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="addAttributeData" > type="static:attributeDataIn" /> > <xsd:element name="setAttributeData" > type="static:attributeDataIn" /> > <xsd:complexType name="getAttributeData"> > <xsd:sequence> > <xsd:element name="epc" > type="pmlidentifier:IdentifierType" /> > <xsd:element name="schema" > type="sap:schemaType" /> > <xsd:element name="xpath" type="sap:xpathType" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="getAttributeData" > type="static:getAttributeData" /> > <xsd:element name="deleteAttributeData" > type="static:getAttributeData" /> > <xsd:complexType name="EPCSWithAttribute"> > <xsd:sequence> > <xsd:element name="schema" > type="sap:schemaType" /> > <xsd:element name="xpath" type="sap:xpathType" /> > </xsd:sequence> > </xsd:complexType> > <xsd:element name="getEPCSWithAttribute" > type="static:EPCSWithAttribute" /> > <xsd:element name="deleteEPCSWithAttribute" > type="static:EPCSWithAttribute" /> > <xsd:element name="getDocumentTypes"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="epc" > type="pmlidentifier:IdentifierType" /> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > <xsd:element name="schemaList" type="sap:schemaList" /> > <xsd:element name="attribute" type="sap:xmlType" /> > <xsd:element name="epcList" type="sap:epcList" /> > <xsd:element name="success" type="sap:successType" /> > </xsd:schema><!-- End element declarations for StaticProfile wsdl--> > </wsdl:types> > <!-- Start Wsdl Messages --> > <wsdl:message name="authenticationMessage"> > <wsdl:part element="auth:AuthInfo" name="AuthInfo" /> > </wsdl:message> > <wsdl:message name="addAttributeDataIn"> > <wsdl:part element="static:addAttributeData" > name="addAttributeData" /> > </wsdl:message> > <wsdl:message name="addAttributeDataOut"> > <wsdl:part element="static:success" name="success" /> > </wsdl:message> > <wsdl:message name="getAttributeDataIn"> > <wsdl:part element="static:getAttributeData" > name="getAttributeData" /> > </wsdl:message> > <wsdl:message name="getAttributeDataOut"> > <wsdl:part element="static:attribute" name="attribute" /> > </wsdl:message> > <wsdl:message name="setAttributeDataIn"> > <wsdl:part element="static:setAttributeData" > name="setAttributeData" /> > </wsdl:message> > <wsdl:message name="setAttributeDataOut"> > <part element="static:success" name="success" /> > </wsdl:message> > <wsdl:message name="deleteAttributeDataIn"> > <wsdl:part element="static:deleteAttributeData" > name="deleteAttributeData" /> > </wsdl:message> > <wsdl:message name="deleteAttributeDataOut"> > <wsdl:part element="static:success" name="success" /> > </wsdl:message> > <wsdl:message name="getEPCSWithAttributeIn"> > <wsdl:part element="static:getEPCSWithAttribute" > name="getEPCSWithAttribute" /> > </wsdl:message> > <message name="getEPCSWithAttributeOut"> > <wsdl:part element="static:epcList" name="epcList" /> > </message> > <wsdl:message name="deleteEPCSWithAttributeIn"> > <wsdl:part element="static:deleteEPCSWithAttribute" > name="deleteEPCSWithAttribute" /> > </wsdl:message> > <wsdl:message name="deleteEPCSWithAttributeOut"> > <wsdl:part element="static:success" name="success" /> > </wsdl:message> > <wsdl:message name="getDocumentTypesIn"> > <wsdl:part element="static:getDocumentTypes" > name="getDocumentTypes" /> > </wsdl:message> > <wsdl:message name="getDocumentTypesOut"> > <wsdl:part element="static:schemaList" name="schemaList" /> > </wsdl:message> > <!-- End Wsdl Messages --> > <wsdl:portType name="StaticAttributeProfile"> > <wsdl:operation name="addAttributeData"> > <wsdl:input message="static:addAttributeDataIn" > name="addAttributeDataInput" /> > <wsdl:output message="static:addAttributeDataOut" > name="addAttributeDataOutput" /> > </wsdl:operation> > <wsdl:operation name="getAttributeData"> > <wsdl:input message="static:getAttributeDataIn" > name="getAttributeDataInput" /> > <wsdl:output message="static:getAttributeDataOut" > name="getAttributeDataOutput" /> > </wsdl:operation> > <wsdl:operation name="setAttributeData"> > <wsdl:input message="static:setAttributeDataIn" > name="setAttributeDataInput" /> > <wsdl:output message="static:setAttributeDataOut" > name="setAttributeDataOutput" /> > </wsdl:operation> > <wsdl:operation name="deleteAttributeData"> > <wsdl:input message="static:deleteAttributeDataIn" > name="deleteAttributeDataInput" /> > <wsdl:output message="static:deleteAttributeDataOut" > name="deleteAttributeDataOutput" /> > </wsdl:operation> > <wsdl:operation name="getEPCSWithAttribute"> > <wsdl:input message="static:getEPCSWithAttributeIn" > name="getEPCSWithAttributeInput" /> > <wsdl:output message="static:getEPCSWithAttributeOut" > name="getEPCSWithAttributeOutput" /> > </wsdl:operation> > <wsdl:operation name="deleteEPCSWithAttribute"> > <wsdl:input message="static:deleteEPCSWithAttributeIn" > name="deleteEPCSWithAttributeInput" /> > <wsdl:output message="static:deleteEPCSWithAttributeOut" > name="deleteEPCSWithAttributeOutput" /> > </wsdl:operation> > <wsdl:operation name="getDocumentTypes"> > <wsdl:input message="static:getDocumentTypesIn" > name="getDocumentTypesInput" /> > <wsdl:output message="static:getDocumentTypesOut" > name="getDocumentTypesOutput" /> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="StaticAttributeProfileSoapBinding" > type="static:StaticAttributeProfile"> > <soap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http" /> > <wsdl:operation name="addAttributeData"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/addAttributeData" > /> > <wsdl:input name="addAttributeDataInput"> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > <soap:body use="literal" /> > </wsdl:input> > <wsdl:output name="addAttributeDataOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getAttributeData"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/getAttributeData" > style="document" /> > <wsdl:input name="getAttributeDataInput"> > <soap:body use="literal" /> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > </wsdl:input> > <wsdl:output name="getAttributeDataOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="setAttributeData"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/setAttributeData" > style="document" /> > <wsdl:input name="setAttributeDataInput"> > <soap:body use="literal" /> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > </wsdl:input> > <wsdl:output name="setAttributeDataOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="deleteAttributeData"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/deleteAttributeData" > style="document" /> > <wsdl:input name="deleteAttributeDataInput"> > <soap:body use="literal" /> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > </wsdl:input> > <wsdl:output name="deleteAttributeDataOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getEPCSWithAttribute"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/getEPCSWithAttribute" > style="document" /> > <wsdl:input name="getEPCSWithAttributeInput"> > <soap:body use="literal" /> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > </wsdl:input> > <wsdl:output name="getEPCSWithAttributeOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="deleteEPCSWithAttribute"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/deleteEPCSWithAttribute" > style="document" /> > <wsdl:input name="deleteEPCSWithAttributeInput"> > <soap:body use="literal" /> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > </wsdl:input> > <wsdl:output name="deleteEPCSWithAttributeOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getDocumentTypes"> > <soap:operation > soapAction="urn:epc:specification:interchange:EPCIS:StaticAttributeProfile:xml:wsdl:1/getDocumentTypes" > style="document" /> > <wsdl:input name="getDocumentTypesInput"> > <soap:body use="literal" /> > <soap:header message="static:authenticationMessage" > part="AuthInfo" use="literal" /> > </wsdl:input> > <wsdl:output name="getDocumentTypesOutput"> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="StaticAttributeProfileService"> > <wsdl:port > binding="static:StaticAttributeProfileSoapBinding" > name="StaticAttributeProfileSOAPPort"> > <soap:address > location="http://[XXX]/static/StaticAttributeProfile" /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > > >
-- Ajith Ranabahu
