Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 28692 invoked from network); 17 Jul 2006 14:32:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Jul 2006 14:32:29 -0000 Received: (qmail 2685 invoked by uid 500); 17 Jul 2006 14:32:23 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 2649 invoked by uid 500); 17 Jul 2006 14:32:23 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 2635 invoked by uid 99); 17 Jul 2006 14:32:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2006 07:32:23 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2006 07:32:22 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A9D4F41001D for ; Mon, 17 Jul 2006 14:30:15 +0000 (GMT) Message-ID: <22844587.1153146615693.JavaMail.jira@brutus> Date: Mon, 17 Jul 2006 07:30:15 -0700 (PDT) From: "Ajith Harshana Ranabahu (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Resolved: (AXIS2-844) WSDL2Java uses XmlObject for skeleton parameter when data in XML schema in same namespace as WSDL document In-Reply-To: <31870600.1151108682018.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS2-844?page=all ] Ajith Harshana Ranabahu resolved AXIS2-844. ------------------------------------------- Resolution: Fixed This was caused by a wrongful wrapper schema generation algorithm. Fixed in the latest SVN > WSDL2Java uses XmlObject for skeleton parameter when data in XML schema in same namespace as WSDL document > ---------------------------------------------------------------------------------------------------------- > > Key: AXIS2-844 > URL: http://issues.apache.org/jira/browse/AXIS2-844 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: wsdl, databinding, Tools > Affects Versions: 1.0 > Environment: JDK 5.0 > Reporter: Derek Foster > Assigned To: Ajith Harshana Ranabahu > Priority: Critical > > I have discovered that the Axis WSDL2Java code generator produces incorrect results under the following circumstances: > 1) The WSDL document declares a target namespace. > 2) The 'types' section of the document imports a schema with the same namespace. > 3) A 'message' is declared to use an element of a type declared within the schema. > 4) An operation is declared to use the message as an input or output parameter. > When the above scenario occurs, the WSDL2Java code generator acts as if the elements declared in the schema do not exist and apparently goes to its fallback method of treating the data as if it were declared 'xs:any'. Note that schemas that do not share the same namespace with the WSDL document seem to work fine. > Using the WSDL and schema below, and the given WSDL2Java command line, I get XMLBeans classes generated. However, the generated skeleton methods take parameters of type OMElement and return a result of type OMElement (with the Axis 1.0 release. With the current nightly build they use type XmlObject instead), instead of using generated XMLBeans wrapper classes that are specific to the WSDL file being parsed. > According to various documentation I have read, there should be no problem with this. The same namespace should be perfectly legal to use both for the WSDL document itself and for XML elements and types declared within it. (Note, however, that the WSDL document messages, bindings, and so forth should occupy a different symbol space from the XML elements and types in the same namespace, so that one could have, for instance, both a message named "foo" as well as an xs:element named "foo" without conflict.) > This is a big problem for me, since sharing the same namespace for both of these elements is done both by several WSDL files within my own company, as well as those that have been given to my company to use from external sources. I MIGHT be able to change the WSDL produced by my company, but can't do much about the ones that we have been given from outside. This essentially makes WSDL2Java unusable for me until this issue is fixed. > A bit more information can be found in the developer list under the thread "[Axis2] Why do I get service skeletons taking OMElement, and uncompilable code?". > Here is an example of WSDL that reproduces the problem: > The WSDL: > > targetNamespace="http://www.example.com/wsdl/2004-10-01/feu" > xmlns:carshdr="http://www.example.com/wsdl/2004-10-01/cars" > xmlns:carsfault="http://www.example.com/wsdl/2006-06-13/carsfault" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="http://www.example.com/wsdl/2004-10-01/feu" > xmlns:feu="http://www.dummy-temp-address" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns="http://schemas.xmlsoap.org/wsdl/"> > > > schemaLocation="FEU.xsd"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > F Port Type > > > > > > > > > > > > > F Soap Binding > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > F Web Service > > > > > > > The schema: > > xmlns="http://www.dummy-temp-address" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > > xmlns:cars="http://www.crc-corp.com/schemas/cars/schema_annotation" > elementFormDefault="unqualified" > attributeFormDefault="unqualified" > version="DRAFT"> > > > > > > > > > > > > > > > > > > > > > > The WSDL command line: > WSDL2Java --databinding-method xmlbeans > --uri FEUImport.wsdl > --server-side > --generate-all > --service-description > --output generatedSrc > --package crc.feuimport.wsdl2java > The skeleton interface that is getting generated: > /** > * FEUServiceSkeletonInterface.java > * > * This file was auto-generated from WSDL > * by the Apache Axis2 version: 1.0 May 05, 2006 (12:31:13 IST) > */ > package crc.feuimport.wsdl2java; > /** > * FServiceSkeletonInterface java skeleton interface for the axisService > */ > public interface FServiceSkeletonInterface { > > > /** > * Auto generated method signature > > * @param param0 > > */ > public org.apache.axiom.om.OMElement acceptFEURecap > (org.apache.axiom.om.OMElement param0 ) > > throws crc.feuimport.wsdl2java.FServiceSkeleton.GeneralFaultException; > > > /** > * Auto generated method signature > > * @param param4 > > */ > public org.apache.axiom.om.OMElement acceptFEUEvent > (org.apache.axiom.om.OMElement param4 ) > > throws crc.feuimport.wsdl2java.FServiceSkeleton.GeneralFaultException; > > } > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org