At wits end....please help! Doc+literal newbie!
| From: | Sam Masiello | Date: | Fri, 19 Dec 2003 18:22:32 +0000 |
| Subject: | At wits end....please help! Doc+literal newbie! | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9739@lists.php.net to get a copy of this message | ||
If you are also a subscriber of the PHP SOAP mailing list, my apologies
for the cross-post. That list generally isn't too active, and I notice
a lot of questions there go unanswered, and I am really rather stuck
here. If anyone can provide any sort of assistance, I would greatly
appreciate it!
Hello all!
I have done a couple of SOAP projects before using the NuSOAP library
and XML-RPC, but my latest project has me working with a client who
wants to use doc+literal instead of XML-RPC and I am having a very hard
time with it, and was hoping you all could help.
Do I need to be doing this differently because it is doc+literal instead
of XML-RPC? Is it even more different because the XML also has complex
types? I have gone to many different sites and seen many different
variations of how to do many different things, but I am having a LOT of
trouble getting any sort of output from my client code.
I have tried many different code variations for just a simple test
client. This is what I am currently on:
/* START CLIENT CODE */
require_once("SOAP/Client.php") ;
$wsdl_url = "http://path_to_my_wsdl/interlink.wsdl";
$WSDL = new SOAP_WSDL($wsdl_url);
$client = $WSDL->getProxy();
$params = array(
'header' => "Hi",
'body' => 'There');
$result = $client->emailSubmit($params, "");
print $result;
/* END CLIENT CODE */
My current server code is:
/* START SERVER CODE */
require_once("SOAP/Server.php") ;
class SOAP_My_Server {
var $dispatch_map = array();
function SOAP_My_Server() {
$this->dispatch_map['pingService'] = array(
'in' => array(),
'out' => array('pingReturn'=>
array('ack'=>'boolean',
'time'=>'int'))) ;
$this->dispatch_map['emailSubmit'] = array(
'in' => array('header'=>'string',
'body'=>'string'),
'out' => array('submitReturn'=>'boolean')) ;
}
function emailSubmit($header, $body) {
return new SOAP_Value('return', 'boolean', true);
}
function pingService() {
$myreturn = array('ack'=>'1', 'time'=>'3600') ;
return new SOAP_Value('return', 'pong', $myreturn) ;
}
}
$server = new SOAP_Server();
$soapmyserver = new SOAP_My_Server();
$server->addObjectMap($soapmyserver,array('namespace'=>
'urn:mxlogic.outlookaddin')) ; $server->service($HTTP_RAW_POST_DATA);
/* END SERVER CODE */
ANY assistance would be greatly appreciated!!! Thanks in advance! If
any more information is necessary, please let me know.
--Sam