Re: still newbie
| From: | Vegard Figenschou | Date: | Fri, 26 Sep 2003 14:12:46 +0000 |
| Subject: | Re: still newbie | ||
| References: | 1 2 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1080@lists.php.net to get a copy of this message | ||
I tested your code, without knowing what a dispatch map is (ref.: topic) Now
I got this error:
> Array ( [faultcode] => soap:Server [faultstring] => Server was unable to
> process request. --> Object reference not set to an instance of an object.
> [detail] => )
Regards!
-Vegard
Dustin Nantais wrote:
> I would recommend using the 'nusoap' client to test out your SOAP calls. I
> find the nusoap library WAY faster and easier to use and understand. Get
> it here:
>
> http://dietrich.ganx4.com/nusoap/index.php
>
> Its just one file. And call it like this, in a client file. I use this
> exact script:
>
> <?php
> require_once 'nusoap.php';
>
> // Modify the URL here - note the "?wsdl" at the end
> $soapclient = new
>
> soapclient('http://www.testserver.com/soapserver.php?wsdl',
> true);
>
> // make an array of elements that follow the schema of your dispatch map
> $senddata = array (19, 24);
>
> // Make a call to the soap server and request the method
> $dothisresult =
>
> $soapclient->call('methodname','$senddata',"urn:namespacehere");
>
> //print recursively to view all elements in the array, this way you can
> see your soap fault string if there is one
> print_r ($dothisresult);
>
> ?>
>
> Hope that helps Vegard
>
> ...Dustin Nantais
>
>
>
> "Vegard Figenschou" <vegard@hontas.no> wrote in message
> news:20030926124959.79760.qmail@pb1.pair.com...
>>
>>
>> I get the following error, how do I figure out what it says in the XML
>> document?
>>
>> ///
>> soap:Client
>> Server was unable to read request. --> There is an error in XML document
>> (13, 2). --> 'Element' is an invalid node type. Line 13, position 2.
>>
>> ///
>>
>>
>> This is a short version of what I'm doing from the client side.:
>> $wsdl= new SOAP_WSDL($WSDL_URL);
>> $client = $wsdl->getProxy();
>>
>> $param1 = array('param'=>'value1');
>> $param2 = array('param'=>'value2');
>>
>> $test = $client->method($param1, $param2);
>>
>> print_r($test);
>>
>> Regards
>> -Vegard