Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 24-02-06
Affiliateer
 
Join Date: Jul 2005
Location: The Toon
Posts: 915
Thanks: 0
Thanked 1 Time in 1 Post
monk-i is an unknown quantity at this point
  NuSOAP & Webservices Help

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->requestENT_QUOTES) . '</pre>';
echo 
'<h2>Response</h2>';
echo 
'<pre>' htmlspecialchars($client->responseENT_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
__________________
James Zielinski,
rightmobilephone.com - Mobile Phone Comparison Site
sunshine.co.uk - Affiliate Area
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 24-02-06
Registered User
 
Join Date: Mar 2004
Location: Reading, UK
Posts: 301
Thanks: 0
Thanked 0 Times in 0 Posts
dmorison is an unknown quantity at this point
Try prepending the namespace to your method call; using the line:

PHP Code:
$response $client->call('ns0:StartSessionRequest'$params); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 24-02-06
Affiliateer
 
Join Date: Jul 2005
Location: The Toon
Posts: 915
Thanks: 0
Thanked 1 Time in 1 Post
monk-i is an unknown quantity at this point
Ah Ha! Getting somewhere! A new error!

Code:
FAULT: 
Code: env:Server
String: JAXRPC.TIE.04: Internal Server Error (JAXRPCTIE01: caught exception while handling request: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: )
At least its moved forward. Im just after getting some initialy successful communication going and then I can go from there.

Thanks mate for the help its appreciated.
__________________
James Zielinski,
rightmobilephone.com - Mobile Phone Comparison Site
sunshine.co.uk - Affiliate Area
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 28-02-06
Affiliateer
 
Join Date: Jul 2005
Location: The Toon
Posts: 915
Thanks: 0
Thanked 1 Time in 1 Post
monk-i is an unknown quantity at this point
Just thought id tell you all that I switched to PHP 5.1 from PHP 4.x. The built in SOAP features work great and ive been making good progress. Advise the same for anyone else wanting to use SOAP.
__________________
James Zielinski,
rightmobilephone.com - Mobile Phone Comparison Site
sunshine.co.uk - Affiliate Area
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zanox Launch industry first webservices Zanox Zanox 2 07-02-06 12:22 PM
Webservices, Images and Legal issues scifind The Affiliate Marketing Lounge 0 10-11-05 04:08 PM
Webservices scifind The Affiliate Marketing Lounge 0 27-10-05 12:29 PM
Special deeplinks and not working webservices ?! Corlath TradeDoubler 0 27-06-05 11:12 AM
Amazon Webservices Script needed scifind Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 3 09-06-05 04:58 PM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7