Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a strange param of a WS

 
yaoheng zhang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
yaoheng zhang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic