Board index » delphi » Questions, Questions, Questions....

Questions, Questions, Questions....

Can one overload SOAP functions? Provide default parameter values ?
 

Re:Questions, Questions, Questions....


Hello,

Quote
> Can one overload SOAP functions? Provide default parameter values ?

SOAP allows for overloading. It's easy to describe in a WSDL. The
FreeDbService, which came up recently, illustrates this:

http://soap.systinet.net/ws/FreeDbService/

The issue is dispatching. IOW, when a packet comes down the wire and it
reads:

<SOAP-ENV:Envelope>
     <SOAP-ENV:Body>
         <xx:getCDRecords>
            ....

The dispatcher has to look inside the packet to determine how to
dispatch it. We opted not to crack the packet any further than necessary
before dispatching. Realistically, it's not a problem to look inside,
except that we plan to move away from DOM towards SAX...

There other   approaches of tagging which 'getCDRecords', like the
soapAction but they are HTTP bound.

So currently, Delphi SOAP will dispatch to the first method that matches
the node name. So overloading is not a good idea.

About default parameters, well.. You can't because there's no way to
describe them: SOAP-encoding restricts the schema of a Service.
Currently, if a client fails to send some value, you'll just get the
default for that type: Delphi SOAP has to push something on the stack
before invoking your Service.

Regards,

Bruneau.

Other Threads