Skip to main content

Simple newbie question: ws to return xml response

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2010-12-30


I'm trying to build web service that must return xml response:

<?xml version="1.0" encoding="utf-8"?>
<userInfo xmlns = "http://schemas.somepage">
<error code="ok"/>

I construct that xml response from JAXB classes but my jax-ws web service respond with this SOAP msg:

<S:Envelope xmlns:S="">
<GetUserInfoResponse xmlns="http://schemas.somepage">
<GetUserInfoResult><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userInfo xmlns="http://schemas.somepage">
<error code="ok"/>

So it respond xml in xml message... pls give me the way, how to pass only my constructed xml response

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-12-30

Thanks for so many answers :)
My SOAP msg is correct - I should return xml as String