You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Brendan Collins <bc...@wandrian.com> on 2008/09/29 21:31:23 UTC

EndpointReferenceUtils resolveResource() changes

Hi,

In moving from cxf 2.1.0 to 2.1.1 (or 2.1.2)  I am encountering the  
following problem:

org.apache.cxf.wsdl.EndpointReferenceUtils.resolveResource() fails to  
resolve schema imports because systemId is null when trying to resolve  
the URI.


Interestingly the comment at the top of EndpointReferenceUtils reads  
as follows:

     /**
      * We want to load the schemas, including references to external  
schemas, into a SchemaFactory
      * to validate. There seem to be bugs in resolving inter-schema  
references in Xerces, so even when we are
      * handing the factory all the schemas, interrelated with  
&lt;import&gt; elements, we need
      * to also hand over extra copies (!) as character images when  
requested.
      *
      * To do this, we use the DOM representation kept in the  
SchemaInfo. This has the bonus
      * of benefiting from the use of the catalog resolver in there,  
which is missing from
      * the code in here.
      */

It looks like the code that this comment refers to was removed in  
2.1.1, and that code does in fact resolve my schema's correctly.

Does anyone have any insight as to how I might fix this....I have  
looked at my schema's trying to find issues with imports and have not  
found any issues. Any suggestions?

Thanks,
Brendan









Re: EndpointReferenceUtils resolveResource() changes

Posted by Benson Margulies <bi...@gmail.com>.
He posted a JIRA, but I didn't look at it for a testcase.

On Mon, Sep 29, 2008 at 5:12 PM, Daniel Kulp <dk...@apache.org> wrote:

>
> It's probably my fault.   I spent a ton of time in that code for 2.1.1
> trying
> to get it to resolve schemas more or less correctly and a bit more quickly.
> There were bunched of problems with schemas not getting resolved in 2.1.0.
> The main thing was to try and use all the schemas that the schemacollection
> had already resolved up front to avoid having to re-resolve them at all.
>
> Apparently, something still isn't quite right there.   Is there any way you
> can bang together a testcase and send off to me?
>
> Thanks!
>
> Dan
>
>
>
> On Monday 29 September 2008 3:31:23 pm Brendan Collins wrote:
> > Hi,
> >
> > In moving from cxf 2.1.0 to 2.1.1 (or 2.1.2)  I am encountering the
> > following problem:
> >
> > org.apache.cxf.wsdl.EndpointReferenceUtils.resolveResource() fails to
> > resolve schema imports because systemId is null when trying to resolve
> > the URI.
> >
> >
> > Interestingly the comment at the top of EndpointReferenceUtils reads
> > as follows:
> >
> >      /**
> >       * We want to load the schemas, including references to external
> > schemas, into a SchemaFactory
> >       * to validate. There seem to be bugs in resolving inter-schema
> > references in Xerces, so even when we are
> >       * handing the factory all the schemas, interrelated with
> > &lt;import&gt; elements, we need
> >       * to also hand over extra copies (!) as character images when
> > requested.
> >       *
> >       * To do this, we use the DOM representation kept in the
> > SchemaInfo. This has the bonus
> >       * of benefiting from the use of the catalog resolver in there,
> > which is missing from
> >       * the code in here.
> >       */
> >
> > It looks like the code that this comment refers to was removed in
> > 2.1.1, and that code does in fact resolve my schema's correctly.
> >
> > Does anyone have any insight as to how I might fix this....I have
> > looked at my schema's trying to find issues with imports and have not
> > found any issues. Any suggestions?
> >
> > Thanks,
> > Brendan
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: EndpointReferenceUtils resolveResource() changes

Posted by Daniel Kulp <dk...@apache.org>.
It's probably my fault.   I spent a ton of time in that code for 2.1.1 trying 
to get it to resolve schemas more or less correctly and a bit more quickly.   
There were bunched of problems with schemas not getting resolved in 2.1.0. 
The main thing was to try and use all the schemas that the schemacollection 
had already resolved up front to avoid having to re-resolve them at all.   

Apparently, something still isn't quite right there.   Is there any way you 
can bang together a testcase and send off to me?

Thanks!

Dan



On Monday 29 September 2008 3:31:23 pm Brendan Collins wrote:
> Hi,
>
> In moving from cxf 2.1.0 to 2.1.1 (or 2.1.2)  I am encountering the
> following problem:
>
> org.apache.cxf.wsdl.EndpointReferenceUtils.resolveResource() fails to
> resolve schema imports because systemId is null when trying to resolve
> the URI.
>
>
> Interestingly the comment at the top of EndpointReferenceUtils reads
> as follows:
>
>      /**
>       * We want to load the schemas, including references to external
> schemas, into a SchemaFactory
>       * to validate. There seem to be bugs in resolving inter-schema
> references in Xerces, so even when we are
>       * handing the factory all the schemas, interrelated with
> &lt;import&gt; elements, we need
>       * to also hand over extra copies (!) as character images when
> requested.
>       *
>       * To do this, we use the DOM representation kept in the
> SchemaInfo. This has the bonus
>       * of benefiting from the use of the catalog resolver in there,
> which is missing from
>       * the code in here.
>       */
>
> It looks like the code that this comment refers to was removed in
> 2.1.1, and that code does in fact resolve my schema's correctly.
>
> Does anyone have any insight as to how I might fix this....I have
> looked at my schema's trying to find issues with imports and have not
> found any issues. Any suggestions?
>
> Thanks,
> Brendan



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: EndpointReferenceUtils resolveResource() changes

Posted by Brendan Collins <bc...@wandrian.com>.
I will enter a bug. Thanks for the quick reply!

On Sep 29, 2008, at 3:35 PM, Benson Margulies wrote:

> I think that I recognize the comment as mine, and I certainly spent  
> many
> happy hours debugging when I originally wrote it. However, someone  
> else must
> have taken it back out. The problem with the null could have been  
> there
> before, during, or after. How about a JIRA and we'll fix it?
>
> On Mon, Sep 29, 2008 at 3:31 PM, Brendan Collins <bcollins@wandrian.com 
> >wrote:
>
>> Hi,
>>
>> In moving from cxf 2.1.0 to 2.1.1 (or 2.1.2)  I am encountering the
>> following problem:
>>
>> org.apache.cxf.wsdl.EndpointReferenceUtils.resolveResource() fails to
>> resolve schema imports because systemId is null when trying to  
>> resolve the
>> URI.
>>
>>
>> Interestingly the comment at the top of EndpointReferenceUtils  
>> reads as
>> follows:
>>
>>   /**
>>    * We want to load the schemas, including references to external
>> schemas, into a SchemaFactory
>>    * to validate. There seem to be bugs in resolving inter-schema
>> references in Xerces, so even when we are
>>    * handing the factory all the schemas, interrelated with  
>> &lt;import&gt;
>> elements, we need
>>    * to also hand over extra copies (!) as character images when
>> requested.
>>    *
>>    * To do this, we use the DOM representation kept in the  
>> SchemaInfo.
>> This has the bonus
>>    * of benefiting from the use of the catalog resolver in there,  
>> which is
>> missing from
>>    * the code in here.
>>    */
>>
>> It looks like the code that this comment refers to was removed in  
>> 2.1.1,
>> and that code does in fact resolve my schema's correctly.
>>
>> Does anyone have any insight as to how I might fix this....I have  
>> looked at
>> my schema's trying to find issues with imports and have not found any
>> issues. Any suggestions?
>>
>> Thanks,
>> Brendan
>>
>>
>>
>>
>>
>>
>>
>>
>>


Re: EndpointReferenceUtils resolveResource() changes

Posted by Benson Margulies <bi...@gmail.com>.
I think that I recognize the comment as mine, and I certainly spent many
happy hours debugging when I originally wrote it. However, someone else must
have taken it back out. The problem with the null could have been there
before, during, or after. How about a JIRA and we'll fix it?

On Mon, Sep 29, 2008 at 3:31 PM, Brendan Collins <bc...@wandrian.com>wrote:

> Hi,
>
> In moving from cxf 2.1.0 to 2.1.1 (or 2.1.2)  I am encountering the
> following problem:
>
> org.apache.cxf.wsdl.EndpointReferenceUtils.resolveResource() fails to
> resolve schema imports because systemId is null when trying to resolve the
> URI.
>
>
> Interestingly the comment at the top of EndpointReferenceUtils reads as
> follows:
>
>    /**
>     * We want to load the schemas, including references to external
> schemas, into a SchemaFactory
>     * to validate. There seem to be bugs in resolving inter-schema
> references in Xerces, so even when we are
>     * handing the factory all the schemas, interrelated with &lt;import&gt;
> elements, we need
>     * to also hand over extra copies (!) as character images when
> requested.
>     *
>     * To do this, we use the DOM representation kept in the SchemaInfo.
> This has the bonus
>     * of benefiting from the use of the catalog resolver in there, which is
> missing from
>     * the code in here.
>     */
>
> It looks like the code that this comment refers to was removed in 2.1.1,
> and that code does in fact resolve my schema's correctly.
>
> Does anyone have any insight as to how I might fix this....I have looked at
> my schema's trying to find issues with imports and have not found any
> issues. Any suggestions?
>
> Thanks,
> Brendan
>
>
>
>
>
>
>
>
>