Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 340 invoked from network); 17 Jan 2007 13:51:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jan 2007 13:51:29 -0000 Received: (qmail 97189 invoked by uid 500); 17 Jan 2007 13:51:31 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 97111 invoked by uid 500); 17 Jan 2007 13:51:31 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 97071 invoked by uid 99); 17 Jan 2007 13:51:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 05:51:31 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of atmanes@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2007 05:51:21 -0800 Received: by ug-out-1314.google.com with SMTP id j40so1893399ugd for ; Wed, 17 Jan 2007 05:51:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UNnNmVnSxM2WHVymrKByWAWTNc8jS2bl5GI5dYD4l/WybfR3UYIqVeqwepHVhqEc39OFddHV+13a+WVmwtsKCHuPAQGdETp29y0OO9p++cGxzFhQJy00h5LhCdvGmdFvqYoCfOFyyqknOf9RCEy8H93Wf/lQqj4l0h+a1lZgpFE= Received: by 10.82.184.2 with SMTP id h2mr1526149buf.1169041858140; Wed, 17 Jan 2007 05:50:58 -0800 (PST) Received: by 10.82.117.17 with HTTP; Wed, 17 Jan 2007 05:50:57 -0800 (PST) Message-ID: Date: Wed, 17 Jan 2007 08:50:57 -0500 From: "Anne Thomas Manes" To: axis-user@ws.apache.org Subject: Re: wsdl2java generates incorrect/incomplete code In-Reply-To: <1169038696.30758.245.camel@peabody.iseries-admin.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1168971803.30758.232.camel@peabody.iseries-admin.net> <60708f4b0701162111k1dadbf93sf0e87aa35ef19f1a@mail.gmail.com> <1169038696.30758.245.camel@peabody.iseries-admin.net> X-Virus-Checked: Checked by ClamAV on apache.org Bruce, Giving the WSDL a quick look, I noticed that it is not valid. I don't know if this is what's causing your problem, but it's a good place to start. In your WSDL section, you attempt to import the same namespace twice. This is not allowed. If the namespace is defined in multiple schemas, and your goal is to import both schemas, then you must define a schema with the same target namespace and the schemas into the namespace. e.g.: Another error that I found: you must not specify the parameterOrder attribute in the definition when using document style. (It is only used with RPC style.) As a general practice, it's a bad idea to define headers in your WSDL, especially if you are using standard headers. (The XMLBeans error indicates that you are using WS-Addressing and DSIG.) You should define your header requirements using WS-Policy and configuration files. Also, in regards to schema you did provide (targetNamespace="urn:/fih/purchase-order"), some best practices advice: - Avoid using anonymous types. Rather than defining structures as elements, define them as named types, and then define elements as those types. e.g.: Do this: Rather than this: And I recommend being cautious about defining each element as a global element. The only elements that really should be defined as global elements are those elements that will be the root of a document. i.e, rather than defining "BaselineItemDataSegment" as a gloal element and referencing it from the type definition, define the element within the type definition and reference its type, e.g.: We also need to see the "unr:/fih/c-efm/purchase-order/1.0" schema files. (You sent us the "http://www.fih.org/XML/WD0" namespace schema, instead.) Anne On 1/17/07, R Bruce Hoffman wrote: > Sure... sorry. > > Also, when using xmlbeans binding, I get the following error: > > Using AXIS2_HOME: /usr/local/axis2 > Using JAVA_HOME: /usr/lib/jvm/java-1.5.0-sun > Retrieving schema at '../../../../fih/1.0/fih-header.xsd', relative to > 'file:/home/hoffmanb/ax/wsdl/fih/c-efm/purchase-order/receive-purchase-order/'. > Retrieving schema at > 'http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd', relative to 'file:/home/hoffmanb/ax/wsdl/fih/1.0/fih-header.xsd'. > Retrieving schema at > 'http://schemas.xmlsoap.org/ws/2004/08/addressing/', relative to > 'file:/home/hoffmanb/ax/wsdl/fih/1.0/fih-header.xsd'. > Retrieving schema at '1.0/receive-purchase-order-request.xsd', relative > to > 'file:/home/hoffmanb/ax/wsdl/fih/c-efm/purchase-order/receive-purchase-order/'. > Retrieving schema at 'LimitedPurchaseOrder.xsd', relative to > 'file:/home/hoffmanb/ax/wsdl/fih/c-efm/purchase-order/receive-purchase-order/1.0/receive-purchase-order-request.xsd'. > Retrieving schema at '1.0/receive-purchase-order-reply.xsd', relative to > 'file:/home/hoffmanb/ax/wsdl/fih/c-efm/purchase-order/receive-purchase-order/'. > Jan 16, 2007 1:39:58 PM org.apache.axis2.xmlbeans.CodeGenerationUtility > $Axis2EntityResolver resolveEntity > INFO: Resolving schema with publicId [urn:/fih/1.0] and systemId > [/fih/1.0/fih-header.xsd] > Jan 16, 2007 1:39:58 PM org.apache.axis2.xmlbeans.CodeGenerationUtility > $Axis2EntityResolver resolveEntity > INFO: Resolving schema with publicId [urn:/fih/c-efm/purchase-order/1.0] > and systemId [/1.0/receive-purchase-order-request.xsd] > Jan 16, 2007 1:39:58 PM org.apache.axis2.xmlbeans.CodeGenerationUtility > $Axis2EntityResolver resolveEntity > INFO: Resolving schema with publicId [urn:/fih/c-efm/purchase-order/1.0] > and systemId [/1.0/receive-purchase-order-reply.xsd] > Jan 16, 2007 1:39:58 PM org.apache.axis2.xmlbeans.CodeGenerationUtility > $Axis2EntityResolver resolveEntity > INFO: Resolving schema with publicId > [http://www.w3.org/2000/09/xmldsig#] and systemId > [/http:/www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd] > Jan 16, 2007 1:39:58 PM org.apache.axis2.xmlbeans.CodeGenerationUtility > $Axis2EntityResolver resolveEntity > INFO: Resolving schema with publicId > [http://schemas.xmlsoap.org/ws/2004/08/addressing] and systemId > [/http:/schemas.xmlsoap.org/ws/2004/08/addressing] > Jan 16, 2007 1:39:58 PM org.apache.axis2.xmlbeans.CodeGenerationUtility > $Axis2EntityResolver resolveEntity > INFO: Resolving schema with publicId [http://www.fih.org/XML/WD0] and > systemId [/1.0/LimitedPurchaseOrder.xsd] > Exception in thread "main" > org.apache.axis2.wsdl.codegen.CodeGenerationException: > java.lang.RuntimeException: java.lang.reflect.InvocationTargetException > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > Caused by: java.lang.RuntimeException: > java.lang.reflect.InvocationTargetException > at > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177) > ... 2 more > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82) > ... 3 more > Caused by: java.lang.RuntimeException: org.apache.xmlbeans.XmlException: > http://schemas.xmlsoap.org/ws/2004/08/addressing/:61:1: error: > cvc-enumeration-valid: string value 'none' is not a valid enumeration > value for type of processContents attribute in xs:wildcard > at > org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242) > ... 8 more > Caused by: org.apache.xmlbeans.XmlException: > http://schemas.xmlsoap.org/ws/2004/08/addressing/:61:1: error: > cvc-enumeration-valid: string value 'none' is not a valid enumeration > value for type of processContents attribute in xs:wildcard > at > org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667) > at > org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160) > ... 8 more > > > > > On Wed, 2007-01-17 at 10:41 +0530, Amila Suriarachchi wrote: > > Can you attach your fih-header.xsd file? > > > > On 1/16/07, R Bruce Hoffman wrote: > > I just can't seem to get Axis2 1.1.1 wsdl2java.sh to properly > > create > > skeleton code and Axiom or XmlBeans artifacts correctly for, > > what seems > > to be, relatively simple wsdl and xsd's. > > > > Below is the xsd and wsdl information. I have used FC4, FC5, > > Ubuntu and Debian Sarge. I have tried 1.1, a snapshot before > > 1.1.1 and 1.1.1 releases. Sun java 1.5.0_09 and 10. > > > > I am being told that the wsdl and xsd information is valid (by > > the > > original developers). Both NetBeans 5.5 and Eclipse (under > > WDSCi) seem > > to agree that they are at least valid. > > > > When I run wsdl2java with ADB binding, the message parts all > > end up in > > the default package with empty package statements > > ("package ;"). The > > ExtensionMapper.java ends up in an (invalid) null package. > > (It's named > > "null" and on the output src path.) > > > > All of the types, after the first array type, are listed with > > "This was > > an array!" in the comments, but have no array declarations in > > their > > _type_nn classes... the [] markers are not produced after the > > first > > repeating element. > > > > I have looked at trying to clean up this code to make it > > usable, but I > > would think that Axis2 should be producing code that, at the > > very least, > > would compile through the ant build if the wsdl2java succeeds, > > which it > > does complete in this case. If not, it should probably give me > > an error > > in the generation of the ADB code. > > > > Maybe its something simple or I'm just a dope, or both, but I > > am lost. > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-user-help@ws.apache.org > > > > > > > > > > > > -- > > Amila Suriarachchi, > > WSO2 Inc. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org