Forum Moderators: coopster

Message Too Old, No Replies

wsdl / php error

Procedure 'foo' not present

         

sned

11:03 pm on Jul 2, 2008 (gmt 0)

10+ Year Member



I'm having a weird issue with my soap service. I have a function that, if I pass one parameter, it works fine, but if I use two parameters, it throws a "procedure 'foo' not present in /var/www/..." exception.

Here's the wsdl message part:

<wsdl:message name="getNoticeRequest">
<wsdl:part name="foo" type="tns:ArrayOfStuffA" />
<wsdl:part name="bar" type="tns:ArrayOfStuffB" />
</wsdl:message>

If I remove the second wsdl:part from the message, then everything works fine, but I want to be able to pass multiple elements this way, and as soon as I add another, it gives the error.

If I swap the two lines around, then I get "procedure 'bar' not found".

Anyone have any ideas?

Not sure if this should be here, or in the xml forum.

Thanks!
-sned

eelixduppy

5:56 pm on Jul 3, 2008 (gmt 0)



Can I see the relevant PHP code you are using for this?

sned

4:33 pm on Jul 7, 2008 (gmt 0)

10+ Year Member



Here's the function that handles the "getNotice" soap stuff: (it doesn't do anything yet .. just testing it out.)

function getNotice($foo, $bar){
return "blah blah blah -- ";
}

Here's the code on the client side:

$foo[] = array(
'id'=>2,
'text'=>'some text',
'rank'=>0
);

$bar[] = array(
'id'=>2,
'text'=>'some other text',
'rank'=>0
);
try{
$client->getNotice($foo, $bar);
}
catch(SoapFault $error){
$return = "Error caught: $error->faultstring";
}

Thanks!

eelixduppy

4:15 pm on Jul 8, 2008 (gmt 0)



Alright, I have no idea. I looked around for something but couldn't find anything that would help you. I'd imagine that it has something to do with your WSDL file and something isn't correct. The only thing I can say to you is to check the documentation [w3.org] to see if you have everything that you need and also to consult the XML forum here at WebmasterWorld.

Good luck!