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 Ulrich Kroener <kr...@yahoo.com> on 2008/01/15 19:38:39 UTC
[Axis2]: POJO service bombs with empty non-nullable argument
Hello,
I had been facing an issue, which I succeeded in reproducing on the quickstart sample in the
StockQuoteService class.
In the StockQuoteService class, add a method, say,
public double getPrice2(String symbol, boolean b) {
Double price = (Double) map.get(symbol);
if(price != null){
return price.doubleValue();
}
return 42.00;
}
Build and install as usual on Axis2 (I used Tomcat 5.5 as the container).
There is a resulting WSDL, but there is nothing extraordinary to it, so I'll just skip it.
Using the Eclipse Web Services Explorer, invoke the service, but leave the boolean element empty:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:q0="http://quickstart.samples/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:getPrice2 />
</soapenv:Body>
</soapenv:Envelope>
And here is the error message (very informative):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>unknown</faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
If you fill in the boolean argument, you get output as usual.
It would sure help if the error message were more informative.
Thanks in advance,
Ulrich Kroener
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2]: POJO service bombs with empty non-nullable argument
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hmm , if your service class have variable like boolean , or int then you
have to send that. So in this case you are supposed to send the boolean
value.
-Deepal
> Hello,
>
> I had been facing an issue, which I succeeded in reproducing on the quickstart sample in the
> StockQuoteService class.
>
> In the StockQuoteService class, add a method, say,
>
> public double getPrice2(String symbol, boolean b) {
> Double price = (Double) map.get(symbol);
> if(price != null){
> return price.doubleValue();
> }
> return 42.00;
> }
>
> Build and install as usual on Axis2 (I used Tomcat 5.5 as the container).
>
> There is a resulting WSDL, but there is nothing extraordinary to it, so I'll just skip it.
>
> Using the Eclipse Web Services Explorer, invoke the service, but leave the boolean element empty:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:q0="http://quickstart.samples/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <q0:getPrice2 />
> </soapenv:Body>
> </soapenv:Envelope>
>
> And here is the error message (very informative):
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server</faultcode>
> <faultstring>unknown</faultstring>
> <detail />
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
> If you fill in the boolean argument, you get output as usual.
>
> It would sure help if the error message were more informative.
>
> Thanks in advance,
>
>
>
>
> Ulrich Kroener
>
>
>
> ____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> 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