Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 22596 invoked from network); 24 Apr 2005 03:03:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Apr 2005 03:03:29 -0000 Received: (qmail 33192 invoked by uid 500); 24 Apr 2005 03:03:56 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 32611 invoked by uid 500); 24 Apr 2005 03:03:54 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 32595 invoked by uid 99); 24 Apr 2005 03:03:54 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=UPPERCASE_25_50 X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 23 Apr 2005 20:03:54 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 22F362DD for ; Sun, 24 Apr 2005 05:03:23 +0200 (CEST) Message-ID: <1700749917.1114311803112.JavaMail.jira@ajax.apache.org> Date: Sun, 24 Apr 2005 05:03:23 +0200 (CEST) From: "Davanum Srinivas (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Resolved: (AXIS-1682) setting CHARACTER_SET_ENCODING in org.apache.axis.client.Call In-Reply-To: <138033129.1101268100123.JavaMail.apache@nagoya> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS-1682?page=all ] Davanum Srinivas resolved AXIS-1682: ------------------------------------ Resolution: Fixed applied patch. thanks, dims > setting CHARACTER_SET_ENCODING in org.apache.axis.client.Call > ------------------------------------------------------------- > > Key: AXIS-1682 > URL: http://issues.apache.org/jira/browse/AXIS-1682 > Project: Axis > Type: Improvement > Versions: 1.2 > Environment: Mac OS X 10.3.6, Axis 1.2RC2, Resin 2.1.12 > Reporter: Bernard Bernstein > > I wanted to be able to call my Axis server through an ISO-8859-1 encoding, but there was no easy way to set that from the client end of things. I noticed that the server will respond appropriately when the request came that way, but I was not able to test it. > This feature is very easy to add to org.apache.axis.client.Call > Here is my patch for version 1.2RC2: > I added a new property: > public static final String CHARACTER_SET_ENCODING = SOAPMessage.CHARACTER_SET_ENCODING; > and made the appropriate changes in the property checking code. > Then in invoke(SOAPEnvelope), it sets the message CHARACTER_SET_ENCODING to the one set in the Call. > if (getProperty(CHARACTER_SET_ENCODING) != null) { > msg.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, getProperty(CHARACTER_SET_ENCODING)); > } > To use it, you'd just use the setProperty() method to set the Call.CHARACTER_SET_ENCODING property to whatever character encoding you want before invoking the call. > eg: > call.setProperty(Call.CHARACTER_SET_ENCODING, "ISO-8859-1"); > Here's the complete diff -u for my change from the distributed version of Call.java in 1.2RC2 (hope the wrapping works out, I'm new here): > --- Call.java Tue Nov 16 13:04:43 2004 > +++ /org/apache/axis/client/Call.java Fri Nov 19 09:24:19 2004 > @@ -113,6 +113,8 @@ > * TIMEOUT - Timeout used by transport sender in milliseconds > * TRANSPORT_NAME - Name of transport handler to use > * ATTACHMENT_ENCAPSULATION_FORMAT- Send attachments as MIME the default, or DIME. > + * CHARACTER_SET_ENCODING - Character set encoding to use for request > + * > * > * > * @author Doug Davis (dug@us.ibm.com) > @@ -183,6 +185,13 @@ > public static final String TRANSPORT_NAME = "transport_name" ; > /** > + * This is the character set encoding to use for the message > + * > + * @see #setProperty > + */ > + public static final String CHARACTER_SET_ENCODING = SOAPMessage.CHARACTER_SET_ENCODING; > + > + /** > * This is not the name of a property that can be set with > * setProperty, despite its name. > */ > @@ -440,6 +449,9 @@ > verifyBooleanProperty(name, value); > setStreaming(((Boolean) value).booleanValue()); > } > + else if (name.equals(CHARACTER_SET_ENCODING)) { > + verifyStringProperty(name, value); > + } > else if (name.startsWith("java.") || name.startsWith("javax.")) { > throw new JAXRPCException( > Messages.getMessage("badProp05", name)); > @@ -544,6 +556,7 @@ > propertyNames.add(TRANSPORT_NAME); > propertyNames.add(ATTACHMENT_ENCAPSULATION_FORMAT); > propertyNames.add(CONNECTION_TIMEOUT_PROPERTY); > + propertyNames.add(CHARACTER_SET_ENCODING); > } > public Iterator getPropertyNames() { > @@ -1849,7 +1862,10 @@ > Message msg = null ; > msg = new Message( env ); > - if (msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING) != null) { > + if (getProperty(CHARACTER_SET_ENCODING) != null) { > + msg.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, getProperty(CHARACTER_SET_ENCODING)); > + } > + else if (msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING) != null) { > msg.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, msgContext.getProperty(SOAPMessage.CHARACTER_SET_ENCODING)); > } > setRequestMessage( msg ); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira