aspose file tools
The moose likes Web Services and the fly likes a strange param of a WS Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "a strange param of a WS" Watch "a strange param of a WS" New topic
Author

a strange param of a WS

yaoheng zhang
Greenhorn

Joined: Jun 04, 2004
Posts: 3
I am writing a client of this service:
http://ws.keyfortravel.com/Air/airfares.asmx?WSDL

This .Net site provides a test page of the operation:
http://ws.keyfortravel.com/Air/airfares.asmx?op=GetFares

totally confused by the first parameter "xml", type String.
Using this test page, I don't have to input anything and it works fine. But in my code, I tried new String() and null, axis throws exception.

Anyone get clue on this? Many thanks

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NumberFormatException: Invalid positiveInteger: 0
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.lang.NumberFormatException: Invalid positiveInteger: 0
at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:506)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:838)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:198)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:323)
at org.apache.axis.client.Call.invoke(Call.java:2418)
at org.apache.axis.client.Call.invoke(Call.java:2317)
at org.apache.axis.client.Call.invoke(Call.java:1774)
at pt.viatecla.k4t.k4t.AirFares.K4TAirFaresWSSoapStub.getFares(K4TAirFaresWSSoapStub.java:362)
at pt.viatecla.k4t.k4t.AirFares.K4TAirFaresWSTestCase.test1K4TAirFaresWSSoapGetFares(K4TAirFaresWSTestCase.java:34)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35257
    
    7
Hello "yaoheng"-

Welcome to JavaRanch.

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.

Enyoy your time here.


Android appsImageJ pluginsJava web charts
yaoheng zhang
Greenhorn

Joined: Jun 04, 2004
Posts: 3
seems the date params cause the exception, but still don't know how to deal with it.

i send the data format like 01/10, the client works and web services return a error message said the invalid data. But if i send 2006/02/01, axis throws exceptions as it in the previous post.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a strange param of a WS
 
Similar Threads
Error running example2 AXIS/Tomcat 4.1
Unable to test webservice using a client
Confused about axis deserializer (it don't work!)
AxisFault : Couldn't find deserializer for type
Need Help regarding -- org.xml.sax.SAXException: Invalid element