Forum Moderators: coopster
well and good, completed that phase.
now,
3) the server will generate a soap request containing all the information I needed (which the server is doing, checked with the tech guys)
4) I have to reply with an acknowledgment receipt.
Now, I am stuck how to receive that soap request (which in real world is response).
I have written the following code.
/The WSDL file
$wsdlfile = 'inc/whatsoever.wsdl';
//Server object
$s = new soap_server($wsdlfile);
//Directing all the POST request to the server
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$s->service($HTTP_RAW_POST_DATA);
According to the file, we must have CheckDeliverRequest function, so the implementation is given here
function CheckDeliver($input){
echo 'CheckDeliver function called';
echo $input;
foreach($input as $element){
echo 'Name :' .$element->getName() . ' Value :' . $element;
}
}
/* and just to make sure I am not doing it in-correctly I put another trap here.*/
function CheckDeliverRequest($input){
echo 'CheckDeliverRequest function called';
echo $input;
foreach($input as $element){
echo 'Name :' .$element->getName() . ' Value :' . $element;
}
}
The problem is none of the following function is called.
Can anyone help me how to deal with this trouble?
However, may I ask, if you are on PHP5, why not use the built in Soap functionality [uk2.php.net] instead of third party code?
I have used it and it is incredibly easy to implement.
This is the turtorial I followed when I was learning SOAP. It helped me a lot to understand and how to implement SOAP.
Shows you server, client, calls, Exceptions, etc.
now the Server assumes my site to be a server and sends a soap request, containing all the information about that number and in return I have to respond with an acknowledgment.
The problem is, when I am using nuSoap implementation of server, I receives only the top variable of the server's request, and the rest is vanished!.
Just to solve it, we have used the HTTP_ROW_POST_DATA of pHP and checked the contents of the soap request and parsed it into our desired result, but the problem remains the same, why NuSoap does not show other details, when the request send by the server is complete.
The word "request" used in above paragraph will easily be understood if replaced with "second response".
Anyway, so you have a webservice on your server which receives calls from this other web service?
Their webservice should pass all the variables as parameters, and yours should be ready it accept them. It should work ok, maybe the problem is their end?
If the other end is a .NET web service, they will often deal in objects. They might place all the parameters within an object and send that.
Sorry I can't be of more help but I havem't used NuSoap, only the Soap extension of PHP, and the setup sounds rather strange.