Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 93898 invoked from network); 15 Mar 2008 14:44:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2008 14:44:18 -0000 Received: (qmail 46488 invoked by uid 500); 15 Mar 2008 14:44:15 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 46476 invoked by uid 500); 15 Mar 2008 14:44:15 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 46467 invoked by uid 99); 15 Mar 2008 14:44:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Mar 2008 07:44:15 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 Mar 2008 14:43:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 317A6234C099 for ; Sat, 15 Mar 2008 07:42:28 -0700 (PDT) Message-ID: <1365597936.1205592148201.JavaMail.jira@brutus> Date: Sat, 15 Mar 2008 07:42:28 -0700 (PDT) From: "Damien B (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Commented: (CXF-1478) WebParam ignored in service implementation In-Reply-To: <859144507.1205519424353.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579048#action_12579048 ] Damien B commented on CXF-1478: ------------------------------- The thing is, the same code is working in 2.0.2. So I don't know if the problem lies with the reading WebParam or if the information is stored somewhere else. But it would seem quite normal than using exclusively CXF (wsdl2java with validation, server and client), would lead to a working webservice. Or, at the very least, produce a warning when the server frontend is guessing the parameters. > WebParam ignored in service implementation > ------------------------------------------ > > Key: CXF-1478 > URL: https://issues.apache.org/jira/browse/CXF-1478 > Project: CXF > Issue Type: Bug > Affects Versions: 2.0.4 > Reporter: Damien B > > I have a very simple WSDL (see attached file), Doc/Lit/bare. > I generate with WSDL2Java server + impl. The generated Jax-WS interface looks like this: > public interface TestDocLit { > @ResponseWrapper(localName = "operation1Response", targetNamespace = "http://www.example.org/TestDocLit/", className = "org.example.testdoclit.Operation1Response") > @RequestWrapper(localName = "operation1", targetNamespace = "http://www.example.org/TestDocLit/", className = "org.example.testdoclit.Operation1") > @WebResult(name = "out", targetNamespace = "") > @WebMethod(action = "http://www.example.org/TestDocLit/operation1") > public java.lang.String operation1( > @WebParam(name = "par1", targetNamespace = "") > int par1 > ); > } > We note that WebParam is correct (no namespace, "par1"). > The service is tested like this: > ServerFactoryBean svrFactory = new ServerFactoryBean(); > svrFactory.setServiceClass(TestDocLit.class); > svrFactory.setAddress(url); > svrFactory.setServiceBean(new TestDocLitImpl()); > svrFactory.create(); > final Service service = Service.create(TestDocLit_Service.SERVICE); > service.addPort(TestDocLit_Service.TestDocLitSOAP, SOAPBinding.SOAP11HTTP_BINDING, url); > service.getPort(TestDocLit_Service.TestDocLitSOAP, TestDocLit.class).operation1(42); > The message sent by the client seems correct: > 42 > But debugging through DocLiteralInInterceptor::getPara, it appears that the service expects a ("http://testdoclit.example.org/":"arg0"), whereas it receives a ("":par1), thus, we have in return the dreaded: > null while invoking public abstract java.lang.String org.example.testdoclit.TestDocLit.operation1(int) with params [null]. > So, the server has basically lost the parameter's name, and added a target namespace which (maybe) not due. > At http://localhost:9000/TestDocLit?wsdl, the generated WSDL exposes this fact as well: > > > > > and tns:operation1 is defined below: > > > > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.