From commits-return-15969-apmail-ofbiz-commits-archive=ofbiz.apache.org@ofbiz.apache.org Wed Jan 06 08:05:24 2010 Return-Path: Delivered-To: apmail-ofbiz-commits-archive@www.apache.org Received: (qmail 95105 invoked from network); 6 Jan 2010 08:05:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Jan 2010 08:05:24 -0000 Received: (qmail 21243 invoked by uid 500); 6 Jan 2010 08:05:23 -0000 Delivered-To: apmail-ofbiz-commits-archive@ofbiz.apache.org Received: (qmail 21168 invoked by uid 500); 6 Jan 2010 08:05:23 -0000 Mailing-List: contact commits-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list commits@ofbiz.apache.org Received: (qmail 21159 invoked by uid 99); 6 Jan 2010 08:05:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 08:05:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 08:05:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A552823888EC; Wed, 6 Jan 2010 08:05:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r896347 - /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java Date: Wed, 06 Jan 2010 08:05:02 -0000 To: commits@ofbiz.apache.org From: hansbak@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100106080502.A552823888EC@eris.apache.org> Author: hansbak Date: Wed Jan 6 08:05:00 2010 New Revision: 896347 URL: http://svn.apache.org/viewvc?rev=896347&view=rev Log: the netbeans generated code (jax-ws) now works with this patch. contribution by Chris snow Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java?rev=896347&r1=896346&r2=896347&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/SOAPEventHandler.java Wed Jan 6 08:05:00 2010 @@ -36,6 +36,7 @@ import javolution.util.FastMap; import org.apache.axiom.om.OMAbstractFactory; +import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.impl.builder.StAXOMBuilder; import org.apache.axiom.om.util.StAXUtils; @@ -194,11 +195,18 @@ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope resEnv = factory.createSOAPEnvelope(); SOAPBody resBody = factory.createSOAPBody(); - OMElement resService = factory.createOMElement(new QName(ModelService.TNS, serviceName + "Response")); + OMElement resService = factory.createOMElement(new QName(serviceName + "Response")); resService.addChild(resultSer.getFirstElement()); resBody.addChild(resService); resEnv.addChild(resBody); + // The declareDefaultNamespace method doesn't work see (https://issues.apache.org/jira/browse/AXIS2-3156) + // so the following doesn't work: + // resService.declareDefaultNamespace(ModelService.TNS); + // instead, create the xmlns attribute directly: + OMAttribute defaultNS = factory.createOMAttribute("xmlns", null, ModelService.TNS); + resService.addAttribute(defaultNS); + // log the response message if (Debug.verboseOn()) { try {