• Post Reply Bookmark Topic Watch Topic
  • New Topic

boolean parameter type over SOAP  RSS feed

 
Chris Stabler
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ive created a web service with one of the methods requiring a boolean parameter type. i am using Axis2 and Eclipse with Tomcat/Apache as the service backend.

I have a standalone application that uses the method and there seems to be no problem. Someone else tries to create a C# main app when building the stub from the WSDL and for some reason there is an error on the server side:

Caused by: java.lang.NumberFormatException: For input string: "false"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:410)
at java.lang.Long.<init>(Long.java:678)
at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:108)
at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:715)
at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:641)
at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:602)
at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:153)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:188)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
... 19 more


At first the parameter type was Boolean(the object) then i changed it to the primitive type and still got the same error.

Was wondering at first glance, if someone has had experience with SOAP protocols being incompatible with C# using boolean parameters? what should i check for? If you want to see the WSDL XML i can furnish that for you if that would help.

Thanks a lot in advance. (meant to post this earlier but somehow it didnt take for some reason).
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you tried to substitute "true" with "1" and "false" with "0" for boolean values?
I recall having read something about this somewhere, but cannot seem to find any references now.
Best wishes!
 
Markus Zimmer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I apologize for bringing this topic up again, but i have exactly the same problem.

Webservice: Java AXIS2
Client: gSoap for C++

When I try to send my SOAP-message (which contains a boolean) I receive the following: "java.lang.NumberFormatException: For input string: "false"". I also attempted it with the xsd-boolean-datatype (from gSoap) but the problem still persists.

I'd be grateful for any tips or solutions you might be able to offer.

Thank you very much in advance,
Markus
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!