Author Topic: webservice consumption using nusoap  (Read 854 times)

vivekraj25

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
webservice consumption using nusoap
« on: June 11, 2010, 06:21:00 AM »
Hi,

this question is related to nusoap client which is my php web site.I want to use a dot net webservice on my php portal the method in the webservice returns the whole data in an xml string which can be parsed but i doubt whether the webservice recognize the parameters/arguments which are being passed to the method.

here goes the code:

<?php
include("nusoap.php");
$s=new soapclient('http://www.windsgfs.com/Services/Data.asmx?wsdl','wsdl');
$s->setDefaultRpcParams(true);
$param=array('startFrom1'=>'','startTo1'=>'','shipName1'=>'Wind Spirit','eventName1'=>'','region1'=>'');
$result=$s->call('GetEvents',$param);
$xml1=$result["GetEventsResult"];
?>
<script language="javascript">
alert(<?=xml1?>);
<script>

the javascript alerts the whole xml document and the parameters are not recognised. how to go about it.
any help would be appreciated

PHP Coder

  • Expert PHP Helper
  • Senior Member
  • *****
  • Posts: 130
  • Karma: +0/-0
    • View Profile
    • PHP coder
Re: webservice consumption using nusoap
« Reply #1 on: June 11, 2010, 01:27:22 PM »
Why can not you debug, i.e. print_r($result)... then maybe change parameters and again check what is returned in $result.
PHP coder for hire