Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

encoding and decoding

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
We begin by testing your absorbancy by exposing you to this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic