Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

a strange param of a WS

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic