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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:26:54+00:00 2026-06-16T10:26:54+00:00

I have a SOAP request like this : <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:ch=urn://mfots.com/xmlmessaging/CH xmlns:oas=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd> <soapenv:Header> <ch:MFprofileMnt>

  • 0

I have a SOAP request like this :

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ch="urn://mfots.com/xmlmessaging/CH" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<ch:MFprofileMnt>
<ch:myID>1458</ch:myID>
<ch:bigID>raptool</ch:bigID>
<ch:matID>5689</ch:matID>
</ch:MFprofileMnt>

Now i created the request in java like this :

        Name headerContextName = soapEnvelope.createName("MFprofileMnt", "ch","");
        SOAPHeaderElement soapHeaderElement = soapHeader.addHeaderElement(headerContextName);
        // mustUnderstand attribute is used to indicate
        // whether the header entry is mandatory or optional for the
        // recipient to process.
        soapHeaderElement.setMustUnderstand(true);
        //Now set the attribute children
        // create the first child element and set the value
        SOAPElement element1 = soapHeaderElement.addChildElement("myID", "ch");
        element1.setValue("1458");
        //create the second child element and set the value
        SOAPElement element2 = soapHeaderElement.addChildElement("bigID", "ch");
        element2.setValue("raptool");
        //create the third child element and set the value
        SOAPElement element3 = soapHeaderElement.addChildElement("matID", "ch");
        element3.setValue("5689");

However, When i run the program , i keep getting these errors :

org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
faultActor: null
faultDetail:

I am really stuck here . Kindly, somebody help me out here .

  • 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-16T10:26:55+00:00Added an answer on June 16, 2026 at 10:26 am

    I did a lot of research in it and found out my mistake. I was not passing the Security namespace URL. So instead of :

    Name headerContextName = soapEnvelope.createName("MFprofileMnt", "ch","");
    

    I gave it as :

    Name headerContextName = soapEnvelope.createName("MFprofileMnt", "ch",SOAP_Security_Namespace_URL);
    

    And voila it started working and there was no name space error . Hope this helps other guys who come across similar problems .

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

Sidebar

Related Questions

I need to create SOAP request like this: <soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ xmlns:stor=http://storage.xdoc.xx/> <soapenv:Header/> <soapenv:Body> <stor:createDocument>
I have a soap request returning a response like below: <SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
I need to have this node in my SOAP Request (using 1.1): <CredentialsHeader xmlns=http://www.url.com/Services/P24ListingService11
We have a wrapper around a suds (SOAP) request, that we use like this
I have asimple WCF HTTP/SOAP web service, the service implementation looks something like this:
I need to create a SOAP request which looks like this: <soapenv:Body> <getItemsForProject> <token>
I am instantiating a PHP Soap Client like this: $client = new SoapClient('http://localhost:8731/MathService?wsdl',array( 'login'
hi i have a flow in mule like this <flow name=MuleService> <vm:inbound-endpoint path=ms exchange-pattern=request-response
I have a small PDF that uses soap.request() to submit data This works fine
The header in my SOAP doc needs to have an attribute like this: <soap:Header>

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.