Hi, I'm using Axis2 1.0 and want to use the WSDL2Java code generator to create java sources from the following wsdl file:
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:sos="http://www.opengis.net/sos/0" targetNamespace="http://www.opengis.net/sos/0" xmlns:sml="http://www.geospatial.net/sensorML" xmlns:om="http://www.geospatial.net/om/0.0" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengeospatial.net/ows" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://www.opengis.net/sos" schemaLocation="sosAll.xsd"/> </schema> </types> <!--INPUT MESSAGE DEFINITIONS--> <message name="GetCapabilitiesInput"> <part name="request" element="sos:GetCapabilities"/> </message> <!--OUTPUT MESSAGE DEFINITIONS--> <message name="GetCapabilitiesOutput"> <part name="response" element="sos:Capabilities"/> </message> <!--PORT TYPE DEFINITION--> <portType name="sosPortType"> <operation name="GetCapabilities"> <input message="GetCapabilitiesInput"/> <output message="GetCapabilitiesOutput"/> </operation> </portType> <!-- BINDING DEFINIITON--> <binding name="SosSoapBinding" type="sosPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetCapabilities"> <soap:operation soapAction="http://mars.uni-muenster.de/GetCapabilities"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <binding name="SosHttpPostBinding" type="sosPortType"> <http:binding verb="POST"/> <operation name="GetCapabilities"> <http:operation location=""/> </operation> </binding> <!--SERVICE DEFINITION--> <service name="sosService"> <port name="soapSOS" binding="SosSoapBinding"> <soap:address location="http://mars.uni-muenster.de:8080/52nSOSv2/SOAP/sos"/> </port> <port name="httpSOS" binding="SosHttpBinding"> <http:address location="http://mars.uni-muenster.de:8080/52nSOSv2/sos"/> </port> </service> </definitions> When I try to generate code with the command "wsdl2java -uri sos.wsdl -ss -sd -d xmlbeans", I get the following error: Exception in thread "main" java.lang.StackOverflowError at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393) at java.lang.StringBuilder.append(StringBuilder.java:120) at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:227) at sun.net.www.protocol.file.Handler.parseURL(Handler.java:50) at java.net.URL.<init>(URL.java:596) at java.net.URL.<init>(URL.java:464) at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:881) at sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:871) at sun.misc.URLClassPath.findResource(URLClassPath.java:142) at java.net.URLClassLoader$2.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:359) at java.lang.ClassLoader.getResource(ClassLoader.java:977) at java.lang.ClassLoader.getSystemResource(ClassLoader.java:1075) at java.lang.ClassLoader.getSystemResourceAsStream(ClassLoader.java:1181) at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:70) at java.security.AccessController.doPrivileged(Native Method) at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:65) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:218) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185) at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:98) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:213) at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:1911) at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:1708) at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:126) I am a newbie to Axis and don't know, whether this is a fault in my wsdl file or the schema files or another problem. Does Axis support substitution groups in the schema files? The wsdl file and necessary schema files are attached. Any help will be very appreciated! Thanks, Christoph
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" targetNamespace="http://www.opengis.net/ogc" elementFormDefault="qualified" version="1.00"> <xs:annotation> <xs:documentation> ogc4sos.xsd Utility schema which simply includes the OGC schema documents required for the OGC SOS schemas</xs:documentation> </xs:annotation> <!-- ============================================================== includes and imports ============================================================== --> <xs:include schemaLocation="../../filter/1.1.30/filter.xsd"/> </xs:schema>
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opengeospatial.net/ows" elementFormDefault="qualified" version="1.00"> <xs:annotation> <xs:documentation> ows4sos.xsd Utility schema which simply includes the OWS schema documents required for the OGC SOS schemas</xs:documentation> </xs:annotation> <!-- ============================================================== includes and imports ============================================================== --> <xs:include schemaLocation="../../ows/1.0.30/owsGetCapabilities.xsd"/> </xs:schema>
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.opengeospatial.net/sos" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengeospatial.net/ows" xmlns:sos="http://www.opengeospatial.net/sos" elementFormDefault="qualified" version="0.0.31" xml:lang="en"> <annotation> <appinfo>sosGetCapabilities.xsd 2005/05/11</appinfo> <documentation> <description>This XML Schema encodes the SOS GetCapabilities operation request and response.</description> <copyright>Copyright (c) 2005 Institut for Geoinformatics University of Muenster (Alexander C. Walkowski)</copyright> </documentation> </annotation> <!-- ============================================================== includes and imports ============================================================== --> <import namespace="http://www.opengeospatial.net/ows" schemaLocation="./ows4sos.xsd"/> <include schemaLocation="sosContents.xsd"/> <import namespace="http://www.opengis.net/ogc" schemaLocation="./ogc4sos.xsd"/> <!-- ============================================================== elements and types ============================================================== --> <element name="GetCapabilities"> <annotation> <documentation>Request to a SOS to perform the GetCapabilities operation. This operation allows a client to retrieve service metadata (capabilities XML) providing metadata for the specific SOS server. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. </documentation> </annotation> <complexType> <complexContent> <extension base="ows:GetCapabilitiesType"> <sequence/> <attribute name="service" type="ows:ServiceType" use="required" fixed="SOS"/> </extension> </complexContent> </complexType> </element> <!-- =========================================================== --> <element name="Capabilities"> <annotation> <documentation>XML encoded SOS GetCapabilities operation response. This document provides clients with service metadata about a specific service instance, including metadata about the tightly-coupled data served. If the server does not implement the updateSequence parameter, the server shall always return the complete Capabilities document, without the updateSequence parameter. When the server implements the updateSequence parameter and the GetCapabilities operation request included the updateSequence parameter with the current value, the server shall return this element with only the "version" and "updateSequence" attributes. Otherwise, all optional elements shall be included or not depending on the actual value of the Sections parameter in the GetCapabilities operation request. </documentation> </annotation> <complexType> <complexContent> <extension base="ows:CapabilitiesBaseType"> <sequence> <element ref="ogc:Filter_Capabilities" minOccurs="0"/> <element ref="sos:Contents"/> </sequence> </extension> </complexContent> </complexType> </element> </schema>
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:sos="http://www.opengis.net/sos/0" targetNamespace="http://www.opengis.net/sos/0" xmlns:sml="http://www.geospatial.net/sensorML" xmlns:om="http://www.geospatial.net/om/0.0" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengeospatial.net/ows" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <types> <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://www.opengis.net/sos" schemaLocation="sosAll.xsd"/> </schema> </types> <!--INPUT MESSAGE DEFINITIONS--> <message name="GetCapabilitiesInput"> <part name="request" element="sos:GetCapabilities"/> </message> <!--OUTPUT MESSAGE DEFINITIONS--> <message name="GetCapabilitiesOutput"> <part name="response" element="sos:Capabilities"/> </message> <!--PORT TYPE DEFINITION--> <portType name="sosPortType"> <operation name="GetCapabilities"> <input message="GetCapabilitiesInput"/> <output message="GetCapabilitiesOutput"/> </operation> </portType> <!-- BINDING DEFINIITON--> <binding name="SosSoapBinding" type="sosPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetCapabilities"> <soap:operation soapAction="http://mars.uni-muenster.de/GetCapabilities"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <binding name="SosHttpPostBinding" type="sosPortType"> <http:binding verb="POST"/> <operation name="GetCapabilities"> <http:operation location=""/> </operation> </binding> <!--SERVICE DEFINITION--> <service name="sosService"> <port name="soapSOS" binding="SosSoapBinding"> <soap:address location="http://mars.uni-muenster.de:8080/52nSOSv2/SOAP/sos"/> </port> <port name="httpSOS" binding="SosHttpBinding"> <http:address location="http://mars.uni-muenster.de:8080/52nSOSv2/sos"/> </port> </service> </definitions>
<?xml version="1.0" encoding="UTF-8"?> <schema xmlns:sos="http://www.opengeospatial.net/sos" xmlns:ows="http://www.opengeospatial.net/ows" xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opengeospatial.net/sos" elementFormDefault="qualified" version="0.0.31" xml:lang="en"> <annotation> <appinfo>sosAll.xsd 2005/06/16</appinfo> <documentation> <description>This XML Schema includes and imports, directly and indirectly, all the XML Schemas defined by the OGC Sensor Observation Service (SOS).</description> <copyright>Copyright (c) 2005 Institut for Geoinformatics University of Muenster (Alexander C. Walkowski) </copyright> </documentation> </annotation> <!-- ============================================================== includes and imports ============================================================== --> <include schemaLocation="sosGetCapabilities.xsd"/> </schema>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
