axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gul Onural" <onu...@nortel.com>
Subject RE: Compilation error with WSDL2Java and XmlBeans
Date Tue, 17 Oct 2006 00:56:34 GMT
Jerome,

The std-bin he mentioned can be downloaded from
http://people.apache.org/dist/axis2/nightly/.
The name of the zip file you want to download is
axis2-std-1.1-SNAPSHOT-bin.zip  

Gul

-----Original Message-----
From: Magnet, Jerome (CAR:QT11) 
Sent: Monday, October 16, 2006 8:38 PM
To: axis-user@ws.apache.org
Subject: RE: Compilation error with WSDL2Java and XmlBeans

First, thanks for your quick replies.

Now, I used in my classpath all the nightly jars from the
"%AXIS2_HOME%\lib\*.jar" as defined in the WSDL2Java.bat (or sh). I am
not sure what you mean by std-bin? I looked at the min bin nightly
package. But, it does not have the codegen libraries (WSDL2Java class
not found).

I will try to send all my WSDL/XSD files in this email. I tried in a zip
file and changing the zip by txt but it seems that posting to this
mailing list always fails with a zip formated file.
Note that all xsd files are in xsd folder found with wsdl files.

Jerome

-----Original Message-----
From: robert lazarski [mailto:robertlazarski@gmail.com]
Sent: Monday, October 16, 2006 5:06 PM
To: axis-user@ws.apache.org
Subject: Re: Compilation error with WSDL2Java and XmlBeans


I also just noticed you have some old jars in your classpath. Try
placing _only_ the jars in your classpath that are from the nightly
std-bin distro.

Robert

On 10/16/06, robert lazarski <robertlazarski@gmail.com> wrote:
> Post your wsdl and schemas and maybe we can help. The wsdl does 
> validate, right ?
>
> Robert
>
> On 10/16/06, Jerome Magnet <jeromem@nortel.com> wrote:
> > Robert,
> >
> > I tried the latest nightly load. It does not fail as before. But, I 
> > got the following output (see below):
> >
> > I got three java classes and 2 XML resources.
> > I don't see any XMLBeans Java classes based on the XML schema of all

> > messages (request/Response/Exception). Also, reading the generated 
> > wsdl it has all the message schema missing. Actually, the namespace 
> > is missing. And, the prefix of my parts are "null" (See extract 
> > below)? Does it mean that I can use the Java classes compiled with 
> > XmlBeans? Is there a recipe to follow on how to integrate XmlBeans 
> > library of java classes with the Java code generated by axis2?
> >
> > Thanks,
> >
> > Jerome
> >
> > >>> generated WSDL
> > <wsdl:definitions xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> > xmlns:tmf854WS="tmf854.v1.ws" 
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> > targetNamespace="tmf854.v1.ws">
> >   <wsdl:types/>
> >   <wsdl:message name="subscribe">
> >     <wsdl:part name="part1" element="null:subscribe"/>
> >   </wsdl:message>
> >   <wsdl:message name="subscribe">
> >     <wsdl:part name="mtosiHeader" element="null:header"/>
> >   </wsdl:message>
> >   <wsdl:message name="subscribeResponse">
> >     <wsdl:part name="part1" element="null:subscribeResponse"/>
> >   </wsdl:message>
> >   <wsdl:message name="subscribeResponse">
> >     <wsdl:part name="mtosiHeader" element="null:header"/>
> >   </wsdl:message>
> >   <wsdl:message name="ProcessingFailureException">
> >     <wsdl:part name="part1" 
> > element="null:ProcessingFailureException"/>
> > ...
> >
> > >>> output from WSDL2Java
> > Retrieving document at 'NotificationServiceSOAP.wsdl', relative to 
> > 'file:/D:/Jeromem/Code/testAxis2/ ./wsdl/'.
> > Retrieving document at 'NotificationService.wsdl', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl
> > /NotificationServiceSOAP.wsdl'.
> > Retrieving schema at 'xsd/interfaces/NotificationService.xsd',
relative
> > to 'file:/D:/Jeromem/Code/te
> > stAxis2/wsdl/NotificationService.wsdl'.
> > Retrieving schema at '../common/Header.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/i
> > nterfaces/NotificationService.xsd'.
> > Retrieving schema at 'HeaderVendorExtensions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl
> > /xsd/common/Header.xsd'.
> > Retrieving schema at 'Definitions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/common
> > /HeaderVendorExtensions.xsd'.
> > Retrieving schema at '../networkResources/Notifications.xsd',
relative
> > to 'file:/D:/Jeromem/Code/tes
> > tAxis2/wsdl/xsd/interfaces/NotificationService.xsd'.
> > Retrieving schema at 'GlobalDefinitions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/
> > networkResources/Notifications.xsd'.
> > Retrieving schema at '../common/Definitions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/
> > xsd/networkResources/GlobalDefinitions.xsd'.
> > Retrieving schema at 'VendorExtensions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/n
> > etworkResources/Notifications.xsd'.
> > Retrieving schema at '../common/Definitions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/
> > xsd/networkResources/VendorExtensions.xsd'.
> > Retrieving schema at 'LayerRates.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/network
> > Resources/Notifications.xsd'.
> > Retrieving schema at '../common/Definitions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/
> > xsd/networkResources/LayerRates.xsd'.
> > Retrieving schema at 'ProbableCauses.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/net
> > workResources/Notifications.xsd'.
> > Retrieving schema at '../common/Definitions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/
> > xsd/networkResources/ProbableCauses.xsd'.
> > Retrieving document at 'Exceptions.wsdl', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/Notifica
> > tionService.wsdl'.
> > Retrieving schema at 'xsd/interfaces/Exceptions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/w
> > sdl/Exceptions.wsdl'.
> > Retrieving schema at '../common/Header.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/i
> > nterfaces/Exceptions.xsd'.
> > Retrieving schema at 'VendorExtensions.xsd', relative to
> > 'file:/D:/Jeromem/Code/testAxis2/wsdl/xsd/i
> > nterfaces/Exceptions.xsd'.
> > Oct 16, 2006 4:05:33 PM
org.apache.axis2.wsdl.codegen.writer.ClassWriter
> > createOutFile
> > INFO: File
src\src\org\tmforum\mtosi\ws\NotificationServiceSkeleton.java
> > will not be overwritten.
> > Oct 16, 2006 4:05:33 PM
org.apache.axis2.wsdl.codegen.writer.ClassWriter
> > createOutFile
> > INFO: File
> >
src\src\org\tmforum\mtosi\ws\NotificationServiceMessageReceiverInOut.jav
> > a will not be ove
> > rwritten.
> > Oct 16, 2006 4:05:33 PM
org.apache.axis2.wsdl.codegen.writer.ClassWriter
> > createOutFile
> > INFO: File
> >
src\src\org\tmforum\mtosi\ws\ProcessingFailureExceptionException.java
> > will not be overwri
> > tten.
> >
> > -----Original Message-----
> > From: robert lazarski [mailto:robertlazarski@gmail.com]
> > Sent: Saturday, October 14, 2006 6:51 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: Compilation error with WSDL2Java and XmlBeans
> >
> >
> > Have you tried the latest nightly ?
> >
> > http://people.apache.org/dist/axis2/nightly/axis2-1.1-SNAPSHOT.war
> > http://people.apache.org/dist/axis2/nightly/axis2-std-1.1-SNAPSHOT-b
> > in.z
> > ip
> >
> > If the problem persists, please create a jira and upload your wsdl 
> > and schemas.
> >
> > HTH,
> > Robert
> >
> > On 10/14/06, Jerome Magnet <jeromem@nortel.com> wrote:
> > >
> > >
> > >
> > > I have the following error with WSDL2Java (see below).
> > > I don't understand what is the issue. The WSDL/XSD validates with 
> > > XMLSpy. Also, I can compile all XSD with XmlBeans (scomp). It 
> > > seems that the issue is in: NotificationService.xsd:29:40 And, 
> > > there is a reference to a null element in the namespace? The line 
> > > numbers refer to a simpletype string with enumerations.
> > >
> > > Finally, I noticed some issues with wsdl:import. It went away when

> > > I put all my WSDL files in the same folder.
> > >
> > > Thanks,
> > > Jerome
> > >
> > > >>> Compilation output with WSDL2Java
> > > Using AXIS2_HOME:   D:\Apps\axis2
> > > Using JAVA_HOME:    D:\Java\jdk1.5.0_02
> > > AXIS2_CLASS_PATH 
> > > D:\Apps\axis2;D:\Apps\xmlbeans-2.1.0\lib\jsr173_1.0_api.jar;D:\App
> > > s\xm
> > > lbeans-2.1.0\
> > >
> > lib\resolver.jar;D:\Apps\axis2\lib\annogen-0.1.0.jar;D:\Apps\axis2\l
> > ib\a
> > xiom-api-1.0.jar;D:\Apps\axi
> > >
> > s2\lib\axiom-dom-1.0.jar;D:\Apps\axis2\lib\axiom-impl-1.0.jar;D:\App
> > s\ax
> > is2\lib\axis2-adb-1.0.jar;D:
> > >
> > \Apps\axis2\lib\axis2-codegen-1.0.jar;D:\Apps\axis2\lib\axis2-jibx-1
> > .0.j
> > ar;D:\Apps\axis2\lib\axis2-k
> > >
> > ernel-1.0.jar;D:\Apps\axis2\lib\axis2-tools-1.0.jar;D:\Apps\axis2\li
> > b\ax
> > is2-xmlbeans-1.0.jar;D:\Apps
> > >
> > \axis2\lib\backport-util-concurrent-2.1.jar;D:\Apps\axis2\lib\common
> > s-co
> > dec-1.3.jar;D:\Apps\axis2\li
> > >
> > b\commons-fileupload-1.0.jar;D:\Apps\axis2\lib\commons-httpclient-3.
> > 0.ja
> > r;D:\Apps\axis2\lib\commons-
> > >
> > logging-1.0.4.jar;D:\Apps\axis2\lib\geronimo-spec-activation-1.0.2-r
> > c4.j
> > ar;D:\Apps\axis2\lib\geronim
> > >
> > o-spec-javamail-1.3.1-rc5.jar;D:\Apps\axis2\lib\geronimo-spec-jms-1.
> > 1-rc
> > 4.jar;D:\Apps\axis2\lib\jaxe
> > >
> > n-1.1-beta-8.jar;D:\Apps\axis2\lib\jaxme2-0.5.1.jar;D:\Apps\axis2\li
> > b\ja
> > xmeapi-0.5.1.jar;D:\Apps\axi
> > >
> > s2\lib\jaxmejs-0.5.1.jar;D:\Apps\axis2\lib\jaxmexs-0.5.1.jar;D:\Apps
> > \axi
> > s2\lib\log4j-1.2.13.jar;D:\A
> > >
> > pps\axis2\lib\neethi-1.0.1.jar;D:\Apps\axis2\lib\servletapi-2.3.jar;
> > D:\A
> > pps\axis2\lib\stax-api-1.0.j
> > >
> > ar;D:\Apps\axis2\lib\stax-utils-20060501.jar;D:\Apps\axis2\lib\wsdl4
> > j-1.
> > 5.2.jar;D:\Apps\axis2\lib\ws
> > >
> > tx-asl-2.9.3.jar;D:\Apps\axis2\lib\xbean-2.1.0.jar;D:\Apps\axis2\lib
> > \Xml
> > Schema-1.0.2.jar
> > > Retrieving document at 'NotificationServiceSOAP.wsdl', relative to

> > > 'file:/D:/Jeromem/Code/axis2/./ws dl/'. Retrieving document at 
> > > 'NotificationService.wsdl', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/Not
> > >
> > > ificationServiceSOAP.wsdl'.
> > > Retrieving schema at 'xsd/interfaces/NotificationService.xsd',
> > > relative to 'file:/D:/Jeromem/Code/ax 
> > > is2/wsdl/NotificationService.wsdl'.
> > >
> > > Retrieving schema at '../common/Header.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/inter
> > > faces/NotificationService.xsd'.
> > > Retrieving schema at 'HeaderVendorExtensions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd
> > > /common/Header.xsd'.
> > > Retrieving schema at 'Definitions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/common/Hea
> > > derVendorExtensions.xsd'.
> > > Retrieving schema at '../networkResources/Notifications.xsd', 
> > > relative to 'file:/D:/Jeromem/Code/axi
> > > s2/wsdl/xsd/interfaces/NotificationService.xsd'.
> > >
> > > Retrieving schema at 'GlobalDefinitions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/netw
> > > orkResources/Notifications.xsd'.
> > > Retrieving schema at '../common/Definitions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/
> > > networkResources/GlobalDefinitions.xsd'.
> > > Retrieving schema at 'VendorExtensions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/netwo
> > > rkResources/Notifications.xsd'.
> > > Retrieving schema at '../common/Definitions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/
> > > networkResources/VendorExtensions.xsd'.
> > > Retrieving schema at 'LayerRates.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/networkReso
> > > urces/Notifications.xsd'.
> > > Retrieving schema at '../common/Definitions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/
> > > networkResources/LayerRates.xsd'.
> > > Retrieving schema at 'ProbableCauses.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/network
> > > Resources/Notifications.xsd'.
> > > Retrieving schema at '../common/Definitions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/
> > > networkResources/ProbableCauses.xsd'.
> > > Retrieving document at 'Exceptions.wsdl', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/Notification
> > > Service.wsdl'.
> > > Retrieving schema at 'xsd/interfaces/Exceptions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/
> > > Exceptions.wsdl'.
> > > Retrieving schema at '../common/Header.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/inter
> > > faces/Exceptions.xsd'.
> > > Retrieving schema at 'VendorExtensions.xsd', relative to 
> > > 'file:/D:/Jeromem/Code/axis2/wsdl/xsd/inter
> > > faces/Exceptions.xsd'.
> > > Exception in thread "main"
> > > org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > > java.lang.RuntimeE
> > > xception: java.lang.reflect.InvocationTargetException
> > >         at 
> > > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGe
> > > nera
> > > tionEngine.java:185
> > > )
> > >         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(XML
> > Bean
> > sExtension.java:9
> > > 3)
> > >         at
> > >
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGene
> > rati
> > onEngine.java:140
> > > )
> > >         ... 2 more
> > > Caused by: java.lang.reflect.InvocationTargetException
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
> > > Method)
> > >         at
> > >
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> > .jav
> > a:39)
> > >         at
> > >
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > ssor
> > Impl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > >         at
> > >
> > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XML
> > Bean
> > sExtension.java:8
> > > 3)
> > >         ... 3 more
> > > Caused by: java.lang.RuntimeException:
> > > org.apache.xmlbeans.XmlException: D:\Jeromem\Code\axis2\xsd\i
> > > nterfaces\NotificationService.xsd:29:40: error:
> > > src-resolve: type 'null@tmf854.v1' not found.
> > >         at
> > >
> > org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeG
> > ener
> > ationUtility.java
> > > :192)
> > >         ... 8 more
> > > Caused by: org.apache.xmlbeans.XmlException: 
> > > D:\Jeromem\Code\axis2\xsd\interfaces\NotificationServic
> > > e.xsd:29:40: error: src-resolve: type 'null@tmf854.v1' not found.
> > >         at
> > >
> > org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(Sch
> > emaT
> > ypeSystemCompiler
> > > .java:225)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
> > > Method)
> > >         at
> > >
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
> > .jav
> > a:39)
> > >         at
> > >
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
> > ssor
> > Impl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:585)
> > >         at
> > > org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:665)
> > >         at
> > >
> > org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeG
> > ener
> > ationUtility.java
> > > :161)
> > >         ... 8 more
> > >
> >
> > --------------------------------------------------------------------
> > -
> > 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
> >
> >
>

---------------------------------------------------------------------
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


Mime
View raw message