This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Web Services and the fly likes UTFDataFormatException when executing transform on soapMessage content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "UTFDataFormatException when executing transform on soapMessage content" Watch "UTFDataFormatException when executing transform on soapMessage content" New topic
Author

UTFDataFormatException when executing transform on soapMessage content

Marko Tekavc
Greenhorn

Joined: Oct 16, 2009
Posts: 3
I want to transform soap message I get from webservice call to pretty printed xml string (using javax.xml.transformer.Transformer). I have this method:


I get java.xml.transform.Source object from calling web service (I don't have direct control on soap response):


This code works just fine on my test server (Glassfish V2) but it throws exception in line (transformer.transform(src, streamResult)) on BEA Weblogic Server:


How can I properly transform soapMessage with javax.xml.transformer?

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
The same exact error - Invalid byte 1 of 1-byte UTF-8 sequence is looked at XML and Invalid byte UTF-8.

Regards,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UTFDataFormatException when executing transform on soapMessage content
 
It's not a secret anymore!