Results 1 to 1 of 1

Thread: Please help with WebClient

  1. #1

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Please help with WebClient

    I am trying to debug php webclient code, see below.
    I am sending in, or think I am sending in "Hello World"
    What I get back is "No parameter came in" which is what the services function is designed to do. Spit out what you put in. See that code below.

    It works fine when I call the service from a .net app but I cannot get it working in php, What am I doing wrong in my code below that it doesn't see the parameter I am sending in?

    Code:
    <?php
    require_once('nusoaplib/nusoap.php'); 
    $wsdl="http://MyImaginaryWebService.com/WebService.asmx?WSDL";
    $client=new soapclient($wsdl);
         
                   try{
    			$results = $client->__Call('GetMyParameter',array('pParameter'=>'Hello World'));
    			 echo $results->GetMyParameterResult;
    
                      }
    		  catch(Exception $e)
    		  {
                      echo $e;
                      }              			
    
    ?>
    Code:
     <WebMethod()> _
          Public Function GetMyParameter(ByVal pParameter As String) As String
    
            If pParameter = "" Then
                pParameter = "No parameter came in"
            End If
            Return pParameter
        End Function
    Last edited by gtilles; Mar 27th, 2008 at 02:30 PM.
    Truly, you have a dizzying intellect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width