0

我需要在 php 中连接到 CEBroker SOAP Web 服务。SOAP 请求是:

POST /CEBrokerWebService.asmx HTTP/1.1
Host: test.ws.cebroker.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.cebroker.com/CEBrokerWebService/TestUploadXMLFile"


<?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>
    <TestUploadXMLFile xmlns="http://www.cebroker.com/CEBrokerWebService/" />
  </soap:Body>
</soap:Envelope>

到目前为止,这是我的代码,

<?php
$username = "xxxxxxxx";
$password = "xxxxxxxx";
$options = array(
    "login" => $username,
    "password" => $password,
    'use' => SOAP_LITERAL
);

$client = new SoapClient('test.ws.cebroker.com//CEBrokerWebService.asmx?ws‌​dl', $options);

echo "<pre>";
//print_r($client);die();

$response = $client->TestUploadXMLFile(array(
    "licensee_profession" => 'Licensed Practical Nurse',
    "licensee_number"     => '6547852-25',
    "cebroker_state"      => 'AR',
    "first_name"          => 'Dalton',
    "last_name"           => 'Developer',
    "date_completed"      => '2017-04-06 22:52:16',
));

print_r($response);
4

0 回答 0