aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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 ]
 
 
subject: Exception in parsing returning data