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 Tobias Seng <to...@dev.unitedplanet.de> on 2007/05/25 13:25:06 UTC

[Axis2] Howto register own xsd referenced from own wsdl

Hi,

I tried to register a webservice aar containing an own wsdl and an own xsd.
If the wsdl does not import the xsd everything works fine.
I can call
    http://localhost/axis2/services/TestWS?wsdl
and
    http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
and I get the expected result.

But if I import the xsd into the wsdl like one of the following
    <xsd:import namespace="mynamespace" schemaLocation="?xsd=myxsd.xsd" />
or
    <xsd:import namespace="mynamespace" 
schemaLocation="TestWS?xsd=myxsd.xsd" />
or
    <xsd:import namespace="mynamespace" 
schemaLocation="http://localhost/axis2/services/TestWS?xsd=myxsd.xsd" />
the following error occurs.

 javax.wsdl.WSDLException: WSDLException (at 
/wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR: 
Problem parsing 'http://localhost/axis2/services/TestWS?xsd=myxsd.xsd'.: 
java.io.IOException: Server returned HTTP response code: 500 for URL: 
http://localhost/axis2/services/TestWS?xsd=myxsd.xsd

Of cause I can write the following input element to the wsdl
    <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
and the registration works, but than I have to put the xsd outside of my 
aar file to the root location.

Any ideas?

Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Tobias Seng <to...@dev.unitedplanet.de>.
see JIRA  AXIS2-2736
or
https://issues.apache.org/jira/browse/AXIS2-2736

thanks Tobias

Davanum Srinivas wrote:
> Are u using 1.2 final? Can you create a JIRA and upload your aar?



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Davanum Srinivas <da...@gmail.com>.
or was it ...need to check the code again.

http://localhost/axis2/services/my.wsdl
http://localhost/axis2/services/myxsd.xsd


-- dims

On 5/25/07, Davanum Srinivas <da...@gmail.com> wrote:
> Are u using 1.2 final? Can you create a JIRA and upload your aar? is
> your myxsd.xsd and wsdl inside the META-INF directory of the aar? i
> think i added support for the following too...
>
> http://localhost/axis2/services/TestWS/my.wsdl
> http://localhost/axis2/services/TestWS/myxsd.xsd
>
> thanks,
> dims
>
> On 5/25/07, Tobias Seng <to...@dev.unitedplanet.de> wrote:
> >
> >     http://localhost/axis2/services/TestWS/myxsd.xsd
> > does not work.
> >
> > And of cause this is not the problem.
> > Using any WS client or IDE analysing the wsdl containing an import like
> >     <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
> > I think they would try to load the xsd from
> >     http://localhost/axis2/services/myxsd.xsd
> >
> > So my idea was to address the schemaLocation absolute (not so nice but
> > possible), but as I mentioned this does not work.
> >
> > Tobias
> > > Try http://localhost/axis2/services/TestWS/myxsd.xsd because we need
> > > to know which aar the xsd is in...
> > >
> > > -- dims
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Davanum Srinivas <da...@gmail.com>.
Are u using 1.2 final? Can you create a JIRA and upload your aar? is
your myxsd.xsd and wsdl inside the META-INF directory of the aar? i
think i added support for the following too...

http://localhost/axis2/services/TestWS/my.wsdl
http://localhost/axis2/services/TestWS/myxsd.xsd

thanks,
dims

On 5/25/07, Tobias Seng <to...@dev.unitedplanet.de> wrote:
>
>     http://localhost/axis2/services/TestWS/myxsd.xsd
> does not work.
>
> And of cause this is not the problem.
> Using any WS client or IDE analysing the wsdl containing an import like
>     <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
> I think they would try to load the xsd from
>     http://localhost/axis2/services/myxsd.xsd
>
> So my idea was to address the schemaLocation absolute (not so nice but
> possible), but as I mentioned this does not work.
>
> Tobias
> > Try http://localhost/axis2/services/TestWS/myxsd.xsd because we need
> > to know which aar the xsd is in...
> >
> > -- dims
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Tobias Seng <to...@dev.unitedplanet.de>.
    http://localhost/axis2/services/TestWS/myxsd.xsd
does not work.

And of cause this is not the problem.
Using any WS client or IDE analysing the wsdl containing an import like
    <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
I think they would try to load the xsd from
    http://localhost/axis2/services/myxsd.xsd

So my idea was to address the schemaLocation absolute (not so nice but 
possible), but as I mentioned this does not work.

Tobias
> Try http://localhost/axis2/services/TestWS/myxsd.xsd because we need
> to know which aar the xsd is in...
>
> -- dims


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Davanum Srinivas <da...@gmail.com>.
Try http://localhost/axis2/services/TestWS/myxsd.xsd because we need
to know which aar the xsd is in...

-- dims

On 5/25/07, Tobias Seng <to...@dev.unitedplanet.de> wrote:
> Yes I tried this, and both
>     http://localhost/axis2/services/TestWS?wsdl
>     http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
> works.
>
> But I think the address for the xsd than should be
>     http://localhost/axis2/services/myxsd.xsd
> and this does not work.
>
> Thanks Tobias
>
>
> > Did you try the obvious?
> >
> > <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
> >
> > And drop both the wsdl and xsd into the aar?
> >
> > and check if the following works?
> >
> > http://localhost/axis2/services/TestWS?wsdl
> >
> >
> > thanks,
> > dims
> >
> > On 5/25/07, Tobias Seng <to...@dev.unitedplanet.de> wrote:
> >> Hi,
> >>
> >> I tried to register a webservice aar containing an own wsdl and an
> >> own xsd.
> >> If the wsdl does not import the xsd everything works fine.
> >> I can call
> >>     http://localhost/axis2/services/TestWS?wsdl
> >> and
> >>     http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
> >> and I get the expected result.
> >>
> >> But if I import the xsd into the wsdl like one of the following
> >>     <xsd:import namespace="mynamespace"
> >> schemaLocation="?xsd=myxsd.xsd" />
> >> or
> >>     <xsd:import namespace="mynamespace"
> >> schemaLocation="TestWS?xsd=myxsd.xsd" />
> >> or
> >>     <xsd:import namespace="mynamespace"
> >> schemaLocation="http://localhost/axis2/services/TestWS?xsd=myxsd.xsd" />
> >> the following error occurs.
> >>
> >>  javax.wsdl.WSDLException: WSDLException (at
> >> /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR:
> >> Problem parsing 'http://localhost/axis2/services/TestWS?xsd=myxsd.xsd'.:
> >> java.io.IOException: Server returned HTTP response code: 500 for URL:
> >> http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
> >>
> >> Of cause I can write the following input element to the wsdl
> >>     <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
> >> and the registration works, but than I have to put the xsd outside of my
> >> aar file to the root location.
> >>
> >> Any ideas?
> >>
> >> Tobias
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Tobias Seng <to...@dev.unitedplanet.de>.
Yes I tried this, and both
    http://localhost/axis2/services/TestWS?wsdl
    http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
works.

But I think the address for the xsd than should be
    http://localhost/axis2/services/myxsd.xsd
and this does not work.

Thanks Tobias


> Did you try the obvious?
>
> <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
>
> And drop both the wsdl and xsd into the aar?
>
> and check if the following works?
>
> http://localhost/axis2/services/TestWS?wsdl
>
>
> thanks,
> dims
>
> On 5/25/07, Tobias Seng <to...@dev.unitedplanet.de> wrote:
>> Hi,
>>
>> I tried to register a webservice aar containing an own wsdl and an 
>> own xsd.
>> If the wsdl does not import the xsd everything works fine.
>> I can call
>>     http://localhost/axis2/services/TestWS?wsdl
>> and
>>     http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
>> and I get the expected result.
>>
>> But if I import the xsd into the wsdl like one of the following
>>     <xsd:import namespace="mynamespace" 
>> schemaLocation="?xsd=myxsd.xsd" />
>> or
>>     <xsd:import namespace="mynamespace"
>> schemaLocation="TestWS?xsd=myxsd.xsd" />
>> or
>>     <xsd:import namespace="mynamespace"
>> schemaLocation="http://localhost/axis2/services/TestWS?xsd=myxsd.xsd" />
>> the following error occurs.
>>
>>  javax.wsdl.WSDLException: WSDLException (at
>> /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR:
>> Problem parsing 'http://localhost/axis2/services/TestWS?xsd=myxsd.xsd'.:
>> java.io.IOException: Server returned HTTP response code: 500 for URL:
>> http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
>>
>> Of cause I can write the following input element to the wsdl
>>     <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
>> and the registration works, but than I have to put the xsd outside of my
>> aar file to the root location.
>>
>> Any ideas?
>>
>> Tobias
>>
>>
>> ---------------------------------------------------------------------
>> 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: [Axis2] Howto register own xsd referenced from own wsdl

Posted by Davanum Srinivas <da...@gmail.com>.
Did you try the obvious?

<xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />

And drop both the wsdl and xsd into the aar?

and check if the following works?

http://localhost/axis2/services/TestWS?wsdl


thanks,
dims

On 5/25/07, Tobias Seng <to...@dev.unitedplanet.de> wrote:
> Hi,
>
> I tried to register a webservice aar containing an own wsdl and an own xsd.
> If the wsdl does not import the xsd everything works fine.
> I can call
>     http://localhost/axis2/services/TestWS?wsdl
> and
>     http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
> and I get the expected result.
>
> But if I import the xsd into the wsdl like one of the following
>     <xsd:import namespace="mynamespace" schemaLocation="?xsd=myxsd.xsd" />
> or
>     <xsd:import namespace="mynamespace"
> schemaLocation="TestWS?xsd=myxsd.xsd" />
> or
>     <xsd:import namespace="mynamespace"
> schemaLocation="http://localhost/axis2/services/TestWS?xsd=myxsd.xsd" />
> the following error occurs.
>
>  javax.wsdl.WSDLException: WSDLException (at
> /wsdl:definitions/wsdl:types/xsd:schema): faultCode=PARSER_ERROR:
> Problem parsing 'http://localhost/axis2/services/TestWS?xsd=myxsd.xsd'.:
> java.io.IOException: Server returned HTTP response code: 500 for URL:
> http://localhost/axis2/services/TestWS?xsd=myxsd.xsd
>
> Of cause I can write the following input element to the wsdl
>     <xsd:import namespace="mynamespace" schemaLocation="myxsd.xsd" />
> and the registration works, but than I have to put the xsd outside of my
> aar file to the root location.
>
> Any ideas?
>
> Tobias
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org