Use of SAAJ 1.3 conforming to SOAP 1.2 inn WSAD
Hi All,
I am developing a web service client. The webservice we are accessing requires that we use SOAP 1.2 for all communications.
For this purpose I am using the SAAJ 1.3 APIs. I have imported saaj-api.jar and saaj-impl.jar. I am using WSAD 5.1.0 ad the IDE.
I am unable to create a SOAP message. The same works when I use the default SAAJ apis available with WSAD.
//Create Message
MessageFactory requestMessageFactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
SOAPMessage requestMessage = requestMessageFactory.createMessage();
//Get the SOAPBody
SOAPEnvelope requestEnvelope = requestMessage.getSOAPPart().getEnvelope();
requestBody = requestEnvelope.getBody().addBodyElement(requestEnvelope.createName("Request");
//Add Body element to SOAP Body
SOAPElement hdrTag = requestBody.addChildElement(requestEnvelope.createName("Hdr"));
SOAPElement reqBdyTag = requestBody.addChildElement(requestEnvelope.createName("ReqBdy"));
System.out.println(requestBody.toString());
The above line returns the value as [Request: null]
Can anyone please tell me where I may be going wrong?

