I have posted this question to both the PHP SOAP and the PEAR General
lists and have not received a reply on either list (not a very
responsive group, I guess :) ) so I thought I would try to reach a
larger audience in hopes that perhaps one of you out there might be able
to help.

Any assistance that ANYONE can provide would be more than
appreciated...I am really stuck on how to proceed here as calling the
client script doesn't produce ANY output, even if I change the return
from emailSubmit from the SOAP_Value to a simple string...nothing.

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") ;
$url = "http://path_to_my_wsdl/mywsdl.wsdl"; ;
$wsdl = new SOAP_WSDL($url);
$client = $wsdl->getProxy() ;

$params=array('header'=>'hi', 'body'=>'there') ;
$options=array(
'namespace' => 'urn:mxlogic.outlookaddin',
'style' => 'document',
'use' => 'literal');

print $client->emailSubmit($params, $options);

/* END CLIENT CODE */


/* 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) ;
        }
}

$options =
array('namespace'=>'urn:mxlogic.outlookaddin','type'=>'document','use'=>
'literal') ;

$server=new SOAP_Server;
$soapmyserver= new SOAP_My_Server;
$server->addObjectMap($soapmyserver,$options);
$server->service($GLOBALS['HTTP_RAW_POST_DATA']);

/* END SERVER CODE */

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to