You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by Guillaume Nodet <gn...@gmail.com> on 2006/09/12 21:23:10 UTC
Two problems
I'm trying to use the just released M5.
I noticed the following problems:
#1. The following code result in an NPE
Document doc = ...;
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
WSDLSource src = reader.createWSDLSource();
src.setSource(doc);
reader.readWSDL(src);
I had to put a dummy base uri to avoid the NPE:
src.setBaseURI(new URI("file:doc"));
#2. The HTTP binding allows '{' and '}' to be part of the
whttp:location attribute as shown in
http://www.w3.org/TR/2006/CR-wsdl20-adjuncts-20060106/#_http_operation_location_notcited_iri
But i have the following output when parsing such extensions:
Woden[Error],0:0,WSDL506,Could not create a URI from the string
"{id}".,java.net.URISyntaxException:Illegal character in path at index
0: {id}
I think that the location attribute should not be a URI in the
component model, but a plain string.
--
Cheers,
Guillaume Nodet
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: Two problems
Posted by Guillaume Nodet <gn...@gmail.com>.
On 9/12/06, Jeremy Hughes <hu...@apache.org> wrote:
> Hi Guillaume,
>
> Could you open JIRAs for these please.
>
> On 9/12/06, Guillaume Nodet <gn...@gmail.com> wrote:
> > I'm trying to use the just released M5.
>
> that seems a long time ago to me have you tried the latest code?
>
> > I noticed the following problems:
> >
> > #1. The following code result in an NPE
> > Document doc = ...;
> > WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
> > WSDLSource src = reader.createWSDLSource();
> > src.setSource(doc);
> > reader.readWSDL(src);
> > I had to put a dummy base uri to avoid the NPE:
> > src.setBaseURI(new URI("file:doc"));
>
> perhaps you could open a JIRA for this. thanks
This one is solved using svn head.
I should have tried first, sorry ...
>
> >
> > #2. The HTTP binding allows '{' and '}' to be part of the
> > whttp:location attribute as shown in
> > http://www.w3.org/TR/2006/CR-wsdl20-adjuncts-20060106/#_http_operation_location_notcited_iri
> > But i have the following output when parsing such extensions:
> > Woden[Error],0:0,WSDL506,Could not create a URI from the string
> > "{id}".,java.net.URISyntaxException:Illegal character in path at index
> > 0: {id}
> > I think that the location attribute should not be a URI in the
> > component model, but a plain string.
>
> this is down to Woden only supporting URIs and not IRIs. IRIs can
> contain { and } but URIs can't. The URI class in Java 1.4 and 5
> doesn't support IRIs. Java 6 was going to support the IRI RFC but
> they've backed out of that [1]. That's the current state - we could
> try implementing our own IRI class, but I'm anxious what this will
> entail now that the JCP community decided they couldn't (yet).
>
> [1] http://java.sun.com/javase/6/webnotes/index.html
Thanks for the explanation.
I already found workarounds, but they seem quite ugly:
instead of {id}, you can encode %7Bid%7C
or retrieve it using:
XMLAttr attr =
bOperation.toElement().getExtensionAttribute(HTTPConstants.Q_ATTR_LOCATION);
if (attr != null) {
location = attr.toExternalForm();
}
Would a plain string be acceptable in the API instead of a URI ?
>
> Regards,
> Jeremy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: woden-dev-help@ws.apache.org
>
>
--
Cheers,
Guillaume Nodet
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
Re: Two problems
Posted by Jeremy Hughes <hu...@apache.org>.
Hi Guillaume,
Could you open JIRAs for these please.
On 9/12/06, Guillaume Nodet <gn...@gmail.com> wrote:
> I'm trying to use the just released M5.
that seems a long time ago to me have you tried the latest code?
> I noticed the following problems:
>
> #1. The following code result in an NPE
> Document doc = ...;
> WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
> WSDLSource src = reader.createWSDLSource();
> src.setSource(doc);
> reader.readWSDL(src);
> I had to put a dummy base uri to avoid the NPE:
> src.setBaseURI(new URI("file:doc"));
perhaps you could open a JIRA for this. thanks
>
> #2. The HTTP binding allows '{' and '}' to be part of the
> whttp:location attribute as shown in
> http://www.w3.org/TR/2006/CR-wsdl20-adjuncts-20060106/#_http_operation_location_notcited_iri
> But i have the following output when parsing such extensions:
> Woden[Error],0:0,WSDL506,Could not create a URI from the string
> "{id}".,java.net.URISyntaxException:Illegal character in path at index
> 0: {id}
> I think that the location attribute should not be a URI in the
> component model, but a plain string.
this is down to Woden only supporting URIs and not IRIs. IRIs can
contain { and } but URIs can't. The URI class in Java 1.4 and 5
doesn't support IRIs. Java 6 was going to support the IRI RFC but
they've backed out of that [1]. That's the current state - we could
try implementing our own IRI class, but I'm anxious what this will
entail now that the JCP community decided they couldn't (yet).
[1] http://java.sun.com/javase/6/webnotes/index.html
Regards,
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org