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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:53:54+00:00 2026-06-05T10:53:54+00:00

I am using SOAP web services for the first time and i am having

  • 0

I am using SOAP web services for the first time and i am having a problem in calling the SOAP server. I searched through WSDL SOAP request not i am not able to solve my problem. This is the snippet of my WSDL

<s:complexType name="VerHeader">
    <s:sequence>
        <s:element minOccurs="0" maxOccurs="1" name="HD1" type="s:string"/>
        <s:element minOccurs="0" maxOccurs="1" name="HD2" type="s:string"/>
        <s:element minOccurs="0" maxOccurs="1" name="HD3" type="s:string"/>
    </s:sequence>
    <s:anyAttribute/>
</s:complexType>

I have to send username, password and some ID in these HD1, HD2 and HD3 variables. I have also tried these links Passing a PHP array in a SOAP call and Sending a Soap Header with a WSDL Soap Request with PHP

Here is what i have tried but not working, every time i run my code it send failure message, can you figure it out what’s wrong with my code or my logic?

$soap = new SoapClient("http://example.com/verifyrecord.asmx?WSDL");
$header = array('HD1'=>'000000023','HD2'=>'val2','HD3'=>'val2');
$header = new SoapHeader('http://www.example.com/', 'VerHeader ', $header);

$soap->__setSoapHeaders(array($header));
  • 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-05T10:53:57+00:00Added an answer on June 5, 2026 at 10:53 am

    Solved the problem. I solved it not by using php functions but creating an xml file manually and sending it to the soap server. I’ve posted an example of my answer so that it might be helpful to others. Thanks all for the help.

    // the xml to send
    $xml = '<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header>
        <VerHeader xmlns="http://www.example.com/">
          <HD1>000000000117</HD1>
          <HD1>user</HD1>
          <HD1>password</HD1>
        </VerHeader>
      </soap:Header>
      <soap:Body>
        <m:VerifyTransaction xmlns:m="http://www.example.com/">
            <m:object1>45344</m:object1>
            <m:object2>5545437</m:object2>
        </m:VerifyTransaction>
      </soap:Body>
    </soap:Envelope>';
    // build your http request
    $context = stream_context_create(array(
    'http' => array(
    'method' => 'POST',
    'header' => "Content-type: text/xml\r\n",
    'validateRequest'=>false,
    'content' => $xml,
    'timeout' => 10,
    ),
    ));
    
    // send it
    echo $xmlstring = file_get_contents('http://example.com/VerifyThis/VerifyThis.asmx?wsdl', false, $context); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using ASIHTTPRequest in IOS. I have aloso a wsdl/soap web services. when
I am using SudzC for SOAP web services in an iOS App. The issue
I am implementing SOAP web services for a commercial application, and I am using
I am attempting to access a web service using SOAP through Perl and am
I've deployed a contract-first web service using CXF. The server into which it is
I am generating WSDL/XSD for SOAP services from a UML model using IBM Rational
I am calling a WSDL web service from Python using SOAPpy . The call
I using gSOAP for web services, but i have a problem i must compile
I'm using Tibco BusinessWorks to consume a soap web service over an HTTPS connection.
I am working on making a web service using soap. I'm stuck at trying

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.