I have a simple code to get the return valus form service and get SOAP response Envelope data. But I need to call the service twice.
How can I get the both data and response Envelope string by only calling the service only once??
// part 1. get the return values Response resp = call.invoke(new URL(serviceUrlString), ""); //(1) Parameter retValue = resp.getReturnValue(); Object value = retValue.getValue();
// part 2. get SOAP response Envelope data SOAPMappingRegistry smr = call.getSOAPMappingRegistry(); SOAPContext reqCtx = call.getSOAPContext(); Envelope callEnv = call.buildEnvelope(); SOAPHTTPConnection st = (SOAPHTTPConnection)call.getSOAPTransport(); st.send(new URL(serviceUrlString), "", null, null, smr,reqCtx); //(2) String soapResponseStr = call.getEnvelopeString(st);
Thanks,
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35256
7
posted
0
What kind of class is "Response"? Neither the J2EE 1.4 nor the Axis 1.2 docs have such a class. It's generally possible to obtain the SOAP envelope from the response of a WS call, though.