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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:18:57+00:00 2026-06-04T12:18:57+00:00

I have written a soap/web service that returns a string such as: <GeocodeResponse><City>Denver</City><State>CO</State></GeocodeResponse> I

  • 0

I have written a soap/web service that returns a string such as:

"<GeocodeResponse><City>Denver</City><State>CO</State></GeocodeResponse>"

I have defined a schema for this data:

<xs:element name="GeocodeResponse">
<xs:complexType>
    <xs:sequence>
        <xs:element name="City"/>
        <xs:element name="State"/>
    </xs:sequence>
</xs:complexType>
</xs:element>

and this is returned as the response for my web service method

<xs:complexType name="standardizeResponse">
  <xs:sequence>
     <GeocodeResponse/>
  </xs:sequence>
</xs:complexType>

Within the soap envelope, the Xml is escaped so instead of getting the xml I want, I get something like:
&lt;GeocodeResponse&gt;&lt;City&gt;Denver&lt;/City&gt;&lt;State&gt;CO&lt;/State&gt;&lt;/GeocodeResponse&gt;

I thought that by using the schema to define what is returned in the string that I would avoid having the string escaped.

  • 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-04T12:18:59+00:00Added an answer on June 4, 2026 at 12:18 pm

    When you provide a raw string to an XML processor, the understanding is that the meaning of the string is to be conveyed to a receiver such that the actual string can be reconstructed. This means that the processor will escape any of the reserved XML characters (< > & % ‘) so that they are not misconstrued as part of the document rather than the message in the document.

    If you use xjc to generate objects to reflect the schemas (or, better yet, wsimport to generate objects and service stubs from a WSDL), you can populate the generated object with the data and then use a Marshaller to construct the response message which will then be rendered as properly tagged XML. The Marshaller documentation actually provides good examples of usage to marshal into various forms (http://docs.oracle.com/javase/6/docs/api/javax/xml/bind/Marshaller.html).

    I am making assumptions to make up for a lack of context so if this answer does not seem to apply, please respond as such and include the actual service endpoint code and I (or another responder) can revisit.

    Good luck!

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

Sidebar

Related Questions

I have web service written that generates some data...can I call the web service
I have an application that connects via https to a SOAP-based web service that
I have a SOAP web service written in java communicating via XML-utf-8. My produced
I have written a SOAP based web service which runs fine on a Tomcat
I have a web service written in C# using SOAP. A client has requested
I have defined a web service that will return the data from my mysql
I have written a .NET web Service that is to be consumed by a
I have written a service that I would like expose both via rest and
I have a web service that I can only hit if I'm logged into
I have a web service with a client written in Java. The service works

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.