cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <>
Subject RE: Does CXF convert a backslash to a forward slash?
Date Fri, 05 Dec 2008 16:16:05 GMT

So it looks like the same issue though I'm not sure why a forward slash
works for you then.

This is what I just tried :

String address = "http://localhost:9080/bookstore/bookurl/" +
            URLEncoder.encode("<post>f\\b</post>", "UTF-8");

in a method

public void post(@PathParam("xml") String s) {
// I get "<post>f\b<\post>"

Can you please try
he-cxf/2.1.4-SNAPSHOT/ ?

This fix should've made it into that snapshot

Another possible workaround - would it be possible to do something like
this as a workaround :

<post platform="Win">f/b</post>

If this attribute is present then it can have either Win or Unix values
only, default - unix. 

I think JAXRS has done a great job of raising the expectations of
developers - and I can only praise the people behind it. But, sometimes,
may be just with one little bit of extra work one can get the result
going the right way anyway :-)

Anyway, that was a short off-topic piece :-) Please try the snapshot or
some sort of workaround to get you going - sorry about the hassle...



-----Original Message-----
From: kpalania [] 
Sent: 05 December 2008 15:08
Subject: Re: Does CXF convert a backslash to a forward slash?

Thanks Sergey. This is what I am doing:

String msgPayload = "Actual XML Message containing elements with
String request = "http://localhost:8080/webservice/apicall/" +
PostMethod method = new PostMethod(request);
HttpClient client = new HttpClient();

The web service call contains an XML fragment. Makes sense?

Sergey Beryozkin-3 wrote:
>> Really? The issue tracked by
>> is it different then?
> This issue has neem fixed on 2.1.4-SNAPSHOT and and 2.2-SNAPSHOT
>> If I use a forward slash, it works just fine but a backslash does
seem to
>> throw this exception as it gets converted to a forward slash. All
that I
>> do
>> before I make the actual web service call is encode the string using
>> URLEncoder. That's pretty much it.
> Do you pass xml as part of URI ? Or as part of a request body, meaning
> POST/PUT body ?
> I think the former is unlikely given that it's working for you with
> forward slashes but to pass an xml fragment in a URI you'll need 
> the CXF-1820 fix which is only available in snapshots.
> In the latter case : it's a different issue altogether - and as I said
> tried to do it and had no problems.
> Can you please post more info in case I'm missing something :
> - capturing HTTP request with tcp trace utility would help a lot : I'd
> like to see the actual XML - please edit to remove any 
> details you would not like to share
> - sample JAXRS service class - including mime annotations
>> Really need this to work to move ahead with my implementation :-(
> No worries, it will work :-)
> Cheers, Sergey
>> Sergey Beryozkin-3 wrote:
>>> JAXRS runtime does not deal at all with deserializing XML per se,
>>> up
>>> to JAXB to handle it, but I tried and see no problems with
>>> passing this value from a client - though this value came from a
>>> file
>>> in my case.
>>> Cheers, Sergey
>> -- 
>> View this message in context:
>> Sent from the cxf-user mailing list archive at

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message