Siamak, Below I've included the original wsdl followed by the error trace. I'm using axis2 release 0.94. I built the code for the service with WSDL3Java:
WSDL2Java.sh -uri ./ASAP.wsdl -ss -sd -g -t -d xmlbeans Then I modified the resulting build.xml file to copy ASAP.wsdl to the META-INF folder before building the aar. Thanks again for your help, --chris <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://sis.titan.com/actd/asap" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://sis.titan.com/actd/asap" xmlns:intf="http://sis.titan.com/actd/asap" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <schema elementFormDefault="qualified" targetNamespace="http://sis.titan.com/actd/asap" xmlns="http://www.w3.org/2001/XMLSchema"> <simpleType name="queryType"> <restriction base="xsd:string"> <maxLength value="4096"/> </restriction> </simpleType> <simpleType name="keyType"> <restriction base="xsd:string"> <maxLength value="1024"/> </restriction> </simpleType> <simpleType name="batchSizeType"> <restriction base="xsd:int"> <minInclusive value="1"/> <maxInclusive value="10000"/> </restriction> </simpleType> <element name="filterCapabilities"> <complexType/> </element> <element name="filterCapabilitiesResponse"> <complexType> <sequence> <element name="filterCapabilitiesReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="findMessages"> <complexType> <sequence> <element name="query" type="impl:queryType"/> </sequence> </complexType> </element> <element name="findMessagesResponse"> <complexType> <sequence> <element name="findMessagesReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="nextMessages"> <complexType> <sequence> <element name="key" type="impl:keyType"/> <element name="numResults" type="impl:batchSizeType"/> </sequence> </complexType> </element> <element name="nextMessagesResponse"> <complexType> <sequence> <element maxOccurs="unbounded" name="nextMessagesReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="closeMessages"> <complexType> <sequence> <element name="key" type="impl:keyType"/> </sequence> </complexType> </element> <element name="closeMessagesResponse"> <complexType/> </element> <element name="findQueries"> <complexType> <sequence> <element name="query" type="impl:queryType"/> </sequence> </complexType> </element> <element name="findQueriesResponse"> <complexType> <sequence> <element name="findQueriesReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="nextQueries"> <complexType> <sequence> <element name="key" type="impl:keyType"/> <element name="numResults" type="impl:batchSizeType"/> </sequence> </complexType> </element> <element name="nextQueriesResponse"> <complexType> <sequence> <element maxOccurs="unbounded" name="nextQueriesReturn" type="xsd:string"/> </sequence> </complexType> </element> <element name="closeQueries"> <complexType> <sequence> <element name="key" type="impl:keyType"/> </sequence> </complexType> </element> <element name="closeQueriesResponse"> <complexType/> </element> </schema> </wsdl:types> <wsdl:message name="filterCapabilitiesRequest"> <wsdl:part element="impl:filterCapabilities" name="parameters"/> </wsdl:message> <wsdl:message name="closeQueriesRequest"> <wsdl:part element="impl:closeQueries" name="parameters"/> </wsdl:message> <wsdl:message name="findMessagesResponse"> <wsdl:part element="impl:findMessagesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="nextMessagesResponse"> <wsdl:part element="impl:nextMessagesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="findQueriesResponse"> <wsdl:part element="impl:findQueriesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="filterCapabilitiesResponse"> <wsdl:part element="impl:filterCapabilitiesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="nextMessagesRequest"> <wsdl:part element="impl:nextMessages" name="parameters"/> </wsdl:message> <wsdl:message name="closeMessagesResponse"> <wsdl:part element="impl:closeMessagesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="findQueriesRequest"> <wsdl:part element="impl:findQueries" name="parameters"/> </wsdl:message> <wsdl:message name="nextQueriesResponse"> <wsdl:part element="impl:nextQueriesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="closeMessagesRequest"> <wsdl:part element="impl:closeMessages" name="parameters"/> </wsdl:message> <wsdl:message name="nextQueriesRequest"> <wsdl:part element="impl:nextQueries" name="parameters"/> </wsdl:message> <wsdl:message name="closeQueriesResponse"> <wsdl:part element="impl:closeQueriesResponse" name="parameters"/> </wsdl:message> <wsdl:message name="findMessagesRequest"> <wsdl:part element="impl:findMessages" name="parameters"/> </wsdl:message> <wsdl:portType name="ASAP"> <wsdl:operation name="filterCapabilities"> <wsdl:input message="impl:filterCapabilitiesRequest" name="filterCapabilitiesRequest"/> <wsdl:output message="impl:filterCapabilitiesResponse" name="filterCapabilitiesResponse"/> </wsdl:operation> <wsdl:operation name="findMessages"> <wsdl:input message="impl:findMessagesRequest" name="findMessagesRequest"/> <wsdl:output message="impl:findMessagesResponse" name="findMessagesResponse"/> </wsdl:operation> <wsdl:operation name="nextMessages"> <wsdl:input message="impl:nextMessagesRequest" name="nextMessagesRequest"/> <wsdl:output message="impl:nextMessagesResponse" name="nextMessagesResponse"/> </wsdl:operation> <wsdl:operation name="closeMessages"> <wsdl:input message="impl:closeMessagesRequest" name="closeMessagesRequest"/> <wsdl:output message="impl:closeMessagesResponse" name="closeMessagesResponse"/> </wsdl:operation> <wsdl:operation name="findQueries"> <wsdl:input message="impl:findQueriesRequest" name="findQueriesRequest"/> <wsdl:output message="impl:findQueriesResponse" name="findQueriesResponse"/> </wsdl:operation> <wsdl:operation name="nextQueries"> <wsdl:input message="impl:nextQueriesRequest" name="nextQueriesRequest"/> <wsdl:output message="impl:nextQueriesResponse" name="nextQueriesResponse"/> </wsdl:operation> <wsdl:operation name="closeQueries"> <wsdl:input message="impl:closeQueriesRequest" name="closeQueriesRequest"/> <wsdl:output message="impl:closeQueriesResponse" name="closeQueriesResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ASAPSoapBinding" type="impl:ASAP"> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="filterCapabilities"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="filterCapabilitiesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="filterCapabilitiesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="findMessages"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="findMessagesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="findMessagesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="nextMessages"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="nextMessagesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="nextMessagesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="closeMessages"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="closeMessagesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="closeMessagesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="findQueries"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="findQueriesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="findQueriesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="nextQueries"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="nextQueriesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="nextQueriesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="closeQueries"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="closeQueriesRequest"> <wsdlsoap:body use="literal"/> </wsdl:input> <wsdl:output name="closeQueriesResponse"> <wsdlsoap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="ASAPService"> <wsdl:port binding="impl:ASAPSoapBinding" name="ASAP"> <wsdlsoap:address location="http://localhost:8080/asap/services/ASAP"/> </wsdl:port> </wsdl:service> </wsdl:definitions> java.lang.RuntimeException: Schema for namespace 'http://sis.titan.com/actd/asap' already contains type 'string at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:237) at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:98) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233) at org.apache.axis2.deployment.AxisServiceBuilder.getXMLSchema(AxisServiceBuilder.java:443) at org.apache.axis2.deployment.AxisServiceBuilder.getAxisService(AxisServiceBuilder.java:192) at org.apache.axis2.deployment.AxisServiceBuilder.getAxisService(AxisServiceBuilder.java:127) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:267) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:333) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:383) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196) at org.apache.axis2.deployment.listener.RepositoryListenerImpl.update(RepositoryListenerImpl.java:140) at org.apache.axis2.deployment.listener.RepositoryListenerImpl.checkServices(RepositoryListenerImpl.java:90) at org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:545) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:56) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:39) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:53) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:211) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:191) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 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:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) - Exception occured when creating the Document from WSDL java.lang.RuntimeException: Schema for namespace 'http://sis.titan.com/actd/asap' already contains type 'string at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:237) at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:98) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233) at org.apache.axis2.deployment.AxisServiceBuilder.getXMLSchema(AxisServiceBuilder.java:443) at org.apache.axis2.deployment.AxisServiceBuilder.getAxisService(AxisServiceBuilder.java:192) at org.apache.axis2.deployment.AxisServiceBuilder.getAxisService(AxisServiceBuilder.java:127) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:267) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:333) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:383) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:196) at org.apache.axis2.deployment.listener.RepositoryListenerImpl.update(RepositoryListenerImpl.java:140) at org.apache.axis2.deployment.listener.RepositoryListenerImpl.checkServices(RepositoryListenerImpl.java:90) at org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:545) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:56) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:39) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:53) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:211) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:191) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 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:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) - Invalid service ASAPService.aar due to Schema for namespace 'http://sis.titan.com/actd/asap' already contains type 'string; nested exception is: java.lang.RuntimeException: Schema for namespace 'http://sis.titan.com/actd/asap' already contains type 'string; nested exception is: org.apache.axis2.deployment.DeploymentException: Schema for namespace 'http://sis.titan.com/actd/asap' already contains type 'string; nested exception is: java.lang.RuntimeException: Schema for namespace 'http://sis.titan.com/actd/asap' already contains type 'string -----Original Message----- From: Siamak Haschemi [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 10:47 AM To: [email protected] Subject: Re: Displayed WSDL different from source WSDL in Axis2 Please post the relevant files so I can try to help you. Also post the entire expection (error) messages. Thanks, Siamak Haschemi Surridge, Christopher S (Titan) @ TITAN schrieb: >Hello Siamak, > >I placed my wsdl-file in the META-INF folder as you suggested, but that caused >a deployment exception: > >Error: org.apache.axis2.deployment.DeploymentException: Schema for namespace >'http://sis.titan.com/actd' already contains type 'string; nested exception >is: ... > > >I see the error when I go to: > >http://localhost:8080/axis2/listSingleService.jsp?serviceName=ASAPService > >Thanks for your help, > >--chris > >-----Original Message----- >From: Siamak Haschemi [mailto:[EMAIL PROTECTED] >Sent: Friday, March 24, 2006 9:51 AM >To: [email protected] >Subject: Re: Displayed WSDL different from source WSDL in Axis2 > > >Hello Christopher. > >As i remember you can add your own WSDL-file into the META-INF folder. >Then Axis2 uses this one. >For you, your initial WSDL-file should be placed into the META-INF >folder inside the *.aar package. > >I hope that helps. > >Thanks, > >Siamak Haschemi > >Surridge, Christopher S (Titan) @ TITAN schrieb: > > > >>I began with a WSDL file and used the WSDL2.sh script to generate stubs for >>my service. I managed to get an aar file built and deployed and the service >>now shows up on the list of available services. However, when I check the >>link to the WSDL for my service, it is not close to the WSDL I started with. >>Am I missing something in my aar file, or is there some configuration step I >>missed? The structure of my aar looks like: >> >>META-INF\ >> services.xml >>com\ >>org\ >>lib\ >> *.jar >>resources\ >> schemaorg_apache_xmlbeans\ >> >> >>The main difference between the WSDL files is that the source WSDL specifies >>simple types with restrictions and the resulting WSDL is missing the simple >>types. For example, if the source WSDL has: >> >> >> <simpleType name="queryType"> >> <restriction base="xsd:string"> >> <maxLength value="4096"/> >> </restriction> >> </simpleType> >> >> <element name="findMessages"> >> <complexType> >> <sequence> >> <element name="query" type="impl:queryType"/> >> </sequence> >> </complexType> >> </element> >> >>The resulting WSDL has a section like: >> >><xs:element type="ns1:FindMessagesDocument" name="FindMessagesDocument" /> >><xs:complexType name="FindMessagesDocument"> >><xs:sequence> >><xs:element type="ns1:FindMessagesDocument$FindMessages" name="FindMessages" >>/> >></xs:sequence> >></xs:complexType> >><xs:element type="ns1:FindMessagesDocument$FindMessages" >>name="FindMessagesDocument$FindMessages" /> >><xs:complexType name="FindMessagesDocument$FindMessages"> >><xs:sequence /> >></xs:complexType> >> >>Thanks in advance, >> >>Chris Surridge >>Sr. Software Engineer >>L-3 Titan Corporation >>11955 Freedom Drive, Suite 14101 >>Reston, VA 20190 >>703-434-5307 >> >> >> >> >> > > >
