Leif, I have found a way to get the HTTP header to specify a utf-7 charset. However, I do not believe there is a way to get the XML declaration string to specify anything but utf-8, because it comes from Constants.java:
// XML Declaration string public static final String XML_DECL = "<?xml version='1.0' encoding='UTF-8'?>\r\n"; The attached file is a modified version of the GetAddress sample that specifies utf-7 in the HTTP header, i.e. the request looks like this: POST /soap/servlet/rpcrouter HTTP/1.0 Host: localhost Content-Type: text/xml; charset=utf-7 Content-Length: 488 SOAPAction: "" <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:getAddressFromName xmlns:ns1="urn:AddressFetcher" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <nameToLookup xsi:type="xsd:string">John Doe</nameToLookup> </ns1:getAddressFromName> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Scott Nichol ----- Original Message ----- From: "Leif Nilsson TACMa" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 31, 2002 9:07 AM Subject: Support for character sets other than UTF8 ? I need to control what type of character encoding to use when talking SOAP. In particular I need to use UTF7 when talking to an embedded device. Does anyone know how and if this is supported by Apache SOAP v2.2 ? Leif Nilsson Software Engineer TAC AB Jägershillgatan 18 SE-213 75 Malmö, Sweden Direct +46 40 38 69 56 Fax +46 40 21 82 87 Mobile +46 xx xxx xx xx www.tac-global.com This email is intended only for the use of the individual or entity to whom it is addressed. It may contain information that is privileged, confidential or otherwise protected from disclosure under applicable law. If you have received this transmission in error, please delete it immediately and notify me by mailing me.
GetAddressUTF7.java
Description: Binary data