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

  • SEARCH
  • Home
  • 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 467981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:38:11+00:00 2026-05-12T23:38:11+00:00

What is the difference between the following pieces of xml? The reason I ask

  • 0

What is the difference between the following pieces of xml?

The reason I ask is that when I submit the xml to a BPEL process the first and second one work but the last one does not, what is going on?

<!-- imported namespace referenced with prefix -->
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fxd="http://aaa.yy.zz/Foo">
     <soap:Body>
         <fxd:GSR>
             <aaa>
                 <a>1000000</a>
                 <c>UUU</c>
                 <cp>ZZ</cp>
             </aaa>
             <bbb>
                 <cc>CCC</cc>
                 <v>110005632501</v>
             </bbb>
             <adate>2009-11-04T07:14:44.5814828+02:00</adate>
             <bdate>2009-11-04T07:14:44.5814828+02:00</bdate>
             <m>NNNN</m>
             <p>SSSS</p>
             <r>LLLL</r>
         </fxd:GSR>
     </soap:Body>
    </soap:Envelope>        

<!-- inline imported namespace referenced with a prefix-->
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <soap:Body>
         <fxd:GSR xmlns:fxd="http://aaa.yy.zz/Foo">
             <aaa>
                 <a>1000000</a>
                 <c>UUU</c>
                 <cp>ZZ</cp>
             </aaa>
             <bbb>
                 <cc>CCC</cc>
                 <v>110005632501</v>
             </bbb>
             <adate>2009-11-04T07:14:44.5814828+02:00</adate>
             <bdate>2009-11-04T07:14:44.5814828+02:00</bdate>
             <m>NNNN</m>
             <p>SSSS</p>
             <r>LLLL</r>
         </fxd:GSR>
     </soap:Body>
</soap:Envelope>


<!-- inline namespace -->
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
           <GSR xmlns="http://aaa.yy.zz/Foo">
               <aaa>
                   <a>1000000</a>
                   <c>UUU</c>
                   <cp>ZZ</cp>
               </aaa>
               <bbb>
                   <cc>CCC</cc>
                   <v>110005632501</v>
               </bbb>
               <adate>2009-11-04T07:14:44.5814828+02:00</adate>
               <bdate>2009-11-04T07:14:44.5814828+02:00</bdate>
               <m>NNNN</m>
               <p>SSSS</p>
               <r>LLLL</r>
           </GSR>
       </soap:Body>
</soap:Envelope>

My intuition says they are equivalent pieces of xml, especially considering they come from the same wsdl. They are parsed successfully but the namespaces of the elements are not what they should be.

  • 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-12T23:38:11+00:00Added an answer on May 12, 2026 at 11:38 pm

    They are not equal. That is, example 1 and 2 are equal, but 3 is not.

    Look at <fxd:GSR> in contrast to <GSR>. You see, that the first one is prefixed. Now, if you define a namespace xmlns:fxd="", all equally prefixed elements are set in this namespace. All others (including elements without any prefix at all) are not in this namespace.

    Then, in your third example, you define a namespace for all unprefixed elements. This leads to the fact, that the unprefixed children of GSR are suddenly in the same namespace as their ancestor, not in the nullnamespace they were before in 1 and 2.

    Edit: Just a small clarification:

    xmlns:fxd="http://aaa.yy.zz/Foo"
    

    sets the namespace to “http://aaa.yy.zz/Foo” for all elements that start with ‘fxd:’.

    xmlns="http://aaa.yy.zz/Foo"
    

    sets the namespace to “http://aaa.yy.zz/Foo” for all elements that have no colon in their name (= they are not prefixed).

    If you want 1 and 2 to behave like 3, just add

    xmlns="http://aaa.yy.zz/Foo"
    

    somewhere before the first unprefixed element occurs. If you want it the other way round, you would have to prefix all elements you want to be in no namespace with, say, ‘bar:’ and add this somewhere:

    xmlns:bar=""
    

    thus explicitly setting them in the null namespace (as they are in the first two examples).

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

Sidebar

Related Questions

Is there any difference between the following two examples and should one be preferred
What's the difference between the following two? The first 1 works but the 2nd
Is there a performance difference between the following two pieces of code? if (myCondition)
Consider two following pieces of code - the only difference between them is a
What is the difference between the following pieces of SQL code: select count(*) from
Is there any difference between the following pieces of code in terms of processor
What's the difference between the following two pieces of code - with regards to
Whats the difference between the following pieces of code from objective C stand point?
I want to know that difference between following two lines name1 = [[NSString stringWithUTF8String:(char
I cannot figure out what the difference between the following pieces of code is:

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.