Hi Mark, I have deployed an echo service on my axis and tried using your code. (The only difference is that I have used FileInputStream instead of PurchaseOrder.xml) It makes a single call. Is it possible that your external code is calling the execute() method twice ?
I can try it again with your service code and file PurchaseOrder.xml if you post it. Regards, Abhinav -----Original Message----- From: Mark Melia [mailto:[EMAIL PROTECTED] Sent: Sunday, January 18, 2004 11:49 PM To: [EMAIL PROTECTED] Subject: RE: Service being called Twice 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
