Click here to Skip to main content
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 277
1 Maciej Los 230
2 BillWoodruff 205
3 Sergey Alexandrovich Kryukov 195
4 DamithSL 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,650
3 Kornfeld Eliyahu Peter 3,460
4 Sergey Alexandrovich Kryukov 2,811


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 14 Apr 2013
Copyright © CodeProject, 1999-2014
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