Hi, Java2WSDL will map methods with single OMElement parameters to xsd:any, since an OMElement can carry any arbitary XML. But your service might be expecting some schema for the payload, even though it uses the OMElement (apparently there needs be a custom written WSDL in this case). So there's no way for your PHP client to understand the expected payload..
My advice would be to use a simple POJO with the RPCMessageReceiver as your service.. Then it'll automatically generate the correct WSDL.. More on using POJO's can be found at [1].
I can use own classes type as argument ?
Yes.. you can do that with POJO as mentioned above.. ~Thilina [1]http://ws.apache.org/axis2/1_1/pojoguide.html On 11/14/06, sentenza <[EMAIL PROTECTED]> wrote:
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";
-- http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
