Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
Java, windows XP and WebLogic
Description
Hello,
when I am trying to add the org.w3c.dom.Document object into SOAPMessage Body object it is converting my german character in the Document object to some special characters (for eg: ü in the Document object, after conversion the new character is ü).
character conversion happend after this step in the following code: body.addDocument(org.w3c.dom.Document);
sample code:
// All SAAJ SOAP messages are created by using a message factory
MessageFactory msgFactory = getMessageFactory();
SOAPMessage msg = msgFactory.createMessage();
// Get the SOAP Part from the SOAP Message object
SOAPPart soapPart = msg.getSOAPPart();
// The SOAP part object contains the SOAP Envelope Object
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
//To determine if the SOAPHeader can be detached from the envelope, so that an empty header is only applied
SOAPFactory sFactory = getSOAPFactory();
SOAPElement originatingSysElement = sFactory.createElement(Constants.SOAPHeader.Element.ORIGINATION_SYSTEM);
originatingSysElement.addTextNode(Constants.SOAPHeader.Element.ORIGINATION_SYSTEM_NAME);
header.addChildElement(originatingSysElement);
//Get the SOAP Body from the SOAP Envelope
SOAPBody body = envelope.getBody();
body.addDocument(org.w3c.dom.Document);
// Save changes to the message we just populated
msg.saveChanges();
Kinldy help on this issue.
Thanks and Regards
Gajendra