Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 41239 invoked from network); 23 Nov 2010 23:28:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Nov 2010 23:28:08 -0000 Received: (qmail 99015 invoked by uid 500); 23 Nov 2010 23:28:40 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 98997 invoked by uid 500); 23 Nov 2010 23:28:40 -0000 Mailing-List: contact issues-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 issues@cxf.apache.org Received: (qmail 98987 invoked by uid 99); 23 Nov 2010 23:28:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 23:28:40 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 23:28:37 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oANNSFq5015216 for ; Tue, 23 Nov 2010 23:28:15 GMT Message-ID: <7446848.275301290554895811.JavaMail.jira@thor> Date: Tue, 23 Nov 2010 18:28:15 -0500 (EST) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Subject: [jira] Resolved: (CXF-3105) jaxws customization parameter renaming not working In-Reply-To: <7846111.169231288603288852.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-3105. ------------------------------ Resolution: Fixed Fix Version/s: 2.3.1 2.2.12 Assignee: Daniel Kulp > jaxws customization parameter renaming not working > -------------------------------------------------- > > Key: CXF-3105 > URL: https://issues.apache.org/jira/browse/CXF-3105 > Project: CXF > Issue Type: Bug > Affects Versions: 2.2.11 > Reporter: Timo Heck > Assignee: Daniel Kulp > Fix For: 2.2.12, 2.3.1 > > Attachments: flowcenter.wsdl, ParameterProcessor.java.patch, ws-binding.xml > > > Hi, > I am working on this for a couple of days now with actually finding a solution. I am building a ws client from wsdl with CXF wsdl2Java version 2.2.11. > The problem is an element naming issue in the wsdl. As far as I do understand I have three choices: > 1. disable wrapper style > 2. use autoNameResolution feature > 3. write my own customization and rename the parameters > I verified options 1 and 2. Both solves the problem. But I'd like to have more control over the generated interface so I'd like to explicitly set the parameter names. > This is how it looks like: > Wsdl describes a webservice with a method called login(). > This is how request and response definitions look like. > > > > > > > > > > > > > > > > > > > > > Request and response both hold a local element called login. This is causing the trouble I have and if I try to generate code with wrapper style enabled this is what I get: > WSDLToJava Error: Element login has the same name with different types > If I rename the two local elements to loginRequest (fc:flowloginrequest) and loginResponse (fc:flowloginresponse) everything runs just fine. Since I can't actually adjust the schema (it's not mine) I have to write my own customization file. > To solve the problem I wanted to rename the method parameter for both elements. This is what found by examining JAX-WS spec. > > xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:fc="http://www.flowworks.de/flowworks/" > xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd > http://java.sun.com/xml/ns/jaxws http://java.sun.com/xml/ns/jaxws/wsdl_customizationschema_2_0.xsd"> > > > > > > > > I thought this would do the trick but it doesn't. Even more confusing is that if I run the tool with -autoNameResolution and check the code the service interface does show part of my declared names above. It looks like this. > login( Flowloginrequest loginResponse, > Integer switchusergroup, > Holder login, > Holder passwordTemp, > Holder usergrouplist, > Holder permissions, > Holder usertype, > Holder usertypeid > ) > Note the login parameter from request is renamed to loginResponse and response parameter name is ignored. To make this a little more interesting I changed the binding declaration to this: > > > > > > > > This is what the method signature looks like: > login( Flowloginrequest loginRequest, > Integer switchusergroup, > Holder login, > Holder passwordTemp, > Holder usergrouplist, > Holder permissions, > Holder usertype, > Holder usertypeid > ) > So I think I am not completely wrong trying to solve this issue by applying a customization file but something is not working right. > I'll try to provide a test case and patch here too. > Timo -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.