SOAP Client sending empty body Envelope



I can't find out where is the problem, I have prepared an XML for sending through the SOAP Client like so:



$client = new SoapClient($url, array(
'trace' => true,
"style" => SOAP_RPC,
"use" => SOAP_ENCODED
));

$response = $client->sendItems($xml);

var_dump($client->__getLastRequest());


var_dump shows me string(233) " ", but when I'm testing it throught the PHPStorm Rest Client testing tool, it shows me this:



string(233) "<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://ift.tt/sVJIaE" xmlns:ns1="http://ift.tt/1KmkMQt"><SOAP-ENV:Body><ns1:sendItemsRequest/></SOAP-ENV:Body></SOAP-ENV:Envelope>
"


There are no content inside the body. I triple-checked that my $xml contains the full XML with bodycontent.


Anyone got similiar problem before or have some idea what's going on ?


==== UPDATED ====


Here is the XML Content:



<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:ltm="http://ift.tt/1KmkMQt">
<soapenv:Header/>
<soapenv:Body>
<ltm:sendItemsRequest>
<ItemsToAdd>
<ItemToAdd>
<description>DEMO DESCRIPTION text</description>
<url>http://localhost/media/items/0000000001.jpg</url>
<brand>BRANDTEST</brand>
<status>creation</status>
<statusDate>1423209737</statusDate>
<beginDate>1406844000</beginDate>
<endDate>1730329200</endDate>
<targets>
<barcode>1234567891011</barcode>
<barcode>9876543210123</barcode>
</targets>
<medias>
<media>
<retailer>RETAILERTEST</retailer>
<format>dummyformat</format>
</media>
</medias>
</couponToAdd>
</ItemToAdd>
</ltm:sendCouponsRequest>
</soapenv:Body>
</soapenv:Envelope>

No comments:

Post a Comment