Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 23281 invoked from network); 9 Mar 2010 00:22:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Mar 2010 00:22:23 -0000 Received: (qmail 76173 invoked by uid 500); 9 Mar 2010 00:21:58 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 76104 invoked by uid 500); 9 Mar 2010 00:21:58 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 76097 invoked by uid 99); 9 Mar 2010 00:21:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Mar 2010 00:21:58 +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; Tue, 09 Mar 2010 00:21:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 25EF42388900; Tue, 9 Mar 2010 00:21:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r920584 - in /cxf/branches/2.2.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ systests/jaxws/... Date: Tue, 09 Mar 2010 00:21:33 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100309002134.25EF42388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Tue Mar 9 00:21:33 2010 New Revision: 920584 URL: http://svn.apache.org/viewvc?rev=920584&view=rev Log: Merged revisions 920568 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r920568 | dkulp | 2010-03-08 18:40:41 -0500 (Mon, 08 Mar 2010) | 1 line [CXF-2692] Fix NPE with meethod with only header param ........ Modified: cxf/branches/2.2.x-fixes/ (props changed) cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java?rev=920584&r1=920583&r2=920584&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java (original) +++ cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java Tue Mar 9 00:21:33 2010 @@ -215,6 +215,9 @@ for (SoapHeaderInfo header : headers) { MessagePartInfo part = header.getPart(); + if (wrappedBmi != bmi) { + part = wrappedBmi.getMessageInfo().addMessagePart(part.getName()); + } if (part.getIndex() >= objs.size()) { // The optional out of band header is not a part of parameters of the method continue; Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=920584&r1=920583&r2=920584&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original) +++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Tue Mar 9 00:21:33 2010 @@ -617,8 +617,11 @@ // The operation's input and output message (if present) each contain // only a single part // input message must exist - if (inputMessage == null || inputMessage.size() != 1 - || (outputMessage != null && outputMessage.size() > 1)) { + if (inputMessage == null || inputMessage.size() == 0 + || (inputMessage.size() > 1 && !relaxed)) { + passedRule = false; + } + if (outputMessage != null && outputMessage.size() > 1) { passedRule = false; } Modified: cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=920584&r1=920583&r2=920584&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original) +++ cxf/branches/2.2.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Tue Mar 9 00:21:33 2010 @@ -782,6 +782,7 @@ Class paramType, Type genericType) { boolean isIn = isInParam(method, i); boolean isOut = isOutParam(method, i); + boolean isHeader = isHeader(method, i); Annotation[] paraAnnos = null; if (i != -1 && o.getProperty(METHOD_PARAM_ANNOTATIONS) != null) { Annotation[][] anns = (Annotation[][])o.getProperty(METHOD_PARAM_ANNOTATIONS); @@ -797,6 +798,20 @@ if (part == null && isFromWsdl()) { part = o.getInput().getMessagePartByIndex(i); } + if (part == null && isHeader && o.isUnwrapped()) { + part = ((UnwrappedOperationInfo)o).getWrappedOperation().getInput().getMessagePart(name); + if (part != null) { + //header part in wsdl, need to get this mapped in to the unwrapped form + MessagePartInfo inf = o.getInput().addMessagePart(part.getName()); + inf.setTypeQName(part.getTypeQName()); + inf.setElement(part.isElement()); + inf.setElementQName(part.getElementQName()); + inf.setConcreteName(part.getConcreteName()); + inf.setXmlSchema(part.getXmlSchema()); + part = inf; + inf.setProperty(HEADER, Boolean.TRUE); + } + } if (part == null) { return false; } @@ -821,6 +836,9 @@ if (part == null && this.isFromWsdl()) { part = o.getInput().getMessagePartByIndex(i); } + if (part == null && isHeader && o.isUnwrapped()) { + part = o.getUnwrappedOperation().getInput().getMessagePart(name); + } if (part == null) { return false; } Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=920584&r1=920583&r2=920584&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original) +++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Tue Mar 9 00:21:33 2010 @@ -339,6 +339,7 @@ assertEquals("Hello", echoMsg); } private void runDocLitTest(DocLitWrappedCodeFirstService port) throws Exception { + assertEquals("snarf", port.doBug2692("snarf")); CXF2411Result o = port.doCXF2411(); assertNotNull(o); assertNotNull(o.getContent()); @@ -347,7 +348,6 @@ Foo foo = new Foo(); foo.setName("blah"); assertEquals("blah", port.modifyFoo(foo).getName()); - assertEquals("hello", port.outOnly(new Holder(), new Holder())); Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=920584&r1=920583&r2=920584&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java (original) +++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java Tue Mar 9 00:21:33 2010 @@ -147,6 +147,10 @@ } } + @WebResult(name = "return") + String doBug2692(@WebParam(name = "name", header = true) String name); + + Set getFooSet(); Foo modifyFoo(Foo foo); Modified: cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=920584&r1=920583&r2=920584&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java (original) +++ cxf/branches/2.2.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java Tue Mar 9 00:21:33 2010 @@ -230,5 +230,9 @@ ret.setContent(content); return ret; } + + public String doBug2692(String name) { + return name; + } }