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 Florian Rosenberg <fl...@infosys.tuwien.ac.at> on 2006/05/03 13:55:19 UTC
[Axis2] problem resolving external xsd in wsdl
hi,
I have a WSDL file in my aar file which references several schemas. the
schemas are located in a subdir schemas/ in the directory of the WSDL file.
TestService.wsdl:
-----------------
<wsdl:types>
<xsd:schema
targetNamespace="http://www.vitalab.tuwien.ac.at/VieQoS">
<xsd:import namespace="http://www.w3.org/2005/08/addressing"
schemaLocation="schemas/ws-addr.xsd" />
<xsd:import
namespace="http://schemas.xmlsoap.org/ws/2004/09/policy"
schemaLocation="schemas/policy-2006-03-01-RC1.xsd" />
<!-- other stuff -->
</wsdl:types>
I package everything to an AAR. The aar layout is as follows:
TestService.aar
|-- META-INF/
|----- services.xml
|----- TestService.wsdl
|----- schemas/
|--------- schema1.xsd
|--------- schema2.xsd
and so on....
When i deploy that service i see the following exception in catalina.out:
----------------
Caused by: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema):
faultCode=OTHER_ERROR: Unable to locate with a locator the schema
referenced at 'schemas/policy-2006-03-01-RC1.xsd' relative to document
base '':
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 com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.axis2.description.WSDL2AxisServiceBuilder.readInTheWSDLFile(WSDL2AxisServiceBuilder.java:955)
at
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:198)
---------------
What is the relative document root in this case and where do I have do
configure it (it possible anyway)? However, where do I have to place the
schemas to make it work.
thanks in advance
best regards,
florian
Re: [Axis2] problem resolving external xsd in wsdl
Posted by Florian Rosenberg <fl...@infosys.tuwien.ac.at>.
hi ajith,
at first sight it seems to work with the latest SVN HEAD (also with the
schemas/ folder in META-INF).
thx,
florian
Ajith Ranabahu wrote:
> Hi Florian,
> We have fixed this issue by providing a custom WSDLLocator in the
> current SVN head. So please have a go with the current SVN head and
> let us know.
> However note that the custom aar based WSDLLocator we has been tested
> only to read files that are in the root location (META-INF folder).
> Yours might not work due to the inclusion of the schema folder. Anyway
> give it a try and see :)
>
> On 5/3/06, Florian Rosenberg <fl...@infosys.tuwien.ac.at> wrote:
>
>> hi,
>>
>> I have a WSDL file in my aar file which references several schemas. the
>> schemas are located in a subdir schemas/ in the directory of the WSDL
>> file.
>>
>> TestService.wsdl:
>> -----------------
>> <wsdl:types>
>> <xsd:schema
>> targetNamespace="http://www.vitalab.tuwien.ac.at/VieQoS">
>>
>> <xsd:import namespace="http://www.w3.org/2005/08/addressing"
>> schemaLocation="schemas/ws-addr.xsd" />
>> <xsd:import
>> namespace="http://schemas.xmlsoap.org/ws/2004/09/policy"
>> schemaLocation="schemas/policy-2006-03-01-RC1.xsd" />
>> <!-- other stuff -->
>> </wsdl:types>
>>
>> I package everything to an AAR. The aar layout is as follows:
>>
>> TestService.aar
>> |-- META-INF/
>> |----- services.xml
>> |----- TestService.wsdl
>> |----- schemas/
>> |--------- schema1.xsd
>> |--------- schema2.xsd
>>
>> and so on....
>>
>> When i deploy that service i see the following exception in catalina.out:
>> ----------------
>> Caused by: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema):
>> faultCode=OTHER_ERROR: Unable to locate with a locator the schema
>> referenced at 'schemas/policy-2006-03-01-RC1.xsd' relative to document
>> base '':
>> 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 com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>> at
>> org.apache.axis2.description.WSDL2AxisServiceBuilder.readInTheWSDLFile(WSDL2AxisServiceBuilder.java:955)
>>
>> at
>> org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:198)
>>
>> ---------------
>>
>> What is the relative document root in this case and where do I have do
>> configure it (it possible anyway)? However, where do I have to place the
>> schemas to make it work.
>>
>> thanks in advance
>>
>> best regards,
>> florian
>>
>>
>
>
> --
> Ajith Ranabahu
Re: [Axis2] problem resolving external xsd in wsdl
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Florian,
We have fixed this issue by providing a custom WSDLLocator in the
current SVN head. So please have a go with the current SVN head and
let us know.
However note that the custom aar based WSDLLocator we has been tested
only to read files that are in the root location (META-INF folder).
Yours might not work due to the inclusion of the schema folder. Anyway
give it a try and see :)
On 5/3/06, Florian Rosenberg <fl...@infosys.tuwien.ac.at> wrote:
> hi,
>
> I have a WSDL file in my aar file which references several schemas. the
> schemas are located in a subdir schemas/ in the directory of the WSDL file.
>
> TestService.wsdl:
> -----------------
> <wsdl:types>
> <xsd:schema
> targetNamespace="http://www.vitalab.tuwien.ac.at/VieQoS">
>
> <xsd:import namespace="http://www.w3.org/2005/08/addressing"
> schemaLocation="schemas/ws-addr.xsd" />
> <xsd:import
> namespace="http://schemas.xmlsoap.org/ws/2004/09/policy"
> schemaLocation="schemas/policy-2006-03-01-RC1.xsd" />
> <!-- other stuff -->
> </wsdl:types>
>
> I package everything to an AAR. The aar layout is as follows:
>
> TestService.aar
> |-- META-INF/
> |----- services.xml
> |----- TestService.wsdl
> |----- schemas/
> |--------- schema1.xsd
> |--------- schema2.xsd
>
> and so on....
>
> When i deploy that service i see the following exception in catalina.out:
> ----------------
> Caused by: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema):
> faultCode=OTHER_ERROR: Unable to locate with a locator the schema
> referenced at 'schemas/policy-2006-03-01-RC1.xsd' relative to document
> base '':
> 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 com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at
> org.apache.axis2.description.WSDL2AxisServiceBuilder.readInTheWSDLFile(WSDL2AxisServiceBuilder.java:955)
> at
> org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:198)
> ---------------
>
> What is the relative document root in this case and where do I have do
> configure it (it possible anyway)? However, where do I have to place the
> schemas to make it work.
>
> thanks in advance
>
> best regards,
> florian
>
>
--
Ajith Ranabahu
Re: [Axis2] problem resolving external xsd in wsdl
Posted by Ali Sadik Kumlali <as...@yahoo.com>.
Hi Florian,
I had similar problems with RC3 and they are fixed with RC4. I also
tested it with RC5. You can try with RC4 or the later releases.
Regards,
Ali Sadik Kumlali
--- Florian Rosenberg <fl...@infosys.tuwien.ac.at> wrote:
> hi,
>
> I have a WSDL file in my aar file which references several schemas.
> the
> schemas are located in a subdir schemas/ in the directory of the WSDL
> file.
>
> TestService.wsdl:
> -----------------
> <wsdl:types>
> <xsd:schema
> targetNamespace="http://www.vitalab.tuwien.ac.at/VieQoS">
>
> <xsd:import namespace="http://www.w3.org/2005/08/addressing"
> schemaLocation="schemas/ws-addr.xsd" />
> <xsd:import
> namespace="http://schemas.xmlsoap.org/ws/2004/09/policy"
> schemaLocation="schemas/policy-2006-03-01-RC1.xsd" />
> <!-- other stuff -->
> </wsdl:types>
>
> I package everything to an AAR. The aar layout is as follows:
>
> TestService.aar
> |-- META-INF/
> |----- services.xml
> |----- TestService.wsdl
> |----- schemas/
> |--------- schema1.xsd
> |--------- schema2.xsd
>
> and so on....
>
> When i deploy that service i see the following exception in
> catalina.out:
> ----------------
> Caused by: WSDLException (at
> /wsdl:definitions/wsdl:types/xsd:schema):
> faultCode=OTHER_ERROR: Unable to locate with a locator the schema
> referenced at 'schemas/policy-2006-03-01-RC1.xsd' relative to
> document
> base '':
> 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 com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> at
>
org.apache.axis2.description.WSDL2AxisServiceBuilder.readInTheWSDLFile(WSDL2AxisServiceBuilder.java:955)
> at
>
org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:198)
> ---------------
>
> What is the relative document root in this case and where do I have
> do
> configure it (it possible anyway)? However, where do I have to place
> the
> schemas to make it work.
>
> thanks in advance
>
> best regards,
> florian
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com