This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes encoding and decoding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "encoding and decoding" Watch "encoding and decoding" New topic
Author

encoding and decoding

Jaan Smith
Greenhorn

Joined: Jun 19, 2006
Posts: 5
I make a webservice call and get a String which is encoded using C function on Linux O/S.
Now I have to decode it, but when I try to decode it, it throw exception "UUDecoder: No begin line"
So I try to wrap it in "begin" and "end", it throws a differnt exception 'UUDecoder: Malformed begin line." or if i wrap it inside
"begin 644 encoder.buf" "end" it throws "wrong line lenght".

The encoding is done on Linux O/S using C, and I am decoding it on window XP using Java.




Thanks in advance
Jaan Smith
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Welcome to JavaRanch.

It's very uncommon to use UU with WS. If I remember it correctly, line breaks and white space are important, so you'd need to take care to preserve those, probably using CDATA sections. Any chance you can use base64 (e.g. using Jakarta Commons Codec), which is the common choice with web services?

To debug the problem, you could get a known text sent over the WS, and see what it looks like UU-encoded, and then compare it to what UU-encode makes of the cleartext.
[ June 19, 2006: Message edited by: Ulf Dittmer ]

Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: encoding and decoding
 
Similar Threads
Encoding and Decoding Issues across OS
Whats the best way to encode in JavaScript and Decode in Java code?
Commons codec Base64 problem
Image file data decoding...
Basic Authentication Servlet Redirect