我现在面临问题,我无法使用WebService。 这是我的WebService的结构:
array (size=22)
0 => string 'struct TPAcess {
TPKRequest KRequest;
}' (length=53)
1 => string 'struct TPKRequest {
AOIRequest REQUESTS;
}' (length=56)
2 => string 'struct AOIRequest {
TPIRequest REQUEST;
}' (length=57)
3 => string 'struct TPIRequest {
string ORDERID;
string CPID;
}' (length=57)
4 => string 'struct TPAResponse {
TPKResponses KEYRESPONSE;
}' (length=63)
5 => string 'struct TPKResponses {
AOTPORequest REQUESTS;
TPTechnicalError TECHNICALERROR;
}' (length=92)
6 => string 'struct AOTPORequest {
TPOutputRequest REQUEST;
}' (length=59)
7 => string 'struct TPOutputRequest {
string ORDERID;
string CPID;
ArrayOfTPSystem SYSTEMS;
TPRequestError ERROR;
}' (length=107)
8 => string 'struct ArrayOfTPSystem {
TPSystem SYSTEM;
}' (length=44)
9 => string 'struct TPSystem {
int SYSTEMID;
string PRODUCTLINE;
ArrayOfTPOrder ORDERS;
}' (length=79)
10 => string 'struct ArrayOfTPOrder {
TPOrder ORDER;
}' (length=41)
11 => string 'struct TPOrder {
string TYPEOFORDER;
string ORDERLABEL;
string FIRSTSALEORDERLABEL;
string NOPO;
string PODATE;
Applicant APPLICANT;
ArrayOfCP CPS;
AOSKey SKEYS;
}' (length=184)
12 => string 'struct Applicant {
int APPLICANTID;
string APPLICANTNAME;
}' (length=61)
13 => string 'struct ArrayOfCP {
CPU CPU;
}' (length=31)
14 => string 'struct CPU {
string LABEL;
}' (length=29)
15 => string 'struct AOSKey {
SubKey SUBKEY;
}' (length=40)
16 => string 'struct SubKey {
string SUBKEYTYPE;
ArrayOfEncryptCode ENCRYPTCODES;
}' (length=71)
17 => string 'struct ArrayOfEncryptCode {
EncryptCode ENCRYPTCODE;
}' (length=55)
18 => string 'struct EncryptCode {
string LABEL;
string VALUE;
}' (length=52)
19 => string 'struct TPRequestError {
}' (length=25)
20 => string 'struct TPError {
string CODE;
string DESCRIPTION;
}' (length=53)
21 => string 'struct TPTechnicalError {
}' (length=27)
我如何尝试从我的PHP函数访问它:
public function consumeWebService(){
$client = new \Soapclient('http://url_of_the_WebService?WSDL', array(
'login'=>"myLogin",
'password'=>"myPassword"
));
$request = $client->TPAccess(array(
'KREQUEST'=>array(
'REQUESTS'=>array(
'REQUEST'=>array(
'ORDERID'=>'numberOfMyOrderID'
)
)
)
));
$result = $client->TPAccess($request);
var_dump($result);die;
}
但我唯一得到的结果如下:
object(stdClass)[280]
public 'KRESPONSES' =>
object(stdClass)[281]
public 'TECHNICALERROR' =>
object(stdClass)[282]
public 'CODE' => string 'ERR_XML_001' (length=11)
public 'DESCRIPTION' => string 'Core technical error preventing the message to be managed (e.g. invalid input file structure such as missing tag or mandatory value).' (length=133)
你们有什么想法吗?谢谢!
答案 0 :(得分:0)
如果世界上有人问,这是解决方案:
Verify