Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 19776 invoked from network); 18 Oct 2006 16:50:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 16:50:28 -0000 Received: (qmail 18447 invoked by uid 500); 18 Oct 2006 16:50:27 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 18357 invoked by uid 500); 18 Oct 2006 16:50:26 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 18346 invoked by uid 500); 18 Oct 2006 16:50:26 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 18343 invoked by uid 99); 18 Oct 2006 16:50:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 09:50:26 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 09:50:26 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id BCEA31A981A; Wed, 18 Oct 2006 09:50:05 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r465295 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java Date: Wed, 18 Oct 2006 16:50:05 -0000 To: axis2-cvs@ws.apache.org From: asankha@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061018165005.BCEA31A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: asankha Date: Wed Oct 18 09:50:01 2006 New Revision: 465295 URL: http://svn.apache.org/viewvc?view=rev&rev=465295 Log: allow string parameters specifying the QNames to be properly understood Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java?view=diff&rev=465295&r1=465294&r2=465295 ============================================================================== --- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java (original) +++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSUtils.java Wed Oct 18 09:50:01 2006 @@ -373,7 +373,7 @@ Parameter operationParam = msgContext.getAxisService(). getParameter(JMSConstants.OPERATION_PARAM); QName operationQName = (operationParam != null ? - (QName) operationParam.getValue() : JMSConstants.DEFAULT_OPERATION); + getQName(operationParam.getValue()) : JMSConstants.DEFAULT_OPERATION); AxisOperation operation = msgContext.getAxisService().getOperation(operationQName); if (operation != null) { @@ -387,7 +387,7 @@ Parameter wrapperParam = msgContext.getAxisService(). getParameter(JMSConstants.WRAPPER_PARAM); QName wrapperQName = (wrapperParam != null ? - (QName) wrapperParam.getValue() : JMSConstants.DEFAULT_WRAPPER); + getQName(wrapperParam.getValue()) : JMSConstants.DEFAULT_WRAPPER); OMElement wrapper = soapFactory.createOMElement(wrapperQName, null); @@ -442,6 +442,22 @@ "SOAP message"); } return envelope; + } + + private static QName getQName(Object obj) { + String value; + if (obj instanceof QName) { + return (QName) obj; + } else { + value = obj.toString(); + } + int open = value.indexOf('{'); + int close = value.indexOf('}'); + if (close > open && open > -1 && value.length() > close) { + return new QName(value.substring(open+1, close-open), value.substring(close+1)); + } else { + return new QName(value); + } } private static void handleException(String s) { --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org