Just wondering if anyone can help me out I am calling a SOAP service but it
is being called twice, firstly with a document set to null and then with the
XML document I have specified.
Below is the calling method:
public String execute() throws Exception{
try{
String endpoint =
"http://localhost:8080/axis/services/acmemsgservice";
InputStream is =
ClassLoader.getSystemResourceAsStream("PurchaseOrder.xml");
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(endpoint);
SOAPEnvelope env = new SOAPEnvelope();
SOAPBodyElement ele = new SOAPBodyElement(is);
ele.setNamespaceURI("http://localhost:8080/axis/services/acmemsgservice");
env.addBodyElement(ele);
SOAPEnvelope elms = (SOAPEnvelope)call.invoke(env);
SOAPBodyElement elem = elms.getFirstBody();
Element e = elem.getAsDOM();
str = XMLUtils.ElementToString(e);
}catch(Exception e){
e.printStackTrace();
}
return str;
}
Anyone have any idea why 2 calls to the service are being made?
Thanks
Mark
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 25/11/2002