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 8678565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:45:12+00:00 2026-06-12T20:45:12+00:00

I have a JAX-WS Web-Service which accepts some basic data and a String which

  • 0

I have a JAX-WS Web-Service which accepts some basic data and a String which is supposed to contains the content of a whole XML file.
In the first time I though I can just put this XML in my SOAP request as a CDATA section like this:

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
    ...
      <contentData>
    <![CDATA[
      <my>
        <xml>
          <here>
            ...
          </here>
        </xml>
      </my>
    ]]>
       </contentData>
       ...
   </soapenv:Body>
</soapenv:Envelope>

But the issue is that my XML data contains as well some CDATA sections and it is not working like this as nested CDATA are not allowed (W3School reference).

What would be the best practice to send such data?

  • solution 1: escaping all special characters in order to have &lt; and
    &gt; (among others)
  • solution 2: convert my XML in base64 and decode
    it in my web-service
  • another solution welcome

I saw this question but serialising the Java object is not an option as the XML data are generated by another side.

  • 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-06-12T20:45:14+00:00Added an answer on June 12, 2026 at 8:45 pm

    I definitely prefer Solution 2, encoding and decoding Base64 formats.

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

Sidebar

Related Questions

I have a Servlet container (Glassfish/OC4J) which service some JAX-WS web service endpoints which
I have a jax-rpc web service. When i try to pass xml to the
I have a JAX-RS web service (using jersey) that accepts a JAXB object as
I have a JAX-B java web service which I'm using to update a database.
I am a newbie in web services. I have a JAX-WS service which I
In java i have created a JAX- web service, which is up and running,
I have developed a web service using JAX-WS and in the web.xml i had
i have local WSDL file. i tried to create JAX-WS Web service client which
I have a web service (JAX-RS/Spring) that generates SQL queries which run against a
I have a jax-ws web service developped using netbeans 7 and glassfish 3.1.2 .

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.