You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Griffin, Mark" <Ma...@pgnmail.com> on 2006/02/15 16:39:26 UTC

Axis 1.3 Issue with schema import

I've run into an issue with Axis 1.3 using WSDL2Java both from the
command line and also in Eclipse 3.1 with WTP 1.0.  It appears to work
okay when I use a wsdl file that imports an xml schema located on the
local file system.  When I try to use an import that references the same
schema but via http, it gives the error below.  The schema is accessible
via http, I've verified with other toolsets that were able to generate
the required structures using the same WSDL.  Is this a bug or is it
user error?

Import statement form WSDL that works:

      <wsdl:types>
		<xs:schema >
			<xs:import
namespace="urn:www.pgn.wbmethod:servicerequest"
schemaLocation="./servicerequest.xsd"/>
		</xs:schema>
	</wsdl:types>



Import statement form WSDL that fails:

     <wsdl:types>
		<xs:schema >
			<xs:import
namespace="urn:www.pgn.wbmethod:servicerequest"
schemaLocation="http://sn000046:8081/schemas/servicerequest.xsd"/>
		</xs:schema>
	</wsdl:types>


Error Message

WSDLException (at /wsdl:definitions/wsdl:types/xs:schema):
faultCode=OTHER_ERROR
: An error occurred trying to resolve schema referenced at
'http://sn000046:8081
/schemas/servicerequest.xsd', relative to
'file:/C:/Data/source/axisbug/service.
wsdl'.: no content-type: java.net.UnknownServiceException: no
content-type
        at java.net.URLConnection.getContentHandler(Unknown Source)
        at java.net.URLConnection.getContent(Unknown Source)
        at java.net.URL.getContent(Unknown Source)
        at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)

        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:516)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:495)
        at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)

        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:516)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
a:495)
        at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)






Mark E. Griffin
Developer Services
Progress Energy
mark.griffin@pgnmail.com



Re: Axis 1.3 Issue with schema import

Posted by Davanum Srinivas <da...@gmail.com>.
Can u try using wsdl4j directly?

thanks,
dims

On 2/15/06, Griffin, Mark <Ma...@pgnmail.com> wrote:
> I've run into an issue with Axis 1.3 using WSDL2Java both from the
> command line and also in Eclipse 3.1 with WTP 1.0.  It appears to work
> okay when I use a wsdl file that imports an xml schema located on the
> local file system.  When I try to use an import that references the same
> schema but via http, it gives the error below.  The schema is accessible
> via http, I've verified with other toolsets that were able to generate
> the required structures using the same WSDL.  Is this a bug or is it
> user error?
>
> Import statement form WSDL that works:
>
>       <wsdl:types>
>                 <xs:schema >
>                         <xs:import
> namespace="urn:www.pgn.wbmethod:servicerequest"
> schemaLocation="./servicerequest.xsd"/>
>                 </xs:schema>
>         </wsdl:types>
>
>
>
> Import statement form WSDL that fails:
>
>      <wsdl:types>
>                 <xs:schema >
>                         <xs:import
> namespace="urn:www.pgn.wbmethod:servicerequest"
> schemaLocation="http://sn000046:8081/schemas/servicerequest.xsd"/>
>                 </xs:schema>
>         </wsdl:types>
>
>
> Error Message
>
> WSDLException (at /wsdl:definitions/wsdl:types/xs:schema):
> faultCode=OTHER_ERROR
> : An error occurred trying to resolve schema referenced at
> 'http://sn000046:8081
> /schemas/servicerequest.xsd', relative to
> 'file:/C:/Data/source/axisbug/service.
> wsdl'.: no content-type: java.net.UnknownServiceException: no
> content-type
>         at java.net.URLConnection.getContentHandler(Unknown Source)
>         at java.net.URLConnection.getContent(Unknown Source)
>         at java.net.URL.getContent(Unknown Source)
>         at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
> Source)
>
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
> Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:516)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:495)
>         at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
>         at java.lang.Thread.run(Unknown Source)
>
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
> Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:516)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.jav
> a:495)
>         at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
>         at java.lang.Thread.run(Unknown Source)
>
>
>
>
>
>
> Mark E. Griffin
> Developer Services
> Progress Energy
> mark.griffin@pgnmail.com
>
>
>


--
Davanum Srinivas : http://wso2.com/blogs/