Hello,

unfortunately I don't know how web services work with php, but it looks to me 
that the web service only accepts one parameter ($part1) but you invoke it with 
two parameters ($a and $b). Could you or perhaps someone else check whether 
this is a possible reason for the error?

Regards,
Manuel




-------- Original-Nachricht --------
Datum: Tue, 14 Nov 2006 14:56:54 +0100
Von: sentenza <[EMAIL PROTECTED]>
An: [email protected]
Betreff: Re: Axis 2 Java WS provider + PHP Client problem

> I tried other sample services methodes who take on parameter, and I have
> always the same error in the php client code :(
> Is there a problem using the wdsl generated file with php soap ?
> 
> I also check the Axis 2 echo sample service. I saw that the echo methode
> take one parameter and this parameter type is OMElement. This is the same
> for AddService::add methode. I ask me if all complextype must be
> implemented
> with OMElement or I can use  own classes type as argument ?
> 
> 
> On 11/14/06, sentenza <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> >
> > I try to developp a php SOAP client write with php 5. I use an axis 2 as
> > WS provider.
> >
> > To test I use Axis 2 sgccalculator sample and try to call
> AddService::add
> > methode.
> >
> > I generated the wsdl file for AddService with Axis 2 Eclipse Wizzard
> > (Java2WSDL) and I introducted it in META-IN directory of the
> sgccalculator
> > Axis Archive. I deployed the Service with the Axis 2 administration
> pages.
> >
> > Now I can access to the wsdl file with this url :
> http://localhost:8080/axis2/services/AddService?wsdl
> > .
> >
> > So I write a php client test page like this :
> >
> > ---------------------------------------------------------------------
> > <?php
> > $client = new
> SoapClient("http://localhost:9393/axis2/services/AddService?wsdl
> > ");
> >     print_r($client);
> >
> >     echo "<br>";
> >     echo "<br>";
> >
> >     var_dump($client->__getFunctions());
> >
> >     echo "<br>";
> >     echo "<br>";
> >
> >     var_dump($client->__getTypes());
> >
> >     echo "<br>";
> >     echo "<br>";
> >     echo "<br>";
> >
> >     $a = 10000;
> >     $b = 20000;
> >
> >     try {
> >
> >         $result = $client->add($a, $b);
> >     }
> >     catch (SoapFault $exception) {
> >         echo "ERROR !!! <br>";
> >         echo $exception;
> >         }
> >
> > ?>
> > ----------------------------------------------------------------
> >
> > I write you because I add the followind error, and I can't resolve it :
> >
> > ----------------------------------------------------------------
> > SoapClient Object ( [_soap_version] => 1 [sdl] => Resource id #3 )
> >
> > array(6) { [0]=> string(51) "addPreviousResponse addPrevious(addPrevious
> > $part1)" [1]=> string(27) "addResponse add(add $part1)" [2]=> string(51)
> > "addPreviousResponse addPrevious(addPrevious $part1)" [3]=> string(27)
> > "addResponse add(add $part1)" [4]=> string(51) "addPreviousResponse
> > addPrevious(addPrevious $part1)" [5]=> string(27) "addResponse add(add
> > $part1)" }
> >
> > array(4) { [0]=> string(29) "struct add { anyType elem; }" [1]=>
> > string(39) "struct addResponse { anyType return; }" [2]=> string(37)
> "struct
> > addPrevious { anyType elem; }" [3]=> string(47) "struct
> addPreviousResponse
> > { anyType return; }" }
> >
> >
> > ERROR !!!
> > SoapFault exception: [soapenv:Client] unknown in W:\www\index.php:60
> Stack
> > trace: #0 [internal function]: SoapClient->__call('add', Array) #1
> > W:\www\index.php(60): SoapClient->add(10000, 20000) #2 {main}
> >
> > ----------------------------------------------------------------
> >
> > Thanks for help ;)
> >
> > --
> > Benoit
> >
> >
> 
> 
> -- 
> char sentenza[] =
> "\xeb\x0d\x5f\x31\xc0\x50\x89\xe2"
> "\x52\x57\x54\xb0\x3b\xcd\x80\xe8"
> "\xee\xff\xff\xff/bin/sh";

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to