You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Sebastian Gomez <sa...@gmail.com> on 2009/11/27 13:15:27 UTC

xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Hi everyone,

I'm not sure whether this is a bug or if I'm missing something, but I hope
someone can help me out. There's a very similar issue resolved some time
ago[1], but I don't understand why I'm running into it now, using
servicemix-cxf-bc-2009.01. I've had a look at the source code but I don't
really understand how the transforming into an inline XSD really works.
Should I be declaring in the endpoint a list of the XSD files used or
something?

My scenario is the following, in case it helps:

* cxf-bc provider on ESB, with WSDL and XSDs on classpath
* web service deployed outside ESB, publishing WSDL and XSDs.

Thanks in advance,

Sebastian Gomez.

[1] https://issues.apache.org/activemq/browse/SMXCOMP-395

Re: xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Posted by Sebastian Gomez <sa...@gmail.com>.
Hi Freeman,

You are right, now the error has gone. I had compared the snippet you put in
the last message with mine and hadn't realised you had removed the
targetNamespace from the xsd:schema. My apologies.

Thank you very much.

Sebastian Gomez.

On Mon, Nov 30, 2009 at 10:01 AM, Freeman Fang <fr...@gmail.com>wrote:

> Hi,
>
> I've tried it.
>
> Ensure your <xsd:schema> element not has targetNamespace when use import.
>
> Freeman
>
> On 2009-11-30, at 下午4:29, Sebastian Gomez wrote:
>
>  Hi Freeman,
>>
>> I've tried referencing both with "xsd:import", and both with "xsd:include"
>> and I get the same error. Have you tried deploying the testcase changing
>> the
>> lines you said? If so, are you using ServiceMix 3.3.1?
>>
>> On Sat, Nov 28, 2009 at 2:20 PM, Freeman Fang <freeman.fang@gmail.com
>> >wrote:
>>
>>  Hi,
>>>
>>> Change your wsdl:types as
>>>
>>> <wsdl:types>
>>>  <xsd:schema>
>>>    <xsd:import namespace="http://my.namespace/"
>>> schemaLocation="../xsd/xsdInclude.xsd" />
>>>    <xsd:import namespace="http://my.namespace/"
>>> schemaLocation="../xsd/xsdImport.xsd" />
>>>  </xsd:schema>
>>> </wsdl:types>
>>>
>>> in your wsdl, it should work.
>>>
>>> Freeman
>>>
>>> On Fri, Nov 27, 2009 at 11:38 PM, Sebastian Gomez <sa...@gmail.com>
>>> wrote:
>>>
>>>  Hi Freeman,
>>>>
>>>> Thanks for answering. I've attached a zip file with a cxf-bc service
>>>> unit
>>>> and a service assembly to reproduce the problem (and a pom so all you
>>>>
>>> need
>>>
>>>> to build is to "mvn clean install"). Hope you can detect what's wrong.
>>>>
>>> I've
>>>
>>>> referenced two different XSD files from the WSDL, one using "xs:import",
>>>>
>>> the
>>>
>>>> other using "xs:include". You'll see the following log message when you
>>>> deploy it:
>>>>
>>>> WARN  - WSDL1Processor                 - Error retrieving interfaces
>>>> from
>>>> servic
>>>> e description: WSDLException (at
>>>>
>>> /wsdl:definitions/wsdl:types/xsd:schema):
>>>
>>>> fault
>>>> Code=OTHER_ERROR: An error occurred trying to resolve schema referenced
>>>>
>>> at
>>>
>>>> '../x
>>>> sd/xsdImport.xsd'.: java.io.FileNotFoundException: This file was not
>>>>
>>> found:
>>>
>>>> file
>>>> :/C:/desarrollo/apache-servicemix-3.3.1/../xsd/xsdImport.xsd
>>>>
>>>> Though it's complaining about the one referenced using "xs:import", I've
>>>> also tried referencing both with "xs:include" and I get the same
>>>>
>>> exception.
>>>
>>>> If you need anything else I'll be willing to help.
>>>>
>>>> Sebastian Gomez.
>>>>
>>>> On Fri, Nov 27, 2009 at 1:40 PM, Freeman Fang <freeman.fang@gmail.com
>>>> wrote:
>>>>
>>>>  Hi,
>>>>>
>>>>> Any chance you could append a working testcase which I can build,
>>>>> deploy
>>>>> and reproduce this problem?
>>>>> You can remove your business logic and simplify the wsdl/xsd, just
>>>>> reproduce the problem would be a great help.
>>>>>
>>>>> Thanks
>>>>> Freeman
>>>>>
>>>>>
>>>>> On 2009-11-27, at 下午8:15, Sebastian Gomez wrote:
>>>>>
>>>>> Hi everyone,
>>>>>
>>>>>>
>>>>>> I'm not sure whether this is a bug or if I'm missing something, but I
>>>>>> hope
>>>>>> someone can help me out. There's a very similar issue resolved some
>>>>>>
>>>>> time
>>>
>>>> ago[1], but I don't understand why I'm running into it now, using
>>>>>> servicemix-cxf-bc-2009.01. I've had a look at the source code but I
>>>>>>
>>>>> don't
>>>
>>>> really understand how the transforming into an inline XSD really works.
>>>>>> Should I be declaring in the endpoint a list of the XSD files used or
>>>>>> something?
>>>>>>
>>>>>> My scenario is the following, in case it helps:
>>>>>>
>>>>>> * cxf-bc provider on ESB, with WSDL and XSDs on classpath
>>>>>> * web service deployed outside ESB, publishing WSDL and XSDs.
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Sebastian Gomez.
>>>>>>
>>>>>> [1] https://issues.apache.org/activemq/browse/SMXCOMP-395
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>
>>>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>

Re: xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I've tried it.

Ensure your <xsd:schema> element not has targetNamespace when use  
import.

Freeman
On 2009-11-30, at 下午4:29, Sebastian Gomez wrote:

> Hi Freeman,
>
> I've tried referencing both with "xsd:import", and both with  
> "xsd:include"
> and I get the same error. Have you tried deploying the testcase  
> changing the
> lines you said? If so, are you using ServiceMix 3.3.1?
>
> On Sat, Nov 28, 2009 at 2:20 PM, Freeman Fang  
> <fr...@gmail.com>wrote:
>
>> Hi,
>>
>> Change your wsdl:types as
>>
>> <wsdl:types>
>>   <xsd:schema>
>>     <xsd:import namespace="http://my.namespace/"
>> schemaLocation="../xsd/xsdInclude.xsd" />
>>     <xsd:import namespace="http://my.namespace/"
>> schemaLocation="../xsd/xsdImport.xsd" />
>>   </xsd:schema>
>> </wsdl:types>
>>
>> in your wsdl, it should work.
>>
>> Freeman
>>
>> On Fri, Nov 27, 2009 at 11:38 PM, Sebastian Gomez <sa...@gmail.com>
>> wrote:
>>
>>> Hi Freeman,
>>>
>>> Thanks for answering. I've attached a zip file with a cxf-bc  
>>> service unit
>>> and a service assembly to reproduce the problem (and a pom so all  
>>> you
>> need
>>> to build is to "mvn clean install"). Hope you can detect what's  
>>> wrong.
>> I've
>>> referenced two different XSD files from the WSDL, one using  
>>> "xs:import",
>> the
>>> other using "xs:include". You'll see the following log message  
>>> when you
>>> deploy it:
>>>
>>> WARN  - WSDL1Processor                 - Error retrieving  
>>> interfaces from
>>> servic
>>> e description: WSDLException (at
>> /wsdl:definitions/wsdl:types/xsd:schema):
>>> fault
>>> Code=OTHER_ERROR: An error occurred trying to resolve schema  
>>> referenced
>> at
>>> '../x
>>> sd/xsdImport.xsd'.: java.io.FileNotFoundException: This file was not
>> found:
>>> file
>>> :/C:/desarrollo/apache-servicemix-3.3.1/../xsd/xsdImport.xsd
>>>
>>> Though it's complaining about the one referenced using  
>>> "xs:import", I've
>>> also tried referencing both with "xs:include" and I get the same
>> exception.
>>> If you need anything else I'll be willing to help.
>>>
>>> Sebastian Gomez.
>>>
>>> On Fri, Nov 27, 2009 at 1:40 PM, Freeman Fang  
>>> <freeman.fang@gmail.com
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Any chance you could append a working testcase which I can build,  
>>>> deploy
>>>> and reproduce this problem?
>>>> You can remove your business logic and simplify the wsdl/xsd, just
>>>> reproduce the problem would be a great help.
>>>>
>>>> Thanks
>>>> Freeman
>>>>
>>>>
>>>> On 2009-11-27, at 下午8:15, Sebastian Gomez wrote:
>>>>
>>>> Hi everyone,
>>>>>
>>>>> I'm not sure whether this is a bug or if I'm missing something,  
>>>>> but I
>>>>> hope
>>>>> someone can help me out. There's a very similar issue resolved  
>>>>> some
>> time
>>>>> ago[1], but I don't understand why I'm running into it now, using
>>>>> servicemix-cxf-bc-2009.01. I've had a look at the source code  
>>>>> but I
>> don't
>>>>> really understand how the transforming into an inline XSD really  
>>>>> works.
>>>>> Should I be declaring in the endpoint a list of the XSD files  
>>>>> used or
>>>>> something?
>>>>>
>>>>> My scenario is the following, in case it helps:
>>>>>
>>>>> * cxf-bc provider on ESB, with WSDL and XSDs on classpath
>>>>> * web service deployed outside ESB, publishing WSDL and XSDs.
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Sebastian Gomez.
>>>>>
>>>>> [1] https://issues.apache.org/activemq/browse/SMXCOMP-395
>>>>>
>>>>
>>>>
>>>> --
>>>> Freeman Fang
>>>> ------------------------
>>>> Open Source SOA: http://fusesource.com
>>>>
>>>>
>>>
>>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com


Re: xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Posted by Sebastian Gomez <sa...@gmail.com>.
Hi Freeman,

I've tried referencing both with "xsd:import", and both with "xsd:include"
and I get the same error. Have you tried deploying the testcase changing the
lines you said? If so, are you using ServiceMix 3.3.1?

On Sat, Nov 28, 2009 at 2:20 PM, Freeman Fang <fr...@gmail.com>wrote:

> Hi,
>
> Change your wsdl:types as
>
> <wsdl:types>
>    <xsd:schema>
>      <xsd:import namespace="http://my.namespace/"
> schemaLocation="../xsd/xsdInclude.xsd" />
>      <xsd:import namespace="http://my.namespace/"
> schemaLocation="../xsd/xsdImport.xsd" />
>    </xsd:schema>
>  </wsdl:types>
>
> in your wsdl, it should work.
>
> Freeman
>
> On Fri, Nov 27, 2009 at 11:38 PM, Sebastian Gomez <sa...@gmail.com>
> wrote:
>
> > Hi Freeman,
> >
> > Thanks for answering. I've attached a zip file with a cxf-bc service unit
> > and a service assembly to reproduce the problem (and a pom so all you
> need
> > to build is to "mvn clean install"). Hope you can detect what's wrong.
> I've
> > referenced two different XSD files from the WSDL, one using "xs:import",
> the
> > other using "xs:include". You'll see the following log message when you
> > deploy it:
> >
> > WARN  - WSDL1Processor                 - Error retrieving interfaces from
> > servic
> > e description: WSDLException (at
> /wsdl:definitions/wsdl:types/xsd:schema):
> > fault
> > Code=OTHER_ERROR: An error occurred trying to resolve schema referenced
> at
> > '../x
> > sd/xsdImport.xsd'.: java.io.FileNotFoundException: This file was not
> found:
> > file
> > :/C:/desarrollo/apache-servicemix-3.3.1/../xsd/xsdImport.xsd
> >
> > Though it's complaining about the one referenced using "xs:import", I've
> > also tried referencing both with "xs:include" and I get the same
> exception.
> > If you need anything else I'll be willing to help.
> >
> > Sebastian Gomez.
> >
> > On Fri, Nov 27, 2009 at 1:40 PM, Freeman Fang <freeman.fang@gmail.com
> >wrote:
> >
> >> Hi,
> >>
> >> Any chance you could append a working testcase which I can build, deploy
> >> and reproduce this problem?
> >> You can remove your business logic and simplify the wsdl/xsd, just
> >> reproduce the problem would be a great help.
> >>
> >> Thanks
> >> Freeman
> >>
> >>
> >> On 2009-11-27, at 下午8:15, Sebastian Gomez wrote:
> >>
> >>  Hi everyone,
> >>>
> >>> I'm not sure whether this is a bug or if I'm missing something, but I
> >>> hope
> >>> someone can help me out. There's a very similar issue resolved some
> time
> >>> ago[1], but I don't understand why I'm running into it now, using
> >>> servicemix-cxf-bc-2009.01. I've had a look at the source code but I
> don't
> >>> really understand how the transforming into an inline XSD really works.
> >>> Should I be declaring in the endpoint a list of the XSD files used or
> >>> something?
> >>>
> >>> My scenario is the following, in case it helps:
> >>>
> >>> * cxf-bc provider on ESB, with WSDL and XSDs on classpath
> >>> * web service deployed outside ESB, publishing WSDL and XSDs.
> >>>
> >>> Thanks in advance,
> >>>
> >>> Sebastian Gomez.
> >>>
> >>> [1] https://issues.apache.org/activemq/browse/SMXCOMP-395
> >>>
> >>
> >>
> >> --
> >> Freeman Fang
> >> ------------------------
> >> Open Source SOA: http://fusesource.com
> >>
> >>
> >
>

Re: xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Change your wsdl:types as

<wsdl:types>
    <xsd:schema>
      <xsd:import namespace="http://my.namespace/"
schemaLocation="../xsd/xsdInclude.xsd" />
      <xsd:import namespace="http://my.namespace/"
schemaLocation="../xsd/xsdImport.xsd" />
    </xsd:schema>
  </wsdl:types>

in your wsdl, it should work.

Freeman

On Fri, Nov 27, 2009 at 11:38 PM, Sebastian Gomez <sa...@gmail.com> wrote:

> Hi Freeman,
>
> Thanks for answering. I've attached a zip file with a cxf-bc service unit
> and a service assembly to reproduce the problem (and a pom so all you need
> to build is to "mvn clean install"). Hope you can detect what's wrong. I've
> referenced two different XSD files from the WSDL, one using "xs:import", the
> other using "xs:include". You'll see the following log message when you
> deploy it:
>
> WARN  - WSDL1Processor                 - Error retrieving interfaces from
> servic
> e description: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema):
> fault
> Code=OTHER_ERROR: An error occurred trying to resolve schema referenced at
> '../x
> sd/xsdImport.xsd'.: java.io.FileNotFoundException: This file was not found:
> file
> :/C:/desarrollo/apache-servicemix-3.3.1/../xsd/xsdImport.xsd
>
> Though it's complaining about the one referenced using "xs:import", I've
> also tried referencing both with "xs:include" and I get the same exception.
> If you need anything else I'll be willing to help.
>
> Sebastian Gomez.
>
> On Fri, Nov 27, 2009 at 1:40 PM, Freeman Fang <fr...@gmail.com>wrote:
>
>> Hi,
>>
>> Any chance you could append a working testcase which I can build, deploy
>> and reproduce this problem?
>> You can remove your business logic and simplify the wsdl/xsd, just
>> reproduce the problem would be a great help.
>>
>> Thanks
>> Freeman
>>
>>
>> On 2009-11-27, at 下午8:15, Sebastian Gomez wrote:
>>
>>  Hi everyone,
>>>
>>> I'm not sure whether this is a bug or if I'm missing something, but I
>>> hope
>>> someone can help me out. There's a very similar issue resolved some time
>>> ago[1], but I don't understand why I'm running into it now, using
>>> servicemix-cxf-bc-2009.01. I've had a look at the source code but I don't
>>> really understand how the transforming into an inline XSD really works.
>>> Should I be declaring in the endpoint a list of the XSD files used or
>>> something?
>>>
>>> My scenario is the following, in case it helps:
>>>
>>> * cxf-bc provider on ESB, with WSDL and XSDs on classpath
>>> * web service deployed outside ESB, publishing WSDL and XSDs.
>>>
>>> Thanks in advance,
>>>
>>> Sebastian Gomez.
>>>
>>> [1] https://issues.apache.org/activemq/browse/SMXCOMP-395
>>>
>>
>>
>> --
>> Freeman Fang
>> ------------------------
>> Open Source SOA: http://fusesource.com
>>
>>
>

Re: xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Posted by Sebastian Gomez <sa...@gmail.com>.
Hi Freeman,

Thanks for answering. I've attached a zip file with a cxf-bc service unit
and a service assembly to reproduce the problem (and a pom so all you need
to build is to "mvn clean install"). Hope you can detect what's wrong. I've
referenced two different XSD files from the WSDL, one using "xs:import", the
other using "xs:include". You'll see the following log message when you
deploy it:

WARN  - WSDL1Processor                 - Error retrieving interfaces from
servic
e description: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema):
fault
Code=OTHER_ERROR: An error occurred trying to resolve schema referenced at
'../x
sd/xsdImport.xsd'.: java.io.FileNotFoundException: This file was not found:
file
:/C:/desarrollo/apache-servicemix-3.3.1/../xsd/xsdImport.xsd

Though it's complaining about the one referenced using "xs:import", I've
also tried referencing both with "xs:include" and I get the same exception.
If you need anything else I'll be willing to help.

Sebastian Gomez.

On Fri, Nov 27, 2009 at 1:40 PM, Freeman Fang <fr...@gmail.com>wrote:

> Hi,
>
> Any chance you could append a working testcase which I can build, deploy
> and reproduce this problem?
> You can remove your business logic and simplify the wsdl/xsd, just
> reproduce the problem would be a great help.
>
> Thanks
> Freeman
>
>
> On 2009-11-27, at 下午8:15, Sebastian Gomez wrote:
>
>  Hi everyone,
>>
>> I'm not sure whether this is a bug or if I'm missing something, but I hope
>> someone can help me out. There's a very similar issue resolved some time
>> ago[1], but I don't understand why I'm running into it now, using
>> servicemix-cxf-bc-2009.01. I've had a look at the source code but I don't
>> really understand how the transforming into an inline XSD really works.
>> Should I be declaring in the endpoint a list of the XSD files used or
>> something?
>>
>> My scenario is the following, in case it helps:
>>
>> * cxf-bc provider on ESB, with WSDL and XSDs on classpath
>> * web service deployed outside ESB, publishing WSDL and XSDs.
>>
>> Thanks in advance,
>>
>> Sebastian Gomez.
>>
>> [1] https://issues.apache.org/activemq/browse/SMXCOMP-395
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>

Re: xsd:import throws FileNotFoundException on servicemix-cxf-bc-2009.01

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Any chance you could append a working testcase which I can build,  
deploy and reproduce this problem?
You can remove your business logic and simplify the wsdl/xsd, just  
reproduce the problem would be a great help.

Thanks
Freeman

On 2009-11-27, at 下午8:15, Sebastian Gomez wrote:

> Hi everyone,
>
> I'm not sure whether this is a bug or if I'm missing something, but  
> I hope
> someone can help me out. There's a very similar issue resolved some  
> time
> ago[1], but I don't understand why I'm running into it now, using
> servicemix-cxf-bc-2009.01. I've had a look at the source code but I  
> don't
> really understand how the transforming into an inline XSD really  
> works.
> Should I be declaring in the endpoint a list of the XSD files used or
> something?
>
> My scenario is the following, in case it helps:
>
> * cxf-bc provider on ESB, with WSDL and XSDs on classpath
> * web service deployed outside ESB, publishing WSDL and XSDs.
>
> Thanks in advance,
>
> Sebastian Gomez.
>
> [1] https://issues.apache.org/activemq/browse/SMXCOMP-395


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com