Really bad form in your schema:
targetNamespace="http://schemas.xmlsoap.org/wsdl/"
I think you wanted this instead:
targetNamespace="http://www.opengis.net/sos/0"
This WSDL is invalid because it cannot resolve the elements referenced
from your message parts (sos:GetCapabilities and sos:Capabilities).
It's looking for them in a namespace called
"http://www.opengis.net/sos/0", but you've defined them in a namespace
called "http://www.opengeospatial.net/sos".
To resolve you problem, please go through your WSDL and schemas to
make sure you're using and referencing the proper namespaces and
properly importing and including schemas.
But regardless, Axis should not be generating a StackOverflowError.
Please file a JIRA.
Anne
On 8/24/06, Christoph Stasch <[EMAIL PROTECTED]> wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]