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 Gertjan van Oosten <ge...@West.NL> on 2007/07/24 14:33:07 UTC
How to provide own WSDL?
I've set up a webapp following Dims' tutorial at:
http://wso2.org/library/90
I want to return my own WSDL from the service by setting
<parameter name="useOriginalwsdl">true</parameter>
but where do I need to put the WSDL file (and the schemata it includes)?
I tried the obvious places but I get either the standard reply[*]
or zero-length content.
[*] <error><description>Unable to generate WSDL 1.1 for this service</description><reason>If you wish Axis2 to automatically generate the WSDL 1.1, then please +set useOriginalwsdl as false in your services.xml</reason></error>
Regards,
--
-- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Bug in WSDL generation?
Posted by Davanum Srinivas <da...@gmail.com>.
Jira please!
thanks,
dims
On 7/25/07, Nadir Amra <am...@us.ibm.com> wrote:
> Here is the problem. I deploy a POJO and when AXIS2 (using nightly build
> 2007/07/25) automatically generated WSDL via ?wsdl it produces a WSDL file
> the includes the following:
>
> <xs:complexType name="CONVERTTEMPInput">
> <xs:sequence>
> <xs:element minOccurs="0" name="tEMPIN" nillable="true"
> type="xs:string"/>
> <xs:element minOccurs="0" name="tEMPOUT" nillable="true"
> type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
>
> <xs:complexType name="CONVERTTEMPResult">
> <xs:sequence>
> <xs:element minOccurs="0" name="tEMPIN" nillable="true"
> type="xs:string"/>
> <xs:element minOccurs="0" name="tEMPOUT" nillable="true"
> type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
>
>
> The problem is with the element names. It seems that AXIS2 is lowercasing
> the "t" in TEMPIN and TEMPOUT, which makes the service unusable. The
> CONVERTTEMPInput class is as follows:
>
>
> public class CONVERTTEMPInput implements Serializable
> {
> private static final long serialVersionUID = -884605419035002637L;
>
> public CONVERTTEMPInput() { }
>
>
> public void setTEMPIN( String TEMPIN )
> {
> _TEMPIN = TEMPIN;
> }
>
> public String getTEMPIN( )
> {
> return _TEMPIN;
> }
>
> public void setTEMPOUT( String TEMPOUT )
> {
> _TEMPOUT = TEMPOUT;
> }
>
> public String getTEMPOUT( )
> {
> return _TEMPOUT;
> }
>
> private String _TEMPIN = "";
> private String _TEMPOUT = "";
>
> }
>
> If I add an underscore prior to TEMPIN and TEMPOUT in the methods, things
> start to work.
>
> Is this a bug?
>
> Nadir K. Amra
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Gertjan van Oosten <ge...@West.NL>.
As quoted from Davanum Srinivas <da...@gmail.com>:
> Please log a bug in JIRA, you can upload the zip there too.
Done (AXIS2-3081). I was unsure which Components to select, so I left
that blank.
Kind regards,
--
-- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Davanum Srinivas <da...@gmail.com>.
Please log a bug in JIRA, you can upload the zip there too.
-- dims
On 8/6/07, Gertjan van Oosten <ge...@west.nl> wrote:
> [Second attempt, the first one failed because of:
>
> <di...@apache.org>: host mx1.eu.apache.org[192.87.106.230] said: 552 Message
> rejected as it is spam (body) (in reply to end of DATA command)
>
> <ax...@ws.apache.org>: host mx1.us.apache.org[140.211.11.136] said: 552
> Message rejected as it is spam (body) (in reply to end of DATA command)
>
> which is a complete load of you-know-what...]
>
> As quoted from Gertjan van Oosten <ge...@West.NL>:
> > As quoted from Davanum Srinivas <da...@gmail.com>:
> > > Option #1.
> > >
> > > On 7/24/07, Gertjan van Oosten <ge...@west.nl> wrote:
> > > >As quoted from Davanum Srinivas <da...@gmail.com>:
> > > >> Please add the wsdl/xsd under meta-inf directory.
> > > >>
> > > >> WEB-INF/services/BookService/META-INF
> > > >
> > > >I have WEB-INF/services/my-services/META-INF/services.xml
> > > >which contains various services (MyFirstService, MySecondService,
> > > >and so on). Do I put the WSDL and XSD under:
> > > >
> > > > WEB-INF/services/my-services/META-INF/services.xml
> > > > MyFirstService.wsdl
> > > > MySecondService.wsdl
> > > > ...
> > > > xsd0.xsd
> > > > xsd1.xsd
> > > > ...
> >
> > If I do that, getting the WSDL:
> > http://localhost:8080/my-webapp/services/MyFirstService?wsdl
> > returns exactly 0 bytes, and my web services throw an exception:
> [...]
>
> Since apparently nothing has happened (the bug is still there with
> 1.3-RC3) I have slightly modified Dims' book example from
> http://wso2.org/library/90 . The changes are:
>
> - simplified pom.xml and updated it to use 1.3-RC3
>
> - created two services.xml files called services.xml.distrib i.e. the
> original one that works, and services.xml.fails which only difference
> is that the name of the service has been changed from BookService to
> OldBookService:
>
> % diff src/webapp/WEB-INF/services/BookService/META-INF/services.xml.{distrib,fails}
> 2c2
> < <service name="BookService"
> ---
> > <service name="OldBookService"
>
> If I use the services.xml.fails, it fails. It appears Axis2 does not
> correctly handle a situation where the name of a service in the
> services.xml does not match the name of the directory under services/.
>
> Complete axis2-book.zip and build logs that show the problem available
> upon request, since the stupid mailservers at the other end think I'm
> spamming them if I attach them.
>
> Kind regards,
> --
> -- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Gertjan van Oosten <ge...@West.NL>.
[Second attempt, the first one failed because of:
<di...@apache.org>: host mx1.eu.apache.org[192.87.106.230] said: 552 Message
rejected as it is spam (body) (in reply to end of DATA command)
<ax...@ws.apache.org>: host mx1.us.apache.org[140.211.11.136] said: 552
Message rejected as it is spam (body) (in reply to end of DATA command)
which is a complete load of you-know-what...]
As quoted from Gertjan van Oosten <ge...@West.NL>:
> As quoted from Davanum Srinivas <da...@gmail.com>:
> > Option #1.
> >
> > On 7/24/07, Gertjan van Oosten <ge...@west.nl> wrote:
> > >As quoted from Davanum Srinivas <da...@gmail.com>:
> > >> Please add the wsdl/xsd under meta-inf directory.
> > >>
> > >> WEB-INF/services/BookService/META-INF
> > >
> > >I have WEB-INF/services/my-services/META-INF/services.xml
> > >which contains various services (MyFirstService, MySecondService,
> > >and so on). Do I put the WSDL and XSD under:
> > >
> > > WEB-INF/services/my-services/META-INF/services.xml
> > > MyFirstService.wsdl
> > > MySecondService.wsdl
> > > ...
> > > xsd0.xsd
> > > xsd1.xsd
> > > ...
>
> If I do that, getting the WSDL:
> http://localhost:8080/my-webapp/services/MyFirstService?wsdl
> returns exactly 0 bytes, and my web services throw an exception:
[...]
Since apparently nothing has happened (the bug is still there with
1.3-RC3) I have slightly modified Dims' book example from
http://wso2.org/library/90 . The changes are:
- simplified pom.xml and updated it to use 1.3-RC3
- created two services.xml files called services.xml.distrib i.e. the
original one that works, and services.xml.fails which only difference
is that the name of the service has been changed from BookService to
OldBookService:
% diff src/webapp/WEB-INF/services/BookService/META-INF/services.xml.{distrib,fails}
2c2
< <service name="BookService"
---
> <service name="OldBookService"
If I use the services.xml.fails, it fails. It appears Axis2 does not
correctly handle a situation where the name of a service in the
services.xml does not match the name of the directory under services/.
Complete axis2-book.zip and build logs that show the problem available
upon request, since the stupid mailservers at the other end think I'm
spamming them if I attach them.
Kind regards,
--
-- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Gertjan van Oosten <ge...@West.NL>.
As quoted from Davanum Srinivas <da...@gmail.com>:
> Option #1.
>
> On 7/24/07, Gertjan van Oosten <ge...@west.nl> wrote:
> >As quoted from Davanum Srinivas <da...@gmail.com>:
> >> Please add the wsdl/xsd under meta-inf directory.
> >>
> >> WEB-INF/services/BookService/META-INF
> >
> >I have WEB-INF/services/my-services/META-INF/services.xml
> >which contains various services (MyFirstService, MySecondService,
> >and so on). Do I put the WSDL and XSD under:
> >
> > WEB-INF/services/my-services/META-INF/services.xml
> > MyFirstService.wsdl
> > MySecondService.wsdl
> > ...
> > xsd0.xsd
> > xsd1.xsd
> > ...
If I do that, getting the WSDL:
http://localhost:8080/my-webapp/services/MyFirstService?wsdl
returns exactly 0 bytes, and my web services throw an exception:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 24 Jul 2007 14:21:38 GMT
Connection: close
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>The service cannot be found for the endpoint reference (EPR) http://localhost:8080/my-webapp-ws/services/MyFirstService</faultstring><detail><Exception>org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) http://localhost:8080/my-webapp/services/MyFirstService
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:63)
at org.apache.axis2.engine.Phase.invoke(Phase.java:308)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:276)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
</Exception></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
So what now?
Kind regards,
--
-- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Bug in WSDL generation?
Posted by Nadir Amra <am...@us.ibm.com>.
Here is the problem. I deploy a POJO and when AXIS2 (using nightly build
2007/07/25) automatically generated WSDL via ?wsdl it produces a WSDL file
the includes the following:
<xs:complexType name="CONVERTTEMPInput">
<xs:sequence>
<xs:element minOccurs="0" name="tEMPIN" nillable="true"
type="xs:string"/>
<xs:element minOccurs="0" name="tEMPOUT" nillable="true"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CONVERTTEMPResult">
<xs:sequence>
<xs:element minOccurs="0" name="tEMPIN" nillable="true"
type="xs:string"/>
<xs:element minOccurs="0" name="tEMPOUT" nillable="true"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
The problem is with the element names. It seems that AXIS2 is lowercasing
the "t" in TEMPIN and TEMPOUT, which makes the service unusable. The
CONVERTTEMPInput class is as follows:
public class CONVERTTEMPInput implements Serializable
{
private static final long serialVersionUID = -884605419035002637L;
public CONVERTTEMPInput() { }
public void setTEMPIN( String TEMPIN )
{
_TEMPIN = TEMPIN;
}
public String getTEMPIN( )
{
return _TEMPIN;
}
public void setTEMPOUT( String TEMPOUT )
{
_TEMPOUT = TEMPOUT;
}
public String getTEMPOUT( )
{
return _TEMPOUT;
}
private String _TEMPIN = "";
private String _TEMPOUT = "";
}
If I add an underscore prior to TEMPIN and TEMPOUT in the methods, things
start to work.
Is this a bug?
Nadir K. Amra
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Davanum Srinivas <da...@gmail.com>.
Option #1.
On 7/24/07, Gertjan van Oosten <ge...@west.nl> wrote:
> As quoted from Davanum Srinivas <da...@gmail.com>:
> > Please add the wsdl/xsd under meta-inf directory.
> >
> > WEB-INF/services/BookService/META-INF
>
> I have WEB-INF/services/my-services/META-INF/services.xml
> which contains various services (MyFirstService, MySecondService,
> and so on). Do I put the WSDL and XSD under:
>
> WEB-INF/services/my-services/META-INF/services.xml
> MyFirstService.wsdl
> MySecondService.wsdl
> ...
> xsd0.xsd
> xsd1.xsd
> ...
>
> or do I create:
>
> WEB-INF/services/MyFirstService/META-INF/
> MyFirstService.wsdl
> xsd0.xsd
> xsd1.xsd
> ...
>
> WEB-INF/services/MySecondService/META-INF/
> MySecondService.wsdl
> xsd0.xsd
> xsd1.xsd
> ...
>
> etc.?
>
> Kind regards,
> --
> -- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Gertjan van Oosten <ge...@West.NL>.
As quoted from Davanum Srinivas <da...@gmail.com>:
> Please add the wsdl/xsd under meta-inf directory.
>
> WEB-INF/services/BookService/META-INF
I have WEB-INF/services/my-services/META-INF/services.xml
which contains various services (MyFirstService, MySecondService,
and so on). Do I put the WSDL and XSD under:
WEB-INF/services/my-services/META-INF/services.xml
MyFirstService.wsdl
MySecondService.wsdl
...
xsd0.xsd
xsd1.xsd
...
or do I create:
WEB-INF/services/MyFirstService/META-INF/
MyFirstService.wsdl
xsd0.xsd
xsd1.xsd
...
WEB-INF/services/MySecondService/META-INF/
MySecondService.wsdl
xsd0.xsd
xsd1.xsd
...
etc.?
Kind regards,
--
-- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Davanum Srinivas <da...@gmail.com>.
Sorry, I misread your email.
Please add the wsdl/xsd under meta-inf directory.
WEB-INF/services/BookService/META-INF
thanks,
dims
On 7/24/07, Gertjan van Oosten <ge...@west.nl> wrote:
> As quoted from Davanum Srinivas <da...@gmail.com>:
> > Please add that in your services.xml
>
> Pardon my ignorance, but add what to my services.xml? I already have
> the
> <parameter name="useOriginalwsdl">true</parameter>
> in there; the question was: where do I put the WSDL file and XML schemata
> themselves such that the Axis2 service handler is able to find them?
>
> Kind regards,
> --
> -- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Gertjan van Oosten <ge...@West.NL>.
As quoted from Davanum Srinivas <da...@gmail.com>:
> Please add that in your services.xml
Pardon my ignorance, but add what to my services.xml? I already have
the
<parameter name="useOriginalwsdl">true</parameter>
in there; the question was: where do I put the WSDL file and XML schemata
themselves such that the Axis2 service handler is able to find them?
Kind regards,
--
-- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: How to provide own WSDL?
Posted by Davanum Srinivas <da...@gmail.com>.
Please add that in your services.xml
-- dims
On 7/24/07, Gertjan van Oosten <ge...@west.nl> wrote:
> I've set up a webapp following Dims' tutorial at:
> http://wso2.org/library/90
>
> I want to return my own WSDL from the service by setting
> <parameter name="useOriginalwsdl">true</parameter>
> but where do I need to put the WSDL file (and the schemata it includes)?
>
> I tried the obvious places but I get either the standard reply[*]
> or zero-length content.
>
> [*] <error><description>Unable to generate WSDL 1.1 for this service</description><reason>If you wish Axis2 to automatically generate the WSDL 1.1, then please +set useOriginalwsdl as false in your services.xml</reason></error>
>
>
> Regards,
> --
> -- Gertjan van Oosten, gertjan@West.NL, West Consulting B.V., +31 15 2191 600
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org