Hello, I am trying to create a JSP with an html form which would let the client provide a request SOAP message in a form element and expect the SOAP response message from my service in another textarea form element in the same JSP. To acheive this, I'm having issues with two things: 1. Passing the SOAP tags in the input xml string to the client stub - if I remove the soap envelope, header and body tags and just supply the content xml of soap body it works fine. If I put the soap tags I get the exception - Unexpected sublement body.... 2. Getting the xml string representation of the full response message (including the soap tags) that I have designed to be set in the session.setAttribute that my JSP will read from and display the contents in the form element. I have been trying to find a way to be able to serialize the response message in my Skeleton and/or callbackHandler classes. I am able to do this and get a string representation of the response of the contents of the onwards. public class MyCallbackHandler extends MyServiceCallbackHandler { private String responseXml; //To be able to get this value in my Client Stub wrapper. public void receiveResultMyRequest(client.MyServiceStub.MyResponse result) { try { OMElement omElement = result.getOMElement(client.MyServiceStub.MyResponse.MY_QNAME,OMAbstractFactory.getOMFactory()); String omElementString = omElement.toStringWithConsume(); //Also tried omElement.getBuilder.getDocumentElement().toStringWithConsume(); - no difference! System.out.println("Response xml in callbackHandler="+omElementString); setResponseXml(omElementString); }catch (ADBException adb){ adb.printStackTrace(); } }
This above code just gives me the xml representation of the contents in the But, I need the soap wrapper tags too - ....... Your help is highly appreciated. Thanks! WSNewbie