• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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
 
Honk if you love justice! And honk twice for tiny ads!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic