Bonjour à toutes et à tous !
Je dois pourvoir échanger des infos sur des clients avec un serveur soap.
En clair je dois exécuter une fonction présente sur le serveur soap distant en lui passant des paramètres et en réponse je dois récupérer d'autres infos sur ces clients.
Je n'ai jamais travaillé avec soap. En regardant un peu la doc je suis tombé sur <cfinvoke ki me parait être la solution pour exécuter la fonction à distance en passant mes paramètres et j'ai pensé à CFHTP avec method = GET pour récupérer les infos.voilà pour la théorie, en pratique c'est une autre histoire :
GetPinCLIInfo est le nom de la fct à exécuter
Les paramètres à passer :
MSISDN=>'44484238701'
username=>'test'
password=>'testpass'
ensuite ça se complique, ce qui suit, sont les infos XML à échanger
ENVOI
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns9342:GetPinCLIInfo xmlns:ns9342="http://tempuri.org">
<MSISDN xsi:type="xsd:string">44484238701</MSISDN>
<username xsi:type="xsd:string">test</username>
<password xsi:type="xsd:string">testpass</password>
</ns9342:GetPinCLIInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
REPONSE
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="urn:LoCoIN">
<SOAP-ENV:Body>
<ns1:GetPinCLIInfoResponse xmlns:ns1="http://tempuri.org">
<PINarray xsi:type="tns:GetPinCLIInfoResponse">
<MSISDN xsi:type="xsd:string">44484238701</MSISDN>
<UsedPinOrClip xsi:type="xsd:string">44484238701</UsedPinOrClip>
<IsValidMSISDN xsi:type="xsd:integer">1</IsValidMSISDN>
<StatusDescription xsi:type="xsd:string">Active</StatusDescription>
<CreditsLeftCents xsi:type="xsd:integer">1400</CreditsLeftCents>
<LanguageID xsi:type="xsd:integer">1</LanguageID>
<MNPBeepActivated xsi:type="xsd:integer">0</MNPBeepActivated>
<CurrencyDescription xsi:type="xsd:string">Euro</CurrencyDescription>
<ExpirationDate xsi:type="xsd:string">20070904</ExpirationDate>
</PINarray>
</ns1:GetPinCLIInfoResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Pour exécuter la fonction à distance et pour passer les paramètres j'ai exécuté le code suivant :
<cfinvoke webservice="https://soap.AdresseServeur.php?wsdl"
method="GetPinCLIInfo" returnVariable="res">
<cfinvokeargument name="MSISDN" value="44472589347">
<cfinvokeargument name="username" value="test">
<cfinvokeargument name="password" value="testpass">
</cfinvoke>
<cfoutput>#res#</cfoutput>
mais j'ai déjà l' erreur suivante :
Could not generate stub objects for web service invocation.
|
|
|
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated It is recommended that you use a web browser to retrieve and examine the requested WSDL document for correctness. If the requested WSDL document can't be retrieved or it is dynamically generated, it is likely that the target web service has programming errors.
|
Une âme charitable pour me sortir de là, mille mercis !