我试图从eway(澳大利亚)实施反复出现的web服务。我怎么都无法让它工作。eWay支付网关
我不断得到messeage
“元素命名空间‘http://www.eway.com.au/gateway/rebill/manageRebill’rebillCustomerCreate具有不完整的内容可能元素的列表预计:‘CustomerRef’。”
这是WSDL:https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx?wsdl
我是新来的SOAP。试图在PHP中实现它。任何人都可以请指出我做错了什么?
这是我的PHP代码:
<?php
$URL = "https://www.eway.com.au/gateway/rebill/test/manageRebill_test.asmx?wsdl";
$option = array("trace"=>true);
$client = new SOAPClient($URL, $option);
$functions = $client->__getFunctions();
$headeroptions =array('eWAYCustomerID'=>"87654321",'Username'=>"[email protected]","Password"=>"test");
$header = new SOAPHeader('http://www.eway.com.au/gateway/rebill/manageRebill', 'eWAYHeader',$headeroptions);
$bodyoptions = array(
"customerTitle" => "Mr",
"customerFirstName" => "firstname",
"customerLastName" => "lastname",
"customerAddress" => "address",
"customerSuburb" => "someniceplace",
"customerState" => "somenicestate",
"customerCompany" => "somecompany",
"customerPostCode" => "411026",
"customerCountry" => "australia",
"customerEmail" => "[email protected]",
"customerFax" => "123456",
"customerPhone1" => "123456",
"customerPhone2" => "123456",
"customerRef" => "abc123",
"customerJobDesc" => "Developer",
"customerComments" => "Make it work",
"customerURL" => "www.nicesite.com"
);
try{
$response = $client->__soapCall("CreateRebillCustomer", $bodyoptions,NULL,$header,$outputHeader);
echo $client->__getLastRequest();
//$response = $client->CreateRebillCustomer($bodyoptions);
var_dump($response);
} catch(SOAPFault $e){
print $e;
}
?>
会不会是所有的c需要像CustomerJobDesc一样大写,CustomerRef ect – 2011-05-17 09:26:06
在WSDL中看起来并不像这样。 – Constantine 2011-05-17 09:28:53