hdemetrio
asked on
Dataset Web service and consume with nusoap issue how does one access data?
Ok my problem is I am trying to return a dataset from a web service to a nusoap and php. Is this possible I believe it tranforms it to some xml format correct? If so how would I access the data. I have a funny feeling I am missing something here please help.
<?php
include('nusoap.php');
$parameters = array('strCouponCode' => '1100.13', 'strGenericID' => '123456', 'strUsername' => '23', 'strPassword' => '5');
$soap = new soapclient('http://10.10.3.34/FardemptionNET/FardemptionNET.asmx?wsdl');
$result = $soap->call('getUserCoupon TotalPaid' ,$paramete rs);
$acount = count($result);
print_r($result);
This is the error message i recieve back:
Array ( [faultcode] => soap:Client [faultstring] => Server did not recognize the value of HTTP Header SOAPAction: . [detail] => ) 3
<?php
include('nusoap.php');
$parameters = array('strCouponCode' => '1100.13', 'strGenericID' => '123456', 'strUsername' => '23', 'strPassword' => '5');
$soap = new soapclient('http://10.10.3.34/FardemptionNET/FardemptionNET.asmx?wsdl');
$result = $soap->call('getUserCoupon
$acount = count($result);
print_r($result);
This is the error message i recieve back:
Array ( [faultcode] => soap:Client [faultstring] => Server did not recognize the value of HTTP Header SOAPAction: . [detail] => ) 3
I'm not 100% sure, but can't you call methods on the returned soap object instead of using the "call" method? something like $soap->getUserCouponTotalP aid($param eters); (maybe unfold the parameters array). It seems the SOAP package does not speecifiy the SOAPAction field in the packet, and therefore the server doesn't know what method is called.
ASKER
I got it lol seems you need to pass the namespace of the web service and make sure its a assocative array $parameters[] = array('strCouponCode' => '1100.13', 'strGenericID' => '123456', 'strUsername' => '23', 'strPassword' => '5'); forgot the [] lol
and you need
$namespace = "www.imadumbidiotlol.com'
$soap = new soapclient('http://10.10.3.34/FardemptionNET/FardemptionNET.asmx?wsdl', $namspace);
ohh well how does that work if I answer my own question lol.
and you need
$namespace = "www.imadumbidiotlol.com'
$soap = new soapclient('http://10.10.3.34/FardemptionNET/FardemptionNET.asmx?wsdl', $namspace);
ohh well how does that work if I answer my own question lol.
i guess you take the points :))
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.