Ich versuche, eine Anfrage an meine Wsdl zu schicken, und wenn Sie einen Blick die Funktion __getTypes()/__getFunctions()
Ich habe folgendes Ergebnis:PHP - SOAP-Anforderung
Array
(
[0] => getValuesResponseType getValues(getValues $parameters)
[1] => ecoResponse eco(eco $parameters)
)
Array
(
[0] => struct getValues{
value1 value1;
value2 value2;
}
[1] => string value1
[2] => string value2
[3] => struct eco {
string in;
}
Ich weiß nicht, wie man diesen Teil codieren, Ich bin ein bisschen verloren hier.
Dies ist, was ich getan habe, aber nichts zurück:
<?php
$wsdl = "http://wsdl.example";
$local_cert = 'local_cert';
$cert_pass = 'xxxxx';
$options = array();
$options['trace'] = true;
$options['exceptions'] = true;
$options['local_cert'] = $local_cert;
$options['passphrase'] = $cert_pass;
$options['cache_wsdl'] = WSDL_CACHE_NONE;
$options['soap_version'] = SOAP_1_1;
$params = array(
'value1' => 'xxxx',
'value2' => 'xxxx'
);
$request = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://wsdl.example">
<soapenv:Header/>
<soapenv:Body>
<ws:getValues>
<value1>xxxx</value1>
<value2>xxx</value2>
</ws:getValues>
</soapenv:Body>
</soapenv:Envelope>';
$location = $wsdl;
$action = "http://wsdl.example";
$version = "1";
try {
$soapClient = new SoapClient($wsdl, $options);
$getFunctions = $soapClient->__getFunctions();
$getTypes = $soapClient->__getTypes();
$response = $soapClient->__doRequest($request,$location,$action,$version);
echo '<pre>';
print_r($getFunctions);
print_r($getTypes);
print_r($response);
echo '</pre>';
}
catch (Exception $e)
{
echo $e->getMessage(), '<br />', $e->getTraceAsString();
}
Nun, ich werde es versuchen! Und ich war in der Lage, einen weiteren Fehler zu lösen, den ich hatte, der externe Entität konnte nicht geladen werden! Danke – Wargio