Hi 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 @Path("/bookstore/{xml}") public void post(@PathParam("xml") String s) { // I get "<post>f\b<\post>" } Can you please try http://people.apache.org/repo/m2-snapshot-repository/org/apache/cxf/apac 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... Sergey -----Original Message----- From: kpalania [mailto:[EMAIL PROTECTED] Sent: 05 December 2008 15:08 To: [email protected] 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 backslashes"; String request = "http://localhost:8080/webservice/apicall/" + msgPayload; PostMethod method = new PostMethod(request); HttpClient client = new HttpClient(); client.executeMethod(method); The web service call contains an XML fragment. Makes sense? Sergey Beryozkin-3 wrote: > > > >> >> Really? The issue tracked by >> http://issues.apache.org/jira/browse/CXF-1820, >> 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 the >> URLEncoder. That's pretty much it. > > Do you pass xml as part of URI ? Or as part of a request body, meaning the > 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 I > 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, it's >>> 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 text >>> file >>> in my case. >>> >>> Cheers, Sergey >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Does-CXF-convert-a-backslash-to-a-forward-slash--t p20837718p20839919.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> >> > > > > -- View this message in context: http://www.nabble.com/Does-CXF-convert-a-backslash-to-a-forward-slash--t p20837718p20855757.html Sent from the cxf-user mailing list archive at Nabble.com.
