You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2007/08/28 23:13:27 UTC

TUSCANY-1343 - Resolving XSD imports inside WSDL

I was revisiting TUSCANY-1343  [1], and looks like we are still
creating the URL for the imported XSD directly in the
WSDLModelResolver unless the XSD import is defined as "/xxxx", this
would still make the scenario on TUSCANY-1343 fail.

<xsd:import namespace="http://priceQuoteSession"
schemaLocation="PriceQuoteService_schema1.xsd"/>

I was wondering if a better approach would be to try to resolve the
schemaLocation to a valid DeployedArtifact simmilar to the code below
:

DeployedArtifact proxyArtifact = contributionFactory.createDeployedArtifact();
proxyArtifact.setURI(importLocation);

DeployedArtifact importedArtifact =
contribution.getModelResolver().resolveModel(DeployedArtifact.class,
proxyArtifact);


and only try to create the URL (as we are doing today) if that can't
be resolved :

   url = new URL(new URL(parentLocation), importLocation);


I think this might help us on the TUSCANY-1343, Thoughts ?

[1] https://issues.apache.org/jira/browse/TUSCANY-1343

-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: TUSCANY-1343 - Resolving XSD imports inside WSDL

Posted by Luciano Resende <lu...@gmail.com>.
So, in summary you are saying that, the scenario described in
TUSCANY-1343 is invalid, and to make it valid, the schemaLocation
should be set as :

<xsd:import namespace="http://priceQuoteSession"
schemaLocation="/PriceQuoteService_schema1.xsd"/>



On 8/28/07, Raymond Feng <en...@gmail.com> wrote:
> Hi,
>
> By the SCA assembly spec, if an explict resolving mechanism such as
> schemaLocation is present, we should honor it. To be consistent with all the
> existing WSDL/XSD editors/loaders, I think it's better to keep the current
> behavior.
>
> In the case that the uri starts '/'. You proposal sounds good to me. We can
> use the prxoy artifact to find the corresponding artifact in the
> contributions.
>
> Thanks,
> Raymond
>
> ----- Original Message -----
> From: "Luciano Resende" <lu...@gmail.com>
> To: "tuscany-dev" <tu...@ws.apache.org>
> Sent: Tuesday, August 28, 2007 2:13 PM
> Subject: TUSCANY-1343 - Resolving XSD imports inside WSDL
>
>
> >I was revisiting TUSCANY-1343  [1], and looks like we are still
> > creating the URL for the imported XSD directly in the
> > WSDLModelResolver unless the XSD import is defined as "/xxxx", this
> > would still make the scenario on TUSCANY-1343 fail.
> >
> > <xsd:import namespace="http://priceQuoteSession"
> > schemaLocation="PriceQuoteService_schema1.xsd"/>
> >
> > I was wondering if a better approach would be to try to resolve the
> > schemaLocation to a valid DeployedArtifact simmilar to the code below
> > :
> >
> > DeployedArtifact proxyArtifact =
> > contributionFactory.createDeployedArtifact();
> > proxyArtifact.setURI(importLocation);
> >
> > DeployedArtifact importedArtifact =
> > contribution.getModelResolver().resolveModel(DeployedArtifact.class,
> > proxyArtifact);
> >
> >
> > and only try to create the URL (as we are doing today) if that can't
> > be resolved :
> >
> >   url = new URL(new URL(parentLocation), importLocation);
> >
> >
> > I think this might help us on the TUSCANY-1343, Thoughts ?
> >
> > [1] https://issues.apache.org/jira/browse/TUSCANY-1343
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: TUSCANY-1343 - Resolving XSD imports inside WSDL

Posted by Raymond Feng <en...@gmail.com>.
Hi,

By the SCA assembly spec, if an explict resolving mechanism such as 
schemaLocation is present, we should honor it. To be consistent with all the 
existing WSDL/XSD editors/loaders, I think it's better to keep the current 
behavior.

In the case that the uri starts '/'. You proposal sounds good to me. We can 
use the prxoy artifact to find the corresponding artifact in the 
contributions.

Thanks,
Raymond

----- Original Message ----- 
From: "Luciano Resende" <lu...@gmail.com>
To: "tuscany-dev" <tu...@ws.apache.org>
Sent: Tuesday, August 28, 2007 2:13 PM
Subject: TUSCANY-1343 - Resolving XSD imports inside WSDL


>I was revisiting TUSCANY-1343  [1], and looks like we are still
> creating the URL for the imported XSD directly in the
> WSDLModelResolver unless the XSD import is defined as "/xxxx", this
> would still make the scenario on TUSCANY-1343 fail.
>
> <xsd:import namespace="http://priceQuoteSession"
> schemaLocation="PriceQuoteService_schema1.xsd"/>
>
> I was wondering if a better approach would be to try to resolve the
> schemaLocation to a valid DeployedArtifact simmilar to the code below
> :
>
> DeployedArtifact proxyArtifact = 
> contributionFactory.createDeployedArtifact();
> proxyArtifact.setURI(importLocation);
>
> DeployedArtifact importedArtifact =
> contribution.getModelResolver().resolveModel(DeployedArtifact.class,
> proxyArtifact);
>
>
> and only try to create the URL (as we are doing today) if that can't
> be resolved :
>
>   url = new URL(new URL(parentLocation), importLocation);
>
>
> I think this might help us on the TUSCANY-1343, Thoughts ?
>
> [1] https://issues.apache.org/jira/browse/TUSCANY-1343
>
> -- 
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org