Developer Forum [ All Topics | New Topic ]

Thread: Feed.asmx WSDL PHP

Dear Devolopers.

We are using the old data feed "RetailFeed.asmx?wsdl".

Now we want to switch to "Feed.asmx" as it was commended by RapNet.

The Problem after request:
Array (     
[faultcode] => soap:Server
[faultstring] =>
Server was unable to process request. --->
Object reference not set to an instance of an object.
[detail] => )
What can we do?

Thanks!

r.puschmann@hicogo.de


>> add a comment
Ron Puschmann
08/28/2014 10:51


5 Replies:

hi

I cannot see any problem on our side. can you please send me your code or at lease describe what you are trying to do?


Ephraim


 



>> add a comment
Ephraim
8/31/2014 1:55:00 AM
<?php header("Content-type: text/xml"); ?>
<?php
require_once('nusoap-0.9.5/lib/nusoap.php');
$soapUrl = "https://technet.rapaport.com/WebServices/RetailFeed/RetailFeed.asmx?wsdl";
$client = new nusoap_client($soapUrl, 'wsdl', null, null, null, null);
$credentials = array(
'Username' => '88888888',
'Password' => 'xxxxxxxxx');
$result = $client->call('Login', array('parameters' => $credentials), '', '', false, true);
$auth_ticket = $client->getHeaders();
$searchparams["SearchType"] = $_POST["SearchType"];
$searchparams["Shape"] = $_POST["Shape"];
$searchparams["SizeFrom"] = $_POST["SizeFrom"];
$searchparams["SizeTo"] = $_POST["SizeTo"];
$searchparams["ColorFrom"] = $_POST["ColorFrom"];
$searchparams["ColorTo"] = $_POST["ColorTo"];
$searchparams["ClarityFrom"] = $_POST["ClarityFrom"];
$searchparams["ClarityTo"] = $_POST["ClarityTo"];
$searchparams["CutFrom"] = $_POST["CutFrom"];
$searchparams["CutTo"] = $_POST["CutTo"];
$searchparams["GirdleSizeMin"] = "EXTR_THIN";
$searchparams["GirdleSizeMax"] = "EXTR_THICK";
$searchparams["TablePercentFrom"] = "0";
$searchparams["TablePercentTo"] = "100";
$searchparams["DepthPercentFrom"] = "0";
$searchparams["DepthPercentTo"] = "100";
$searchparams["MeasLengthFrom"] = "0";
$searchparams["MeasLengthTo"] = "20";
$searchparams["MeasWidthFrom"] = "0";
$searchparams["MeasWidthTo"] = "20";
$searchparams["MeasDepthFrom"] = "0";
$searchparams["MeasDepthTo"] = "20";
$searchparams["PriceFrom"] = $_POST["PriceFrom"];
$searchparams["PriceTo"] = $_POST["PriceTo"];
$searchparams["Page"] = $_POST["Page"];
$searchparams["PageSize"] = "20";
$searchparams["DiamondsFound"] = 0;
$client->setHeaders($auth_ticket);
$result = $client->call('GetDiamonds', array('parameters' => $searchparams), '', '', false, true);
echo $client->responseData;
?>

Isn't compatible to your Feed.


>> add a comment
R. Puschmann
9/1/2014 6:50:00 AM
you are using the wrong endpoint.

try https://technet.rapaport.com/WebServices/RetailFeed/Feed.asmx
instead of https://technet.rapaport.com/WebServices/RetailFeed/RetailFeed.asmx

Ephraim


>> add a comment
Ephraim
9/1/2014 6:56:00 AM
Okay, thanks.

No issues with our script connecting to “RetailFeed.asmx”

Recently, we were informed about the availability of “Feed.asmx” but having trouble with that (see first post).
by the way, I would be glad, if you could delete this from above:
'Username' => '***',
'Password' => '***');

Thank you. Ron
 

 


>> add a comment
RP
9/1/2014 7:19:00 AM
Hi Ephraim.

Could you pls tell us where the output error comes from?

<faultcode>soap:Client</faultcode>
<faultstring>
Server was unable to read request. ---> There is an error in XML document (1, 2833). ---> Input string was not in a correct format.
</faultstring>
<detail/>
</soap:Fault>

Best Wishes

*******************************

<?php header("Content-type: text/xml"); ?>
<?php
require_once('nusoap-0.9.5/lib/nusoap.php');
$soapUrl = "https://technet.rapaport.com/WebServices/RetailFeed/Feed.asmx?wsdl";
$client = new nusoap_client($soapUrl, 'wsdl', null, null, null, null);
$credentials = array(
'Username' => '****',
'Password' => '*****');
$result = $client->call('Login', array('parameters' => $credentials), '', '', false, true);
$auth_ticket = $client->getHeaders();
$searchparams["ShapeCollection"]['Shapes'] = array("ROUND","PEAR","PRINCESS","MARQUISE");
$searchparams["LabCollection"]['Labs'] = array("GIA", "IGI", "AGS", "HRD", "EGL_USA");
$searchparams["FluorescenceColorsCollection"]['FluorescenceColors']= array("BLUE","YELLOW","GREEN","RED","ORANGE","WHITE");
$searchparams["FluorescenceIntensityCollection"]['FluorescenceIntensities']= array("NONE","VERY_SLIGHT","FAINT","MEDIUM","SLIGHT","STRONG","VERY_STRONG");
$searchparams["CuletSizesCollection"]['CuletSizes']= array("VERY_SMALL","SMALL","MEDIUM","LARGE");
$searchparams["FancyColorCollection"]['FancyColors']= array("YELLOW","PINK","BROWN","GREEN","BLACK","BLUE","ORANGE","GRAY");
$searchparams["ColorFrom"] = "D";
$searchparams["ColorTo"] = "M";
$searchparams["SearchType"] = "WHITE";
$searchparams["FancyColorIntensityFrom"] = "FAINT";
$searchparams["FancyColorIntensityTo"] = "FANCY_DEEP";
$searchparams["ClarityFrom"] = "IF";
$searchparams["ClarityTo"] = "I1";
$searchparams["CutFrom"] = "EXCELLENT";
$searchparams["CutTo"] = "FAIR";
$searchparams["PolishFrom"] = "Excellent";
$searchparams["PolishTo"] = "Fair";
$searchparams["SymmetryFrom"] = "Excellent";
$searchparams["SymmetryTo"] = "Fair";
$searchparams["PageNumber"] = "1";
$searchparams["PageSize"] = "25";
$searchparams["GirdleSizeMin"] = "EXTR_THIN";
$searchparams["GirdleSizeMax"] = "EXTR_THICK";
$searchparams["SizeFrom"] = "0.05";
$searchparams["SizeTo"] = "30.00";
$searchparams["PriceFrom"] = "0";
$searchparams["PriceTo"] = "10000000";
$searchparams["DepthPercentFrom"] = "0";
$searchparams["DepthPercentTo"] = "100";
$searchparams["TablePercentFrom"] = "0";
$searchparams["TablePercentFrom"] = "100";
$searchparams["MeasLengthFrom"] = "0";
$searchparams["MeasLengthTo"] = "1000";
$searchparams["MeasWidthFrom"] = "0";
$searchparams["MeasWidthTo"] = "1000";
$searchparams["MeasDepthFrom"] = "0";
$searchparams["MeasDepthTo"] = "1000";
$searchparams["SortDirection"] = "ASC";
$searchparams["SortBy"]="SHAPE";
$client->setHeaders($auth_ticket);
$result = $client->call('GetDiamonds', array('SearchParams' => $searchparams), '', '', false, true);
echo $client->responseData;
?>



>> add a comment
RP
9/4/2014 8:25:00 AM