Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools incubator » [JAX-WS] Encoding(Request is sent without encoding )
icon5.gif  [JAX-WS] Encoding [message #689808] Tue, 28 June 2011 11:58 Go to next message
Trevor Grech is currently offline Trevor GrechFriend
Messages: 2
Registered: June 2011
Junior Member
Hi all,


I am engaged in a small project to create a jax-ws client for several authenticated .NET web services. I have used wsimport to create all the web service objects and created the client stub and for various reasons added a SOAP handler to the web service interface. All is well except for one thing - encoding.

The SOAP message I am creating contains the correct encoding. I am setting the following within the handler:

soapMsg.getMimeHeaders().addHeader("Content-type", "text/xml; charset=utf-8");
soapMsg.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "utf-8");

and upon

soapMsg.saveChanges();
soapMsg.writeTo(System.out);

within the handler the XML is correct:

<?xml version="1.0" encoding="UTF-8"?>

However the request being sent through the port has the encoding part removed making the request unreadable by the .NET web services:

<?xml version="1.0"?>

The Eclipse work space text-file-encoding is also set to "UTF-8".

Anyone ever met such an issue and may suggest a possible fix?

Thank you,

Trevor Grech
Re: [JAX-WS] Encoding [message #703182 is a reply to message #689808] Wed, 27 July 2011 09:08 Go to previous message
Trevor Grech is currently offline Trevor GrechFriend
Messages: 2
Registered: June 2011
Junior Member
Hi all,

I still cannot figure out why the encoding is stripped out of the XML declaration when sending the request at lower levels. However I did find a work around by extending the XMLOutputFactory to force the full XML declaration.

Regards,

Trevor
Previous Topic:Increase Eclipse heap size
Next Topic:Relax-NG: Status?
Goto Forum:
  


Current Time: Thu Apr 25 21:13:11 GMT 2024

Powered by FUDForum. Page generated in 0.03075 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top