You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Cory Wilkerson <cw...@travelnow.com> on 2003/08/25 19:20:59 UTC
woe the struggles of xsd:import/wsdl:import
All,
Assume xsd = http://www.w3.org/2001/XMLSchema
Assume wsdl = http://schemas.xmlsoap.org/wsdl/
I've ran into quite an interesting situation with referencing external schema via xsd:import and wsdl:import. The .NET wsdl.exe tool will not generate client stubs when using xsd:import to import external schema definitions -- Axis will. Yeah for Axis. That said, Axis will not generate client stubs when using wsdl:import but .NET will. Yeah for .NET (that hurts).
Specifcally, Axis can't seem to decipher the content-type when importing schema:
-----------------
STACK TRACE
-----------------
[java] WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported doc
ument at 'http://10.10.4.75:8001/foo/HotelCity.xsd'.: no content-type: java.net.
UnknownServiceException: no content-type
[java] at java.net.URLConnection.getContentHandler(URLConnection.java:1
059)
[java] at java.net.URLConnection.getContent(URLConnection.java:583)
[java] at java.net.URL.getContent(URL.java:969)
[java] at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Sour
Has anyone else encountered the above? I'd like to generate WSDL that imports schema and works across client tools -- but the above is prohibiting that. I'd take this up with the Micorosoft folk as well, but they'd never listen.
Thanks,
Cory Wilkerson
Re: woe the struggles of xsd:import/wsdl:import
Posted by David Kocher <da...@itserve.ch>.
When using wsdl.exe you not only have to reference the the xsd with xsd:import
but also give it as an argument in addition to the wsdl file.
--David
On Monday 25 August 2003 19:20, Cory Wilkerson wrote:
> All,
>
> Assume xsd = http://www.w3.org/2001/XMLSchema
> Assume wsdl = http://schemas.xmlsoap.org/wsdl/
>
> I've ran into quite an interesting situation with referencing external
> schema via xsd:import and wsdl:import. The .NET wsdl.exe tool will not
> generate client stubs when using xsd:import to import external schema
> definitions -- Axis will. Yeah for Axis. That said, Axis will not
> generate client stubs when using wsdl:import but .NET will. Yeah for .NET
> (that hurts).
>
> Specifcally, Axis can't seem to decipher the content-type when importing
> schema:
>
> -----------------
> STACK TRACE
> -----------------
> [java] WSDLException: faultCode=OTHER_ERROR: Unable to resolve
> imported doc ument at 'http://10.10.4.75:8001/foo/HotelCity.xsd'.: no
> content-type: java.net. UnknownServiceException: no content-type
> [java] at
> java.net.URLConnection.getContentHandler(URLConnection.java:1 059)
> [java] at
> java.net.URLConnection.getContent(URLConnection.java:583) [java] at
> java.net.URL.getContent(URL.java:969)
> [java] at
> com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown
> Source) [java] at
> com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Sour
>
>
> Has anyone else encountered the above? I'd like to generate WSDL that
> imports schema and works across client tools -- but the above is
> prohibiting that. I'd take this up with the Micorosoft folk as well, but
> they'd never listen.
>
> Thanks,
> Cory Wilkerson
RE: woe the struggles of xsd:import/wsdl:import
Posted by Adam Greene <ag...@romulin.com>.
May I suggest that this is really a problem with Java? The exception
occured within URLConnection, not com.ibm.wsdl. Therefore, I suggest fine
tuning the web servers MIME types to include xsd. Failing that, it may
require a rewrite of the getContentAsInputStream method in
com.ibm.wsdl.util.StringUtils.
P.S. What are you using as a web server?
-----Original Message-----
From: Cory Wilkerson [mailto:cwilkerson@travelnow.com]
Sent: Monday, August 25, 2003 2:21 PM
To: axis-user@xml.apache.org
Subject: woe the struggles of xsd:import/wsdl:import
All,
Assume xsd = http://www.w3.org/2001/XMLSchema
Assume wsdl = http://schemas.xmlsoap.org/wsdl/
I've ran into quite an interesting situation with referencing external
schema via xsd:import and wsdl:import. The .NET wsdl.exe tool will not
generate client stubs when using xsd:import to import external schema
definitions -- Axis will. Yeah for Axis. That said, Axis will not generate
client stubs when using wsdl:import but .NET will. Yeah for .NET (that
hurts).
Specifcally, Axis can't seem to decipher the content-type when importing
schema:
-----------------
STACK TRACE
-----------------
[java] WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported
doc
ument at 'http://10.10.4.75:8001/foo/HotelCity.xsd'.: no content-type:
java.net.
UnknownServiceException: no content-type
[java] at
java.net.URLConnection.getContentHandler(URLConnection.java:1
059)
[java] at java.net.URLConnection.getContent(URLConnection.java:583)
[java] at java.net.URL.getContent(URL.java:969)
[java] at
com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown
Source)
[java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
Sour
Has anyone else encountered the above? I'd like to generate WSDL that
imports schema and works across client tools -- but the above is prohibiting
that. I'd take this up with the Micorosoft folk as well, but they'd never
listen.
Thanks,
Cory Wilkerson