Re: Re: **THIRD REQUEST** -- slightly updated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that Disco.php is the thing that actually generates the wsdl or
disco document.

calling a blahblah.wsdl in your url means you actually need a blahblah.wsdl
file on your server.

myserver.php?wsdl (notice it's a GET variable for myserver.php) prompts the
server to generate and return a wsdl document on the fly using DISCO.  No
need to manually create one.

Correct me if I'm wrong anyone.

Hope that helps.

Dave


"Sam Masiello" <smasiello@mxlogic.com> wrote in message
5E1C03CA70721448A7F9E339BB6532B62906D3@mxhq-exch.corp.mxlogic.com">news:5E1C03CA70721448A7F9E339BB6532B62906D3@mxhq-exch.corp.mxlogic.com...

Frustrated doesn't even begin to describe it at this point :)  I can't
even get one of my functions to return a simple value so I know they
were properly called.  Yes, I am using PEAR::SOAP.

A couple of questions, if you don't mind, as some of the things you did
I saw in some other examples as well:

-- Why do myserver.php?wsdl ?  I saw this in some other examples, but
wasn't sure of its' purpose.
-- What is Disco.php in the SOAP directory?  I saw it in there and
looked around to see what was going on, but still did not quite
understand what it was meant for.

I will try this and let you know if I have other questions (or to praise
your name for ending my suffering :) ).  Thank you very much for your
reply!!

--Sam



Dave Dykshoorn wrote:
> A bit annoyed, don't worry I was too when I got started?  You are
> using PEAR::SOAP right?
>
> Try this it should work for you...
>
> header seems to be reserved so you'll get faults if you use it I find.
>
> <CLIENT>
> <?php
> require_once("SOAP/Client.php") ;
> $url = "http://mysoap.com/MyServer.php?wsdl"; ;
> $wsdl = new SOAP_WSDL($url);
> $client = $wsdl->getProxy() ;
> echo '<pre>';
> //print_r($client->pingService());
> print_r($client->emailSubmit('hi', 'there'));
> echo '</pre>';
>>
>
>
>
> <SERVER>
>
> <?php
> require_once("SOAP/Server.php") ;
>
> class SOAP_My_Server {
>
> var $__dispatch_map = array();
> var $__typedef = array();
>
> function SOAP_My_Server() { $this->__dispatch_map['pingService'] =
> array( 'in' => array(), 'out' => array('pingReturn'=>
> '{urn:SOAP_My_Server}pingPackage'));
>
> $this->__dispatch_map['emailSubmit'] = array(
> 'in' => array('myheader'=>'string',
> 'body'=>'string'),
> 'out' => array('submitReturn'=>'boolean')) ;
>
> $this->__typedef['pingPackage'] = array('ack'=>'boolean',
> 'time'=>'int') ;
> }
>
> function emailSubmit($myheader, $body) {
> // return new SOAP_Value('submitReturn', 'string', 'test'); return
> new SOAP_Value('submitReturn', 'boolean', true); }
>
> function pingService() {
> $myreturn = array('ack'=>true, 'time'=>3600) ;
> return new SOAP_Value('pingReturn', '{urn:SOAP_My_Server}pingPackage',
> $myreturn) ;
> }
> }
>
> $server=new SOAP_Server;
> $soapmyserver = new SOAP_My_Server;
> $server->addObjectMap($soapmyserver,'urn:SOAP_My_Server');
>
> if (isset($_SERVER['REQUEST_METHOD']) &&
> $_SERVER['REQUEST_METHOD']=='POST') {
> $server->service($HTTP_RAW_POST_DATA); } else {
> require_once 'SOAP/Disco.php';
> $disco = new SOAP_DISCO_Server($server,"SOAP_My_Server");
> header("Content-type: text/xml");
> if (isset($_SERVER['QUERY_STRING']) &&
> strcasecmp($_SERVER['QUERY_STRING'],'wsdl')==0) {
> echo $disco->getWSDL();
> } else {
> echo $disco->getDISCO();
> }
> exit;
> }
>
>>

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


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux