Hi Paul,
So, if the SampleService.xsd also references further xsds with the
xsd:include statement, then they will also fail right ?
Thanks,
Sriram Vaidyanathan
Software Engineer - Java
Copart Auto Auctions, Inc.
4665 Business Center Drive
Fairfield, CA 94534
www.copart.com <http://www.copart.com/>
(707) 639-5248
-----Original Message-----
From: Paul Fremantle [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 10:11 PM
To: [email protected]
Subject: Re: Axis2 1.1.1 with XMLBeans as the Data binding framework.
Sriram
You are right. I managed to recreate your problem. I think there is a
bug in the XMLBeans databinding.
Try using xsd:import instead of include:
<xsd:import schemaLocation="SampleService.xsd"
namespace="http://www.sample.com/test" />
Paul
On 1/17/07, Sriram Vaidyanathan <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> Thanks for the response.
>
> If I remove the SampleService.xsd from the folder, then I get the expection
> as you posted. See [1] below.
>
> But if I have the file present, then I get a different version of the same
> exception. See [2] below. So, I am wondering if I have the file present, is
> it hiding some other problem. ?
>
>
>
>
> [1]
> Running AXIS Tool WSDL2Java with Axis2 Home as C:\axis2-1.1.1
> [delete] Deleting directory C:\cvs\aps\cieca\wsdl\xmlbeans_gen_src
> [java] Retrieving schema at 'SampleService.xsd', relative to
> 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
> [java] Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
> [java] at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:114)
> [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> [java] Caused by: javax.wsdl.WSDLException: WSDLException (at
> /wsdl:definitions/wsdl:types/xsd:schema[2]): faultCode=OTHER_ERROR: An error
> occurred trying to resolve schema referenced at 'SampleService.xsd', relative
> to 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.:
> java.io.FileNotFoundException: This file was not found:
> file:/C:/cvs/aps/sample/wsdl/src/main/config/SampleService.xsd
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown
> Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> [java] at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
> [java] at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:276)
> [java] at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:97)
>
>
> [2]
>
> [INFO] Executing tasks
> [echo] Running AXIS Tool WSDL2Java with Axis2 Home as C:\axis2-1.1.1
> [delete] Deleting directory C:\cvs\aps\sample\wsdl\xmlbeans_gen_src
> [java] Retrieving schema at 'SampleService.xsd', relative to
> 'file:/C:/cvs/aps/sample/wsdl/src/main/config/'.
> [java] Jan 16, 2007 9:31:48 PM
> org.apache.axis2.xmlbeans.CodeGenerationUtility$Axis2EntityResolver
> resolveEntity
> [java] INFO: Resolving schema with publicId [null] and systemId
> [\SampleService.xsd]
> [java] Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> [java] at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> [java] Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> [java] at
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:92)
> [java] at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
> [java] ... 2 more
> [java] Caused by: java.lang.reflect.InvocationTargetException
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [java] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [java] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:585)
> [java] at
> org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
> [java] ... 3 more
> [java] Caused by: java.lang.RuntimeException:
> org.apache.xmlbeans.XmlException: error: Problem parsing referenced XML
> resource - java.io.FileNotFoundException: \SampleService.xsd (The system
> cannot find the file specified)
> [java] at
> org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:242)
> [java] ... 8 more
> [java] Caused by: org.apache.xmlbeans.XmlException: error: Problem
> parsing referenced XML resource - java.io.FileNotFoundException:
> \SampleService.xsd (The system cannot find the file specified)
> [java] at
> org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(SchemaTypeSystemCompiler.java:225)
> [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [java] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> [java] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> [java] at java.lang.reflect.Method.invoke(Method.java:585)
> [java] at
> org.apache.xmlbeans.XmlBeans.compileXmlBeans(XmlBeans.java:667)
> [java] at
> org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:160)
> [java] ... 8 more
> [java] Java Result: 1
>
>
>
>
> Thanks
> Sriram Vaidyanathan
> Software Engineer - Java
> Copart Auto Auctions, Inc.
> 4665 Business Center Drive
> Fairfield, CA 94534
> www.copart.com <http://www.copart.com/>
> (707) 639-5248
>
> -----Original Message-----
> From: Paul Fremantle [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 16, 2007 9:20 PM
> To: [email protected]
> Subject: Re: Axis2 1.1.1 with XMLBeans as the Data binding framework.
>
> No! Exactly the opposite. I didn't have a SampleService.xsd but
> wsdl2java was looking in the right place for it.
>
> When I add a SampleService.xsd it finds it successfully.
>
> Paul
>
> On 1/17/07, Sriram Vaidyanathan <[EMAIL PROTECTED]> wrote:
> > Hi Paul,
> > So it seems you got that same error which I am getting right??
> >
> > Sriram Vaidyanathan
> > Software Engineer - Java
> > Copart Auto Auctions, Inc.
> > 4665 Business Center Drive
> > Fairfield, CA 94534
> > www.copart.com <http://www.copart.com/>
> > (707) 639-5248
> >
> > -----Original Message-----
> > From: Paul Fremantle [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 16, 2007 9:07 PM
> > To: [email protected]
> > Subject: Re: Axis2 1.1.1 with XMLBeans as the Data binding framework.
> >
> > Sriram
> >
> > I just took an existing WSDL and added your snippet into it. Then I
> > tried the Axis2-1.1.1 wsdl2java.bat
> >
> > I got this error:
> > Retrieving schema at 'SampleService.xsd', relative to
> > 'file:/C:/wsdlexercise/'.
> > Exception in thread "main"
> > org.apache.axis2.wsdl.codegen.CodeGenerationException: Caused by:
> > javax.wsdl.WSDLException: WSDLException (at
> > /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An
> > error occurred trying to resolve schema referenced at
> > 'SampleService.xsd', relative to 'file:/C:/wsdlexercise/'.:
> > java.io.FileNotFoundException: This file was not found:
> > file:/C:/wsdlexercise/SampleService.xsd
> >
> > In other words, exactly as it should, it looked in the same path as
> > the WSDL file. So I can't replicate your problem.
> >
> > Paul
> >
> >
> >
> > On 1/17/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > On 1/17/07, Sriram Vaidyanathan <[EMAIL PROTECTED]> wrote:
> > > > No, I am using only 1.1.1 jars From 1.1.1 release since we have
> > > XmlBeans as the data-binding framework, I don't use the
> > > axis2-jibx1.1.1.jar
> > > and axis2-adb1.1.1.jar
> > >
> > > this should not cause any problem. Can you send a small sample wsdl and an
> > > xsd file to reproduce your problem? I tried with some sample but they pick
> > > the xsd file correctly.
> > >
> > > > Thanks
> > > > Sriram Vaidyanathan
> > > > Software Engineer - Java
> > > > Copart Auto Auctions, Inc.
> > > > 4665 Business Center Drive
> > > > Fairfield, CA 94534
> > > > www.copart.com <http://www.copart.com/>
> > > > (707) 639-5248
> > > >
> > > > -----Original Message-----
> > > > From: Paul Fremantle [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, January 16, 2007 8:24 PM
> > > > To: [email protected]
> > > > Subject: Re: Axis2 1.1.1 with XMLBeans as the Data binding framework.
> > > >
> > > > I don't understand what you mean. Do you have a mix of 1.0 and 1.1.1
> > > > jars?
> > > >
> > > > Paul
> > > >
> > > > On 1/17/07, Sriram Vaidyanathan < [EMAIL PROTECTED]> wrote:
> > > > > Hi Paul,
> > > > > Tried that option too... same error. Actually we were using one of
> > > the Axis2 1.0 nightly versions and it used to resolve the relative
> > > directory
> > > without a problem. Could there be a problem that I am only using the
> > > selected jars from Axis21.1.1 distribution.
> > > > >
> > > > >
> > > > > Thanks
> > > > > Sriram Vaidyanathan
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Paul Fremantle [mailto:[EMAIL PROTECTED] ]
> > > > > Sent: Tuesday, January 16, 2007 8:13 PM
> > > > > To: [email protected]
> > > > > Subject: Re: Axis2 1.1.1 with XMLBeans as the Data binding framework.
> > > > >
> > > > > Can you try "./SampleService.xsd" just in case that fixes it?
> > > > >
> > > > > Paul
> > > > >
> > > > > On 1/17/07, Sriram Vaidyanathan <[EMAIL PROTECTED] > wrote:
> > > > > > Hi Paul,
> > > > > > Here is the snippet, which is used to include the XSD in the
> > > > > > WSDL.
> > > > > >
> > > > > > <xsd:schema xmlns:xsd="
> > > http://www.w3.org/2001/XMLSchema"
> > > > > >
> > > attributeFormDefault="unqualified"
> > > elementFormDefault="qualified"
> > > > > > targetNamespace="
> > > > > > http://www.sample.com/test"
> > > version="2.1.0">
> > > > > >
> > > > > > <xsd:include
> > > schemaLocation="SampleService.xsd" />
> > > > > > </xsd:schema>
> > > > > >
> > > > > >
> > > > > > Both the WSDL and the XSD are in the same folder. I am just posting
> > > the snippet, as the WSDL itself is pretty large.
> > > > > >
> > > > > > Thanks,
> > > > > > Sriram Vaidyanathan
> > > > > > Software Engineer - Java
> > > > > > Copart Auto Auctions, Inc.
> > > > > > 4665 Business Center Drive
> > > > > > Fairfield, CA 94534
> > > > > > www.copart.com <http://www.copart.com/>
> > > > > > (707) 639-5248
> > > > > >
> > > > > > -----Original Message-----
> > > > > > From: Paul Fremantle [mailto: [EMAIL PROTECTED]
> > > > > > Sent: Tuesday, January 16, 2007 7:21 PM
> > > > > > To: [email protected]
> > > > > > Subject: Re: Axis2 1.1.1 with XMLBeans as the Data binding
> > > > > > framework.
> > > > > >
> > > > > > Sriram
> > > > > >
> > > > > > Please can you post the WSDL/XSD?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Paul
> > > > > >
> > > > > > On 1/17/07, Sriram Vaidyanathan < [EMAIL PROTECTED]>
> > > wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I tried to migrate to axis2 1.1.1 with XMLBeans as the
> > > data-binding
> > > > > > > framework. My WSDL actually references XSDs in it through a
> > > > > > > relative
> > > path.
> > > > > > > When I run the WSDL2Java command I get a FileNotFoundException.
> > > > > > > This
> > > used to
> > > > > > > work before with one of the Axis2 1.0 nightly build versions I had
> > > earlier.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > This is the exception stacktrace:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Exception in thread "main"
> > > > > > >
> > > org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > > > > > > java.lang.RuntimeException:
> > > > > > > java.lang.reflect.InvocationTargetException
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> > > > > > >
> > > > > > > [java] at
> > > > > > > org.apache.axis2.wsdl.WSDL2Code.main
> > > (WSDL2Code.java:32)
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > > > > > >
> > > > > > > [java] Caused by: java.lang.RuntimeException :
> > > > > > > java.lang.reflect.InvocationTargetException
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java
> > > :92)
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
> > > > > > >
> > > > > > > [java] ... 2 more
> > > > > > >
> > > > > > > [java] Caused by:
> > > > > > > java.lang.reflect.InvocationTargetException
> > > > > > >
> > > > > > > [java] at
> > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke0
> > > (Native Method)
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > > > > > >
> > > > > > > [java] at
> > > java.lang.reflect.Method.invoke(Method.java:585)
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:82)
> > > > > > >
> > > > > > > [java] ... 3 more
> > > > > > >
> > > > > > > [java] Caused by: java.lang.RuntimeException:
> > > > > > > org.apache.xmlbeans.XmlException: error: Problem
> > > parsing
> > > > > > > referenced XML resource - java.io.FileNotFoundException:
> > > > > > > \BMSDispositionService.xsd (The system cannot find the file
> > > specified)
> > > > > > >
> > > > > > > [java] at
> > > > > > >
> > > org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas
> > > (CodeGenerationUtility.java:242)
> > > > > > >
> > > > > > > [java] ... 8 more
> > > > > > >
> > > > > > > [java] Caused by:
> > > org.apache.xmlbeans.XmlException:
> > > > > > > error: Problem parsing referenced XML resource -
> > > > > > > java.io.FileNotFoundException: \SampleService.xsd (The system
> > > > > > > cannot
> > > find
> > > > > > > the file specified)
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Any help on this would be appreciated...
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Sriram
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Paul Fremantle
> > > > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > > > >
> > > > > > http://bloglines.com/blog/paulfremantle
> > > > > > [EMAIL PROTECTED]
> > > > > >
> > > > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Paul Fremantle
> > > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > > >
> > > > > http://bloglines.com/blog/paulfremantle
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Paul Fremantle
> > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > >
> > > > http://bloglines.com/blog/paulfremantle
> > > > [EMAIL PROTECTED]
> > > >
> > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Amila Suriarachchi,
> > > WSO2 Inc.
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > [EMAIL PROTECTED]
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]