This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Exception in parsing returning data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Exception in parsing returning data" Watch "Exception in parsing returning data" New topic
Author

Exception in parsing returning data

naveen jain
Greenhorn

Joined: Oct 02, 2008
Posts: 16
hi,
i am using axis libraries for web service.i am trying to create a web service client that calls a web service function which returns a hasp map object
but how can i set return type of this call.

Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationName( new QName("http://203.187.192.19:8080/axis/services
/AtomService", "get_cust_info") );
HashMap hsmap= (HashMap) call.invoke( new Object[] { args[ 0 ] } );


this code gives "org.xml.sax.SAXParseException: Premature end of file."
exception


please help me.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Originally posted by naveen jain:
i am trying to create a web service client that calls a web service function which returns a hasp map object.


Are you sure that it returns a HashMap? Axis 1.x doesn't support that out of the box. To return a HashMap you would have to write a custom serializer/deserializer and deploy it on both the server and client side. XML, XML Schema, SOAP and WSDL have no idea what a Java HashMap is. It is more likely that the web service returns an array. See Use collection types with SOAP and JAX-RPC

How to Get Help with SOAP web services
[ November 27, 2008: Message edited by: Peer Reynders ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in parsing returning data
 
Similar Threads
passing collection object as an argument to Web service
how to consume webservice in Axis
How to invoke a webservice in .net from servlet application
Returning map / list with axis ws
Run Servlet on deployment