Click here to Skip to main content
15,909,651 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
I made a web service and it work when i call it in asp.net as a web reference.
The problem is when i call it in php

The soap 1.1 like this:
XML
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?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:Body>
    <GetMembersResponse xmlns="http://tempuri.org/">
      <GetMembersResult>
        <xsd:schema>schema</xsd:schema>xml</GetMembersResult>
    </GetMembersResponse>
  </soap:Body>
</soap:Envelope>



one of my friends told me return string instead of xsd:schema
is it true or not and if true how can i do it and if not how can i call my web service in php
Posted
Comments
Sergey Alexandrovich Kryukov 14-Apr-13 15:25pm    
XML is a string. :-)
Ask your friend if she or he knows what is the sense of it.
—SA
tranesyasd 14-Apr-13 16:10pm    
this php code :


$client = new soapclient($wsdlUrl);

$params = array('memberId' => 'W1100045',
'thirdName' => 'Ali');

$result = $client->GetMembers($params);

$echoText = '';


if (is_null($result->GetMembersResult))
{

echo "no result";
}

else
{
echo $result->GetMembersResult;
}
?>



$client = new soapclient($wsdlUrl);

$params = array('memberId' =?--> 'W1100045',
'thirdName' => 'Ali');

$result = $client->GetMembers($params);

$echoText = '';


if (is_null($result->GetMembersResult))
{

echo "no result";
}

else
{
echo $result->GetMembersResult;
}
?>

and when i run the php code this error appear
Catchable fatal error: Object of class stdClass could not be converted to string in /home/appszone/public_html/wsd.php on line 17

how can i solve it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900