Hi Guys,
Im in a bit of a small pickle. Im busy trying to dip my toe into the webservices pool but im not getting very far.
I have access to a webservice which I can't say publicly with access to the models etc.
Im using PHP and NuSOAP as it appears to be the easiest. It all seems to be hooking up to my knowledge but the web service is coming back saying that the first function I need to call does not exist but the model says that it does in WSDL.
If someone who has dabbled in this already could help me out of a hole I would appreciate it. I think it is something simple to do with the NuSOAP code in PHP ive setup but I can't see where. Appreciate its.
The code :
PHP Code:
<?php
/* Include the NuSOAP library. */
require_once('nusoap.php');
//$params = array('UserID' => 'TEST', 'Password' => 'test', 'LanguageCode' => 'ENG');
$params = '<StartSessionRequest xmlns="http://domainforservice.com/service">
<UserId>TEST</UserId>
<Password>test</Password>
<LanguageCode>ENG</LanguageCode>
</StartSessionRequest>';
$client = new soapclient('http://domainforservice.com/service', 'wsdl');
/* Call the taxCalc() function, passing the parameter list. */
$response = $client->call('StartSessionRequest', $params);
/* Display request and response to debug. */
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
/* handle any SOAP faults. */
if ($client->fault) {
echo "FAULT: <p>Code: {$client->faultcode}<br />";
echo "String: {$client->faultstring}";
} else {
echo $response;
}
?>
</body>
</html>
The response/error I get from the web service is as follows.
Code:
Response
HTTP/1.1 500 Internal Server Error
SOAPAction: ""
Content-Type: text/xml;charset=utf-8
Date: Fri, 24 Feb 2006 11:12:02 GMT
Server: Apache-Coyote/1.1
Connection: close
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://domainforservice.com/service" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Body><env:Fault><faultcode>env:Client</faultcode><faultstring>JAXRPCTIE01: caught exception while handling request: unrecognized operation: {http://tempuri.org}StartSessionRequest</faultstring></env:Fault></env:Body></env:Envelope>
FAULT:
Code: env:Client
String: JAXRPCTIE01: caught exception while handling request: unrecognized operation: {http://tempuri.org}StartSessionRequest
Thanks guys really appreciate it. If you want further details I would be happy to give via PM
