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 prasad c iyer <pr...@skillnetinc.com> on 2008/01/15 04:38:41 UTC
WSDL import and schemaLocation
Hi,
I am creating the client for an existing web service. My problem is the schemaLocation is points to the relative path. Is there a way to resolve this. So that my client can download the schema.
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="BankServices" targetNamespace="http://localhost:8080/my-app/services/BankServices" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://localhost:8080/my-app/services/BankServices" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bank="http://localhost:8080/my-app/services/BankServices/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema>
<xsd:import namespace="http://localhost:8080/my-app/services/BankServices/types" schemaLocation="BankServices?xsd=xsd0.xsd"/>
</xsd:schema>
</types>
regards
Re: WSDL import and schemaLocation
Posted by prasad c iyer <pr...@skillnetinc.com>.
Hard coded values did the trick.
But it is not good for me. I ran into other problem my xsd imports many
other schema which uses the relative path. Even my WSDL file uses many
schema.
It is very error prone to edit the location. I might have to think something
different.
Any help would be highly appreciated.
regards
----- Original Message -----
From: "prasad c iyer" <pr...@skillnetinc.com>
To: <ax...@ws.apache.org>
Sent: Wednesday, January 16, 2008 9:28 AM
Subject: Re: WSDL import and schemaLocation
> Yeah maybe I should try that.
> Want to know one more thing is there a specific reason why it is
> implemented that way. Coz in real life WSDL files and schema would be
> developed by some other parties which you would use it. If they implement
> schema location with the relative path there is a problem.
>
> One more thing if I set useOriginalWSDL parameter to false, the generated
> WSDL should have entire path to the schema file. I have not tried doing
> it.
>
> many thanks
>
> ----- Original Message -----
> From: "keith chapman" <ke...@gmail.com>
> To: <ax...@ws.apache.org>
> Sent: Tuesday, January 15, 2008 6:16 PM
> Subject: Re: WSDL import and schemaLocation
>
>
>> If you need an absolute URI in there you can try saving the WSDL to
>> your hard disk, Update it manually to have an absolute URI and then
>> add it to the META-INF folder of your aar. Also add the parameter
>> useOriginalWSDL="true" to your services.xml.
>>
>> Thanks,
>> Keith.
>>
>> On Jan 16, 2008 5:18 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
>>>
>>>
>>> I did used WSDL2Java tool.
>>> What I'm trying to do is consume the service using PHP. But when I query
>>> the
>>> WSDL file it returns me the following schema location.
>>>
>>> I don't think it takes care of this.
>>> regards
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: Amila Suriarachchi
>>> To: axis-user@ws.apache.org
>>> Sent: Monday, January 14, 2008 8:04 PM
>>> Subject: Re: WSDL import and schemaLocation
>>>
>>>
>>>
>>>
>>> On Jan 15, 2008 9:08 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
>>>
>>> >
>>> >
>>> > Hi,
>>> > I am creating the client for an existing web service. My problem is
>>> > the
>>> schemaLocation is points to the relative path. Is there a way to resolve
>>> this. So that my client can download the schema.
>>>
>>>
>>> Are you using wsdl2java with Axis2? it can handle the relative
>>> schemaLocations. I think any tool would do this.
>>>
>>> thanks,
>>> Amila.
>>>
>>> >
>>> >
>>> >
>>> >
>>> > <?xml version="1.0" encoding="UTF-8"?>
>>> > <definitions name="BankServices"
>>> targetNamespace="http://localhost:8080/my-app/services/BankServices "
>>> xmlns="http://schemas.xmlsoap.org/wsdl/"
>>> xmlns:tns="http://localhost:8080/my-app/services/BankServices"
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> xmlns:bank="http://localhost:8080/my-app/services/BankServices/types"
>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>>> > <types>
>>> > <xsd:schema>
>>> > <xsd:import
>>> namespace="http://localhost:8080/my-app/services/BankServices/types"
>>> schemaLocation="BankServices?xsd=xsd0.xsd"/>
>>> > </xsd:schema>
>>> > </types>
>>> >
>>> >
>>> >
>>> > regards
>>> >
>>>
>>>
>>>
>>> --
>>> Amila Suriarachchi,
>>> WSO2 Inc.
>>
>>
>>
>> --
>> Keith Chapman
>> Software Engineer
>> WSO2 Inc.
>> Oxygenating the Web Service Platform.
>> http://wso2.org/
>>
>> blog: http://www.keith-chapman.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: WSDL import and schemaLocation
Posted by prasad c iyer <pr...@skillnetinc.com>.
Yeah maybe I should try that.
Want to know one more thing is there a specific reason why it is implemented
that way. Coz in real life WSDL files and schema would be developed by some
other parties which you would use it. If they implement schema location with
the relative path there is a problem.
One more thing if I set useOriginalWSDL parameter to false, the generated
WSDL should have entire path to the schema file. I have not tried doing it.
many thanks
----- Original Message -----
From: "keith chapman" <ke...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Tuesday, January 15, 2008 6:16 PM
Subject: Re: WSDL import and schemaLocation
> If you need an absolute URI in there you can try saving the WSDL to
> your hard disk, Update it manually to have an absolute URI and then
> add it to the META-INF folder of your aar. Also add the parameter
> useOriginalWSDL="true" to your services.xml.
>
> Thanks,
> Keith.
>
> On Jan 16, 2008 5:18 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
>>
>>
>> I did used WSDL2Java tool.
>> What I'm trying to do is consume the service using PHP. But when I query
>> the
>> WSDL file it returns me the following schema location.
>>
>> I don't think it takes care of this.
>> regards
>>
>>
>>
>>
>>
>>
>>
>> ----- Original Message -----
>> From: Amila Suriarachchi
>> To: axis-user@ws.apache.org
>> Sent: Monday, January 14, 2008 8:04 PM
>> Subject: Re: WSDL import and schemaLocation
>>
>>
>>
>>
>> On Jan 15, 2008 9:08 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
>>
>> >
>> >
>> > Hi,
>> > I am creating the client for an existing web service. My problem is the
>> schemaLocation is points to the relative path. Is there a way to resolve
>> this. So that my client can download the schema.
>>
>>
>> Are you using wsdl2java with Axis2? it can handle the relative
>> schemaLocations. I think any tool would do this.
>>
>> thanks,
>> Amila.
>>
>> >
>> >
>> >
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <definitions name="BankServices"
>> targetNamespace="http://localhost:8080/my-app/services/BankServices "
>> xmlns="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:tns="http://localhost:8080/my-app/services/BankServices"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:bank="http://localhost:8080/my-app/services/BankServices/types"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>> > <types>
>> > <xsd:schema>
>> > <xsd:import
>> namespace="http://localhost:8080/my-app/services/BankServices/types"
>> schemaLocation="BankServices?xsd=xsd0.xsd"/>
>> > </xsd:schema>
>> > </types>
>> >
>> >
>> >
>> > regards
>> >
>>
>>
>>
>> --
>> Amila Suriarachchi,
>> WSO2 Inc.
>
>
>
> --
> Keith Chapman
> Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
>
> blog: http://www.keith-chapman.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: WSDL import and schemaLocation
Posted by keith chapman <ke...@gmail.com>.
If you need an absolute URI in there you can try saving the WSDL to
your hard disk, Update it manually to have an absolute URI and then
add it to the META-INF folder of your aar. Also add the parameter
useOriginalWSDL="true" to your services.xml.
Thanks,
Keith.
On Jan 16, 2008 5:18 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
>
>
> I did used WSDL2Java tool.
> What I'm trying to do is consume the service using PHP. But when I query the
> WSDL file it returns me the following schema location.
>
> I don't think it takes care of this.
> regards
>
>
>
>
>
>
>
> ----- Original Message -----
> From: Amila Suriarachchi
> To: axis-user@ws.apache.org
> Sent: Monday, January 14, 2008 8:04 PM
> Subject: Re: WSDL import and schemaLocation
>
>
>
>
> On Jan 15, 2008 9:08 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
>
> >
> >
> > Hi,
> > I am creating the client for an existing web service. My problem is the
> schemaLocation is points to the relative path. Is there a way to resolve
> this. So that my client can download the schema.
>
>
> Are you using wsdl2java with Axis2? it can handle the relative
> schemaLocations. I think any tool would do this.
>
> thanks,
> Amila.
>
> >
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <definitions name="BankServices"
> targetNamespace="http://localhost:8080/my-app/services/BankServices "
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="http://localhost:8080/my-app/services/BankServices"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:bank="http://localhost:8080/my-app/services/BankServices/types"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> > <types>
> > <xsd:schema>
> > <xsd:import
> namespace="http://localhost:8080/my-app/services/BankServices/types"
> schemaLocation="BankServices?xsd=xsd0.xsd"/>
> > </xsd:schema>
> > </types>
> >
> >
> >
> > regards
> >
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
--
Keith Chapman
Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/
blog: http://www.keith-chapman.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: WSDL import and schemaLocation
Posted by prasad c iyer <pr...@skillnetinc.com>.
I did used WSDL2Java tool.
What I'm trying to do is consume the service using PHP. But when I query the WSDL file it returns me the following schema location.
I don't think it takes care of this.
regards
----- Original Message -----
From: Amila Suriarachchi
To: axis-user@ws.apache.org
Sent: Monday, January 14, 2008 8:04 PM
Subject: Re: WSDL import and schemaLocation
On Jan 15, 2008 9:08 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
Hi,
I am creating the client for an existing web service. My problem is the schemaLocation is points to the relative path. Is there a way to resolve this. So that my client can download the schema.
Are you using wsdl2java with Axis2? it can handle the relative schemaLocations. I think any tool would do this.
thanks,
Amila.
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="BankServices" targetNamespace="http://localhost:8080/my-app/services/BankServices " xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://localhost:8080/my-app/services/BankServices" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bank="http://localhost:8080/my-app/services/BankServices/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema>
<xsd:import namespace="http://localhost:8080/my-app/services/BankServices/types" schemaLocation="BankServices?xsd=xsd0.xsd"/>
</xsd:schema>
</types>
regards
--
Amila Suriarachchi,
WSO2 Inc.
Re: WSDL import and schemaLocation
Posted by Amila Suriarachchi <am...@gmail.com>.
On Jan 15, 2008 9:08 AM, prasad c iyer <pr...@skillnetinc.com> wrote:
> Hi,
> I am creating the client for an existing web service. My problem is the
> schemaLocation is points to the relative path. Is there a way to resolve
> this. So that my client can download the schema.
>
Are you using wsdl2java with Axis2? it can handle the relative
schemaLocations. I think any tool would do this.
thanks,
Amila.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="BankServices" targetNamespace="
> http://localhost:8080/my-app/services/BankServices" xmlns="
> http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
> http://localhost:8080/my-app/services/BankServices" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" xmlns:bank="
> http://localhost:8080/my-app/services/BankServices/types" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/">
> <types>
> <xsd:schema>
> <xsd:import namespace="
> http://localhost:8080/my-app/services/BankServices/types"
> schemaLocation="BankServices?xsd=xsd0.xsd"/>
> </xsd:schema>
> </types>
>
>
> regards
>
>
--
Amila Suriarachchi,
WSO2 Inc.