Click here to Skip to main content
11,411,840 members (54,267 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET WebService
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:
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 14-Apr-13 4:57am
Comments
Sergey Alexandrovich Kryukov at 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 at 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)

  Print Answers RSS
0 OriginalGriff 213
1 Sergey Alexandrovich Kryukov 200
2 ProgramFOX 130
3 Sascha Lefévre 120
4 Dave Kreskowiak 90
0 Sergey Alexandrovich Kryukov 8,920
1 OriginalGriff 7,128
2 Maciej Los 3,440
3 Abhinav S 3,248
4 Peter Leow 3,059


Advertise | Privacy | Mobile
Web03 | 2.8.150414.5 | Last Updated 14 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100