• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling a webservice

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have generated webservices stub using axis 1.4 tool kit.
When I am calling the webservice with the below client it's error
------------------------------------------------------------

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

import com.hp.oo.service.ws.SendStatusRequest;
import com.hp.oo.service.ws.SendStatusResponse;

import javax.xml.namespace.QName;

public class testClient {
public static void main(String [] args) {
try {
String endpoint = "http://localhost:7001/axis/services/HPOOWebService";

Service service = new Service();
Call call = (Call) service.createCall();



call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://com/hp/oo/service/", "sendStatus"));

SendStatusRequest req = new SendStatusRequest();
req.setAppId("0");
req.setCustomerId("0");

SendStatusResponse res = (SendStatusResponse) call.invoke( new Object[] { req} );

System.out.println("Return Value" + res.getErrorCode() + "'");
System.out.println("Return Value" + res.getErrorText() + "'");
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
----------------------------
error
------
- Exception:
org.xml.sax.SAXException: Deserializing parameter 'sendStatusReturn': could not find deserializer for type {urn:com.hp.oo.service}SendStatusResponse
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.bt.client.testClient.main(testClient.java:44)
org.xml.sax.SAXException: Deserializing parameter 'sendStatusReturn': could not find deserializer for type {urn:com.hp.oo.service}SendStatusResponse

----------------------------
can any one help me to resolve this
 
Water proof donuts! Eat them while reading this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic