Hi, Please help me with my newbie question. I'm doing call.invoke( env ) where env is Axis's SOAPEnvelope and I'm trying to find a way to pass a parameter to the server and still use call.invoke( env ) I need to use call.invoke and since I have to sign/encrypt the SOAPEnvelope eventually.
Client: Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(opts.getURL())); SOAPEnvelope env = new SOAPEnvelope(); SOAPBodyElement sbe = new SOAPBodyElement(XMLUtils.StringToElement("http://localhost:8080/LogTestServi ce", "testMethod", "myMessage")); env.addBodyElement( sbe ); call.invoke(env); This sample code would generate a SOAP message that looks like <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns1:testMethod xmlns:ns1="http://localhost:8080/LogTestService"> myMessage </ns1:testMethod> </soapenv:Body> </soapenv:Envelope> >From the server side, testMethod gets invoked correctly, but how would I retrieve the value of this element - my Message? public String testMethod() { // ? what to do here to retrieve the value of the message? return "Hi, you've reached the testMethod."; } Thanks for your time! Lee