Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7044555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:25:25+00:00 2026-05-28T02:25:25+00:00

please help me out for the below problem, i am trying since long time(3

  • 0

please help me out for the below problem, i am trying since long time(3 weeks) but not able to get the proper resolution.I have to complete it ASAP ,as my so many webservice output depends on the custom return string.

I have written java code using javax.jws.

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;

    String returnStr = null;

    String responseCodeStart = "<responseCode>";
    String responseCodeEnd = "</responseCode>";
    String responseMessageStart = "<responseMessage>";
    String responseMessageEnd = "</responseMessage>";

Return Custom String in JAVA to SOAP response/Output String :::::::::

 returnStr = "\r\n" + responseCodeStart + "1000" + responseCodeEnd + "\r\n" + responseMessageStart + "Registration successful>>" + responseMessageEnd + "\r\n";

Problem :

1)  I am getting (&lt;) tag instead of (<)
2) I am getting ([CDATA[[) tag in response.

SOAP RESPONSE :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:registerUserResponse xmlns:ns2="http://impl.timecapsule.com/">
         <return>&lt;responseCode>1102&lt;/responseCode>
&lt;responseMessage> [!CDATA[[Please provide username] &lt;/responseMessage></return>
      </ns2:registerUserResponse>
   </soap:Body>
</soap:Envelope>

*Resolution needed:*

    1) &lt; to remove
    2) CDATA to remove

I want to retrieve it as XML object instead of String using java code.


THANKS
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:25:26+00:00Added an answer on May 28, 2026 at 2:25 am

    Use a Framework, if you want to provide or consume a webservice via SOAP.
    You don’t have to use any starting-tags or end-tags, the framework will handle this.

    String responseCodeStart = "<responseCode>";
    String responseCodeEnd = "</responseCode>";
    String responseMessageStart = "<responseMessage>";
    String responseMessageEnd = "</responseMessage>";
    

    If you return a String (not a number inside a class), the encodings are correct. You return a String with special encoded Chars. They HAVE to be encoded this way. otherwise you will create malformed XML.

    javax.jws Tutorial at Oracle
    Webservice-Tutorial

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help me out with an algorithm for the following problem - Given a
Can someone please help me out with a JavaScript/jQuery solution for this arithmetic problem:
Could you please help me find out the time complexity of the Fleury' algorithm
First of all, please help me out! I can not take this anymore. I
Could someone please help me out with the following problem in java. I have
Please help me out on this explode() function issue. I am getting unexpected results
Please help me out here because im getting kind of confused.. I have a
Can someone please help me out with printing the contents of an IFrame via
Ok so could anyone please help me out with the VB for auto entering
I'm a developer and I suck at SQL:) Please help me out here. I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.