NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Dmitri plz help - I'm getting acidity with this WSDL ...

Joined: 10 Jul 2008
Posts: 2
Reply with quote

I have gone over the forum searching for any clue from prev posts but couldm't find any. So plz help resolve this simple problem I'm facing with this WSDL and PHP NUSOAP vs 0.7.3 that I'm using. I'm running WinXP, Apache 2, PHP 5.2.

I have no control over the webservice provider as that is 3rd party (and its in alpha so they don't want me to release pvt info is why I've stripped the actual URL - hope you understand) and so the only guide in developing the client for consumption is by following their WSDL below:

I tried to do normal client call as below (with no patch to nusoap.php) at first:


$client = new nusoap_client('', 'wsdl',);

It returns - faultcode = env:Client.

Since this did not work, following Sanjeev_any's POST in this forum and your comments, I patched the nusoap.php and added extra params to the client call as seen below but still the same faultcode returning.

Where am I going wrong? What can be done to resolve this? Any help is highly apprecited. Thanks a ton in advance:

Here's the WSDL:


<definitions name='coolService' targetNamespace='' xmlns='' xmlns:soap='' xmlns:tns='' xmlns:xsd=''>
  <xs:schema targetNamespace='' version='1.0' xmlns:tns='' xmlns:xs=''>
   <xs:element name='loginUser' type='tns:loginUser'/>
   <xs:element name='loginUserResponse' type='tns:loginUserResponse'/>
   <xs:complexType name='loginUser'>
     <xs:element minOccurs='0' name='username' type='xs:string'/>
     <xs:element minOccurs='0' name='password' type='xs:string'/>
   <xs:complexType name='loginUserResponse'>
     <xs:element minOccurs='0' name='returnUserStatus' type='tns:userStatus'/>
   <xs:complexType name='userStatus'>
     <xs:element minOccurs='0' name='email' type='xs:string'/>
     <xs:element minOccurs='0' name='lastname' type='xs:string'/>
     <xs:element minOccurs='0' name='pictureUrl' type='xs:string'/>
     <xs:element minOccurs='0' name='status' type='xs:string'/>
     <xs:element minOccurs='0' name='timestamp' type='xs:dateTime'/>
     <xs:element minOccurs='0' name='username' type='xs:string'/>
 <message name='cool_loginUser'>
  <part element='tns:loginJygyForumUser' name='loginUser'></part>
 <message name='cool_loginUserResponse'>
  <part element='tns:loginUserResponse' name='loginUserResponse'></part>
 <portType name='cool'>
  <operation name='loginUser' parameterOrder='loginUser'>
   <input message='tns:cool_loginUser'></input>
   <output message='tns:cool_loginUserResponse'></output>
 <binding name='coolBinding' type='tns:cool'>
  <soap:binding style='rpc' transport=''/>
  <operation name='loginUser'>
   <soap:operation soapAction=''/>
    <soap:body use='literal'/>
    <soap:body use='literal'/>
 <service name='coolService'>
  <port binding='tns:coolBinding' name='coolPort'>
   <soap:address location=''/>

This is the client code:



$sclient = new nusoap_client('',"wsdl");

$param = array('username' => 'abcd', 'password' => 'pass');
$result = $sclient->call('loginJygyForumUser', array('parameters' => $param), '', '', false, null, 'rpc', 'literal', true);

// Check for a fault
if ($sclient->fault) {
   echo '<h2>Fault</h2><pre>';
   echo '</pre>';
} else {
   // Check for errors
   $err = $sclient->getError();
   if ($err) {
      // Display the error
      echo '<h2>Error</h2><pre>' . $err . '</pre>';
   } else {
      // Display the result
      echo '<h2>Result</h2><pre>';
      echo '</pre>';

echo '<h2>Request</h2><pre>' . htmlspecialchars($sclient->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($sclient->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($sclient->debug_str, ENT_QUOTES) . '</pre>';

// bye bye client



POST /coolService/LoginWebService HTTP/1.0
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 501

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" xmlns:tns=""><SOAP-ENV:Body><loginUser xmlns=""><username xmlns="">abcd</username><password xmlns="">pass</password></loginUser></SOAP-ENV:Body></SOAP-ENV:Envelope>



HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)/Tomcat-5.5
Content-Type: text/xml;charset=UTF-8
Date: Thu, 10 Jul 2008 18:27:07 GMT
Connection: close

<env:Envelope xmlns:env=''><env:Header></env:Header><env:Body><env:Fault xmlns:env=''><faultcode>env:Client</faultcode><faultstring>Endpoint {}coolPort does not contain operation meta data for: loginUser</faultstring></env:Fault></env:Body></env:Envelope>

I do know that this faultcode means the webservice did not receive an element in the SOAP request message that is mandatory for the WSDL for this Web service. But goiing by the above WSDL, what am I doing wrong. Maybe its downright silly but too much of messing with it has noodled my brain altogether Sad

Plz do take a close look - Thanks again.
View user's profileFind all posts by neo_coderSend private message

Joined: 10 Jul 2008
Posts: 2
Reply with quote
Hello again ...

If anyone has a clue, then plz do post your opinion of how to go about tackling this.
I'm so looking forward to a push in the right direction.

Thanks for reading.
View user's profileFind all posts by neo_coderSend private message
Dmitri plz help - I'm getting acidity with this WSDL ...
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

 Reply to topic