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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:15:37+00:00 2026-06-05T07:15:37+00:00

I need to have this node in my SOAP Request (using 1.1): <CredentialsHeader xmlns=http://www.url.com/Services/P24ListingService11

  • 0

I need to have this node in my SOAP Request (using 1.1):

<CredentialsHeader xmlns="http://www.url.com/Services/P24ListingService11"
    <EMail>ricky@email.net</EMail>
    <Password>password</Password>
</CredentialsHeader>

So I have the following PHP:

$client = new SoapClient("https://exdev.www.example.com/Services/example.asmx?WSDL", 
    array(
        "trace"      => 1,
        "exceptions" => 0,
        "cache_wsdl" => 0,
        'soap_version' => SOAP_1_1
        )
);

$CredentialObject = new SoapVar(array('EMail' => 'ricky@email.net', 'Password' => 'password'), SOAP_ENC_OBJECT);

Which generates:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.com/Services/Example">
    <SOAP-ENV:Header>
        <ns1:CredentialsHeader>
            <EMail>ricky@email.net</EMail>
            <Password>password</Password>
        </ns1:CredentialsHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:EchoAuthenticated/>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

All I need to do is prevent it using ns1 and actually define the xmlns in the node like so:

<CredentialsHeader xmlns="http://www.example.com/Services/Example">
        <EMail>ricky@email.net</EMail>
        <Password>password</Password>
    </CredentialsHeader>

I have tested that in Firefox Poster and know for a fact that change fixes the problem.

  • 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-05T07:15:38+00:00Added an answer on June 5, 2026 at 7:15 am
    $CredentialObjectXML  = '<CredentialsHeader xmlns="http://www.example.com/Services/Example">
            <EMail>'.$UserName.'</EMail>
            <Password>'.$Password.'</Password>
        </CredentialsHeader>';
    
    
    $CredentialObject  = new SoapVar($CredentialObjectXML,XSD_ANYXML);
    

    This way you can directly use the XML with Type XSD_ANYXML.

    Hope this will resolve your problem.

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

Sidebar

Related Questions

I have this sitemap: <?xml version=1.0 encoding=utf-8 ?> <siteMap xmlns=http://schemas.microsoft.com/AspNet/SiteMap-File-1.0> <siteMapNode> <siteMapNode url=www.google.com title=Google
I have this need to place my app in the share/send context menu so
So I have this need to import (currently) about 15k products. Each product has
I have this regex working but now need to allow numbers without the decimal
I have this application that need to do some things in protected paths (like
I have this schema which I need to match 2 rows from user_data :
I have this JUnit test that I need help developing a Interface and Class
I have this thing that i need to do and some advices will be
I have this file which I need to read the first bytes to check
I have this code and I need to make this work: if ($handle =

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.