Page 1 of 1

NuSOAP DOC/lit problem

Posted: Fri May 12, 2006 1:37 am
by dilip
Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi, 

Below is my program for calling doc/lit web service method which takes 2 parameters (subtotal, and total, both are java double types). I can able to connect to the method but it is giving NumberFormatException error like below. Please help me in how to provide input parameters properly. 

[color=darkred]Array ( [faultcode] => soapenv:Server.userException [faultstring] => java.lang.NumberFormatException: For input string: "Array" [detail] => Array ( [hostname] => THRTCF3W017 ) ) [/color]


My program :

Code: Select all

<?php 
include_once('./lib/nusoap.php'); 

function wsclient(){ 

    $client = new soapclient1('http://localhost:8080/axis/services/TaxService1?wsdl','wsdl'); 
    $arr = array('subtotal'=>'30000','total'=>'50000'); 
    $parameters = array($arr); 
    $result = $client->call('calcTaxRate', $parameters); 
    if ($client->fault) { 
        echo '<h2>Fault</h2><br>'; 
        print_r($result); 
    } else { 
        $err = $client->getError(); 
        if ($err) { 
            echo '<h2>Error</h2><pre>' . $err . '</pre>'; 
        } else { 
            echo '<h2>Result</h2><pre>'; 
            print_r($result); 
            echo '</pre>'; 
        } 
    } 
}

wsclient(); 
?>

Weirdan | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]