Alex,
The remaining part property is varying depending on the routing process.
When the routing starts, this property contains the whole URI for example.
In your client helper, you should use a more stable way of extracting the
interesting parts of your URIs, like relying on the getPath() method.
Once your helpers is changed, you will be able to do this directly:
Client c = Client(Protocol.valueOf("exist"));
c.get("exist:///foo.xml");
Best regards,
Jerome
> -----Message d'origine-----
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la
> part de Alex Milowski
> Envoyé : mardi 3 avril 2007 10:16
> À : [email protected]
> Objet : Reference/Client API question
>
> So, if I do the following:
>
> Client c = Client(Protocol.valueOf("exist"));
> c.get("exist:///foo.xml") ...
>
> the remaining part of the URI passed to the client helper is
> the string "exist:///foo.xml". That doesn't quite make sense to me.
>
>
> If I do:
>
> Client c = Client(Protocol.valueOf("exist"));
> Reference baseRef = new Reference("exist:///");
> c.get(new Reference(baseRef,"foo.xml")) ...
>
> I get an exception when you try to get the remaining part.
>
> What works is:
>
> Client c = Client(Protocol.valueOf("exist"));
> Reference baseRef = new Reference("exist:///");
> c.get(new Reference(baseRef,"exist:///foo.xml")) ...
>
> So, what I am missing about how Reference is handled
> when it is passed to a client helper?
>
> --Alex Milowski