Jump to content

ScottBaxter

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by ScottBaxter

  1. Thanks - I think i know what I need to do. I need to assign some attributes to the ApprovedServices instead of an array... Thanks
  2. Hi Guys, Can you help me out or point me in the right direction, I'm trying to perform a soap request to a WSDL feed but I'm not getting anything back. When I use standard XML everything seems to work OK - how would I write the following into an array: 01 <?xml version="1.0" encoding="utf-8"?> 02 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 03 <soap:Body> 04 <SupplierDirectorySearch xmlns="SOAPREQUEST"> 05 <SupplierSearchDetails ClassVersion="1.0"> 06 <Identification> 07 <SchemeOperatorRef>59582</SchemeOperatorRef> 08 <SecurityToken>MYTOKEN</SecurityToken> 09 </Identification> 10 <ApprovedServices ServiceRepair="Y" MOT="" Tyres=""CollectionDelivery="" CourtesyCar="" WhileUWait="" Callout24Hour=""BreakdownCover="" CollectionDeliveryNotes="" CourtesyCarNotes=""Inspections=""/> 11 <SupplierLocation>BB1</SupplierLocation> 12 <SearchRadiusMiles>300</SearchRadiusMiles> 13 <Preference>P</Preference> 14 <MaxReturnNumber>5</MaxReturnNumber> 15 <PageNo>0</PageNo> 16 </SupplierSearchDetails> 17 </SupplierDirectorySearch> 18 </soap:Body> 19 </soap:Envelope>'; I've written the following so far but it just doesn't seem to like it: 01 $client = new SoapClient("URL?WSDL", $option); 02 $res = $client->SupplierDirectorySearch( 03 array('SupplierSearchDetails'=> 04 array('Identification' => array('SchemeOperatorRef'=>'61','SecurityToken'=>'MYTOKEN'), 05 'ApprovedServices' => array( 06 'ServiceRepair'=>'Y', 07 'MOT'=>'', 08 'Tyres'=>'', 09 'CollectionDelivery'=>'', 10 'CourtesyCar'=>'', 11 'WhileUWait'=>'', 12 'Callout24Hour'=>'', 13 'BreakdownCover'=>'', 14 'CollectionDeliveryNotes'=>'', 15 'CourtesyCarNotes'=>'', 16 'Inspections'=>'', 17 ), 18 'SupplierLocation' => 'BB1', 19 'SearchRadiusMiles' => '2', 20 'Preference' => 'P', 21 'MaxReturnNumber' => '5', 22 'PageNo' => '0' 23 ) 24 ) 25 ); To add, this is what is getting passed by the SOAPClient 1 REQUEST: 2 <?xml version="1.0" encoding="UTF-8"?> 3 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ns1="OneLink_ServiceBookingComponent"><SOAP-ENV:Body><ns1:SupplierDirectorySearch><ns1:SupplierSearchDetails><ns1:Identification><ns1:SchemeOperatorRef>61</ns1:SchemeOperatorRef><ns1:SecurityToken>MYTOKEN</ns1:SecurityToken></ns1:Identification><ns1:SupplierLocation>BB1</ns1:SupplierLocation><ns1:SearchRadiusMiles>2</ns1:SearchRadiusMiles><ns1:Preference>P</ns1:Preference><ns1:ApprovedServices ServiceRepair="Y"MOT="" Tyres="" CollectionDelivery="" CourtesyCar="" WhileUWait=""Callout24Hour="" BreakdownCover="" CollectionDeliveryNotes=""CourtesyCarNotes="" Inspections=""/><ns1:MaxReturnNumber>5</ns1:MaxReturnNumber><ns1:PageNo>0</ns1:PageNo></ns1:SupplierSearchDetails></ns1:SupplierDirectorySearch></SOAP-ENV:Body></SOAP-ENV:Envelope> Can anyone help me out. Thanks.
  3. <?php print '<?xml version="1.0" encoding="utf-8"?>';?> $xml = simplexml_load_file("saft_solverde_wgres_FAC2-01-2013-500272484.xml"); foreach($xml->Invoice as $Invoice) { echo $InvoiceNo->InvoiceNo; } try that... You might need to find out from the XML file what encoding it has.
  4. Can anyone help me out on this?
  5. Get rid of the HTML entries at the top. :-)
  6. It doesn't look like your formatting it correctly. Try putting this in: print '<?xml version="1.0" encoding="ISO-8859-1"?>'; ?>
  7. Hi Guys, I'm loading a soap xml element into SimpleXML and I'm getting the following errors: Warning: SimpleXMLElement::__construct() [<a href='simplexmlelement.--construct'>simplexmlelement.--construct</a>]: namespace warning : This is the xml response that I'm getting: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><VehicleSearchResponse xmlns="AA"><VehicleSearchResult ClassVersion="1.0"><Status><Code></Code><Desc /></Status><VehicleCount>1</VehicleCount><Vehicle><RegNo></RegNo><Make></Make><RegDate></RegDate><Derivative /><Model> JTD</Model><ModelID></ModelID><EngineSize></EngineSize><Colour></Colour><VinNo></VinNo><ClockType></ClockType><FuelType /><TransType></TransType><AssetID></AssetID><LinkedAssetID /><SystemID></SystemID><SchemeRef></SchemeRef><VehicleType></VehicleType><DriverCSIRequired></DriverCSIRequired></Vehicle></VehicleSearchResult></VehicleSearchResponse></soap:Body></soap:Envelope> Can anyone shed any light on this issue? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.