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 Sukma Agung Verdianto <sa...@gmail.com> on 2008/06/11 07:08:54 UTC
Problems with WSDL references on Axis2 1.3
Hi All,
I have a question regarding WSDL published by a service packaged in AAR.
I have a service class, WSDL and all it references (imported WSDL's and
schema's) structured like this inside an aar:
java
-- package
---- ServiceClass.class
META-INF
-- services.xml
-- ExampleService.wsdl
-- _
---- schema1.xsd (this import schema2, <xsd:import namespace="namespace"
schemaLocation="schema2.xsd"/>)
---- schema2.xsd (let say this schema import schema3 using <xsd:import
namespace="namespace" schemaLocation="_/schema3.xsd"/>)
---- _
------ schema3.xsd (this import schema 4)
------ _
-------- schema4.xsd
I can get ExampleService deployed successfully, and it is exposing the right
WSDL (using originalWsdl set to true).
However, when I try to access the WSDL and get all references, it failed
because it cannot find some references...
I've digging more, and found out that Axis2 using replacing some relative
URL to be something like this format - [ServiceName]?xsd=path/to/xsd
This is fine for the XSD that directly imported by WSDL, but not for the XSD
imported by ther XSD.
Axis2 does not change import definition to <xsd:import namespace="namespace"
schemaLocation="ServiceName?xsd=_/_/schema3.xsd"/> to import schema3.
Is this the right behavior of Axis2? Does't it support nested import?
Please give me some insight.
Regards,
Sukma
Re: Problems with WSDL references on Axis2 1.3
Posted by Amila Suriarachchi <am...@gmail.com>.
try to generate the code using wsdl2java tool with -sd option.
Here it will creates an folder called resources and under it you can find
wsdl and schema files.
if you generate aar file from your tool add those files to META-INF folder
and also note that generated services.xml file has use original wsdl
attribute set to true
<xs:import
namespace="urn:xeda-org:draft:bt:CreateApplicationCommercialTransaction:2.0.0"
schemaLocation="_/catalog/project_-c-_/20080603/ProposeCreateApplicationTransaction.xsd"/>
wsdl2java tool produce a wsdl file with changing these schema locations.
thanks,
Amila.
On Tue, Jun 17, 2008 at 9:42 AM, Sukma Agung Verdianto <sa...@gmail.com>
wrote:
> Hi Amila,
> Actually, I manually create the .AAR file from my code (using zip
> compression feature of JDK).
> It was successfully deployed to the Axis2 server, the WSDL is recognized.
> and the schema has been validated successfully.
>
> When I try to use wsdl2java the generate client stub, (eg:
> http://localhost:8080/axis2/services/TMCreateApplication?wsdl), some
> schema imported by WSDL can not be accessed.
>
> The example of WSDL is attached with this email.
>
> Regards,
> Sukma
>
>
>
> On Mon, Jun 16, 2008 at 5:20 PM, Amila Suriarachchi <
> amilasuriarachchi@gmail.com> wrote:
>
>> How you generate the .aar file. did you use the wsdl2java tool? Can you
>> send your wsdl?
>>
>> thanks
>> Amila.
>>
>>
>> On Fri, Jun 13, 2008 at 8:22 AM, Sukma Agung Verdianto <sa...@gmail.com>
>> wrote:
>>
>>> Hi,
>>> Can anybody help me out of this?
>>> I can see from the internet there is some problem with nested import of
>>> schema?
>>>
>>> I can;t attach the sample AAR file, I think this mailing list does not
>>> allow binary attachment?
>>>
>>> Regards,
>>> Sukma
>>>
>>> On Wed, Jun 11, 2008 at 12:08 PM, Sukma Agung Verdianto <
>>> save.nx@gmail.com> wrote:
>>>
>>>> Hi All,
>>>> I have a question regarding WSDL published by a service packaged in AAR.
>>>> I have a service class, WSDL and all it references (imported WSDL's and
>>>> schema's) structured like this inside an aar:
>>>>
>>>> java
>>>> -- package
>>>> ---- ServiceClass.class
>>>> META-INF
>>>> -- services.xml
>>>> -- ExampleService.wsdl
>>>> -- _
>>>> ---- schema1.xsd (this import schema2, <xsd:import
>>>> namespace="namespace" schemaLocation="schema2.xsd"/>)
>>>> ---- schema2.xsd (let say this schema import schema3 using <xsd:import
>>>> namespace="namespace" schemaLocation="_/schema3.xsd"/>)
>>>> ---- _
>>>> ------ schema3.xsd (this import schema 4)
>>>> ------ _
>>>> -------- schema4.xsd
>>>>
>>>> I can get ExampleService deployed successfully, and it is exposing the
>>>> right WSDL (using originalWsdl set to true).
>>>> However, when I try to access the WSDL and get all references, it failed
>>>> because it cannot find some references...
>>>>
>>>> I've digging more, and found out that Axis2 using replacing some
>>>> relative URL to be something like this format -
>>>> [ServiceName]?xsd=path/to/xsd
>>>> This is fine for the XSD that directly imported by WSDL, but not for the
>>>> XSD imported by ther XSD.
>>>> Axis2 does not change import definition to <xsd:import
>>>> namespace="namespace" schemaLocation="ServiceName?xsd=_/_/schema3.xsd"/> to
>>>> import schema3.
>>>>
>>>> Is this the right behavior of Axis2? Does't it support nested import?
>>>> Please give me some insight.
>>>>
>>>> Regards,
>>>> Sukma
>>>>
>>>
>>>
>>
>>
>> --
>> Amila Suriarachchi,
>> WSO2 Inc.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
--
Amila Suriarachchi,
WSO2 Inc.
Re: Problems with WSDL references on Axis2 1.3
Posted by Sukma Agung Verdianto <sa...@gmail.com>.
Hi Amila,
Actually, I manually create the .AAR file from my code (using zip
compression feature of JDK).
It was successfully deployed to the Axis2 server, the WSDL is recognized.
and the schema has been validated successfully.
When I try to use wsdl2java the generate client stub, (eg:
http://localhost:8080/axis2/services/TMCreateApplication?wsdl), some schema
imported by WSDL can not be accessed.
The example of WSDL is attached with this email.
Regards,
Sukma
On Mon, Jun 16, 2008 at 5:20 PM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:
> How you generate the .aar file. did you use the wsdl2java tool? Can you
> send your wsdl?
>
> thanks
> Amila.
>
>
> On Fri, Jun 13, 2008 at 8:22 AM, Sukma Agung Verdianto <sa...@gmail.com>
> wrote:
>
>> Hi,
>> Can anybody help me out of this?
>> I can see from the internet there is some problem with nested import of
>> schema?
>>
>> I can;t attach the sample AAR file, I think this mailing list does not
>> allow binary attachment?
>>
>> Regards,
>> Sukma
>>
>> On Wed, Jun 11, 2008 at 12:08 PM, Sukma Agung Verdianto <
>> save.nx@gmail.com> wrote:
>>
>>> Hi All,
>>> I have a question regarding WSDL published by a service packaged in AAR.
>>> I have a service class, WSDL and all it references (imported WSDL's and
>>> schema's) structured like this inside an aar:
>>>
>>> java
>>> -- package
>>> ---- ServiceClass.class
>>> META-INF
>>> -- services.xml
>>> -- ExampleService.wsdl
>>> -- _
>>> ---- schema1.xsd (this import schema2, <xsd:import
>>> namespace="namespace" schemaLocation="schema2.xsd"/>)
>>> ---- schema2.xsd (let say this schema import schema3 using <xsd:import
>>> namespace="namespace" schemaLocation="_/schema3.xsd"/>)
>>> ---- _
>>> ------ schema3.xsd (this import schema 4)
>>> ------ _
>>> -------- schema4.xsd
>>>
>>> I can get ExampleService deployed successfully, and it is exposing the
>>> right WSDL (using originalWsdl set to true).
>>> However, when I try to access the WSDL and get all references, it failed
>>> because it cannot find some references...
>>>
>>> I've digging more, and found out that Axis2 using replacing some relative
>>> URL to be something like this format - [ServiceName]?xsd=path/to/xsd
>>> This is fine for the XSD that directly imported by WSDL, but not for the
>>> XSD imported by ther XSD.
>>> Axis2 does not change import definition to <xsd:import
>>> namespace="namespace" schemaLocation="ServiceName?xsd=_/_/schema3.xsd"/> to
>>> import schema3.
>>>
>>> Is this the right behavior of Axis2? Does't it support nested import?
>>> Please give me some insight.
>>>
>>> Regards,
>>> Sukma
>>>
>>
>>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
Re: Problems with WSDL references on Axis2 1.3
Posted by Amila Suriarachchi <am...@gmail.com>.
How you generate the .aar file. did you use the wsdl2java tool? Can you send
your wsdl?
thanks
Amila.
On Fri, Jun 13, 2008 at 8:22 AM, Sukma Agung Verdianto <sa...@gmail.com>
wrote:
> Hi,
> Can anybody help me out of this?
> I can see from the internet there is some problem with nested import of
> schema?
>
> I can;t attach the sample AAR file, I think this mailing list does not
> allow binary attachment?
>
> Regards,
> Sukma
>
> On Wed, Jun 11, 2008 at 12:08 PM, Sukma Agung Verdianto <sa...@gmail.com>
> wrote:
>
>> Hi All,
>> I have a question regarding WSDL published by a service packaged in AAR.
>> I have a service class, WSDL and all it references (imported WSDL's and
>> schema's) structured like this inside an aar:
>>
>> java
>> -- package
>> ---- ServiceClass.class
>> META-INF
>> -- services.xml
>> -- ExampleService.wsdl
>> -- _
>> ---- schema1.xsd (this import schema2, <xsd:import
>> namespace="namespace" schemaLocation="schema2.xsd"/>)
>> ---- schema2.xsd (let say this schema import schema3 using <xsd:import
>> namespace="namespace" schemaLocation="_/schema3.xsd"/>)
>> ---- _
>> ------ schema3.xsd (this import schema 4)
>> ------ _
>> -------- schema4.xsd
>>
>> I can get ExampleService deployed successfully, and it is exposing the
>> right WSDL (using originalWsdl set to true).
>> However, when I try to access the WSDL and get all references, it failed
>> because it cannot find some references...
>>
>> I've digging more, and found out that Axis2 using replacing some relative
>> URL to be something like this format - [ServiceName]?xsd=path/to/xsd
>> This is fine for the XSD that directly imported by WSDL, but not for the
>> XSD imported by ther XSD.
>> Axis2 does not change import definition to <xsd:import
>> namespace="namespace" schemaLocation="ServiceName?xsd=_/_/schema3.xsd"/> to
>> import schema3.
>>
>> Is this the right behavior of Axis2? Does't it support nested import?
>> Please give me some insight.
>>
>> Regards,
>> Sukma
>>
>
>
--
Amila Suriarachchi,
WSO2 Inc.
Re: Problems with WSDL references on Axis2 1.3
Posted by Sukma Agung Verdianto <sa...@gmail.com>.
Hi,
Can anybody help me out of this?
I can see from the internet there is some problem with nested import of
schema?
I can;t attach the sample AAR file, I think this mailing list does not allow
binary attachment?
Regards,
Sukma
On Wed, Jun 11, 2008 at 12:08 PM, Sukma Agung Verdianto <sa...@gmail.com>
wrote:
> Hi All,
> I have a question regarding WSDL published by a service packaged in AAR.
> I have a service class, WSDL and all it references (imported WSDL's and
> schema's) structured like this inside an aar:
>
> java
> -- package
> ---- ServiceClass.class
> META-INF
> -- services.xml
> -- ExampleService.wsdl
> -- _
> ---- schema1.xsd (this import schema2, <xsd:import namespace="namespace"
> schemaLocation="schema2.xsd"/>)
> ---- schema2.xsd (let say this schema import schema3 using <xsd:import
> namespace="namespace" schemaLocation="_/schema3.xsd"/>)
> ---- _
> ------ schema3.xsd (this import schema 4)
> ------ _
> -------- schema4.xsd
>
> I can get ExampleService deployed successfully, and it is exposing the
> right WSDL (using originalWsdl set to true).
> However, when I try to access the WSDL and get all references, it failed
> because it cannot find some references...
>
> I've digging more, and found out that Axis2 using replacing some relative
> URL to be something like this format - [ServiceName]?xsd=path/to/xsd
> This is fine for the XSD that directly imported by WSDL, but not for the
> XSD imported by ther XSD.
> Axis2 does not change import definition to <xsd:import
> namespace="namespace" schemaLocation="ServiceName?xsd=_/_/schema3.xsd"/> to
> import schema3.
>
> Is this the right behavior of Axis2? Does't it support nested import?
> Please give me some insight.
>
> Regards,
> Sukma
>