Excellent, that's a route I can investigate.

Quick question - what is the default encoding for the simple server? UTF-8?

Thanks again for being so responsive!

Regards,
Kaleb


|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Daniel Kulp <[EMAIL PROTECTED]>                                              
                                                                      |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[email protected]                                                
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Kaleb Walton/Southfield/[EMAIL PROTECTED]                                    
                                                                             |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |10/03/2007 10:39 AM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: Responses don't get xml tag and encoding type                            
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





On Wednesday 03 October 2007, Kaleb Walton wrote:
> To add on to my previous question regarding SOAP encoding types, I
> realized that what I'm really looking for is simply the <?xml
> version="1.0" encoding ="UTF-8"?> or whatever encoding is used to be
> output along with the response XML. When I look at the response I do
> not see that line. I'm using the simple server.
>
> Regards,
> Kaleb

OK.  That's different.   We don't output that as it's redundant with the
information in the HTTP Content-Type header.    It would basically just
be wasted bandwidth.

If it's REQUIRED, you could write an interceptor that would insert it.
You would put it in the PRE_STREAM phase with a
setAfter(StaxOutInterceptor.class.getName());

It would have something like:
public void handleMessage(Message message) {
        OutputStream os = message.getContent(OutputStream.class);
        XMLStreamWriter writer =
                message.getContent(XMLStreamWriter.class);
        String encoding = (String)message.get(Message.ENCODING);
        writer.writeStartDocument(encoding, "1.0");
}


--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to