WSDL and optional parameters
Guy Rixon
gtr at ast.cam.ac.uk
Tue Apr 26 10:48:23 PDT 2005
If the service takes its parameters in the form of a document with a schema,
then it's easy to have optional parts in that schema. Any optional element
could just be left out of the document. The OOP equivalent of this is a method
taking one object, e.g. a Java bean, as argument.
If the service takes a list of parameters that are separate XML fragments -
i.e. faking an RPC while using document/literal encoding; see "wrapped" mode
in Apache Axis - then we could use Ray's idea. We'd add a mandatory parameter
on the end of the list to contain the optional bits.
Myself, I'd rather have services taking input as documents than as lists of
parameters. But both schemes work.
Cheers,
Guy
On Tue, 26 Apr 2005, Ray Plante wrote:
> On Tue, 26 Apr 2005, Markus Dolensky wrote:
> > Did we ever come to a conclusion on how to describe optional parameters of a
> > SOAP service in WSDL?
>
> My take on this is to wrap optional bits together in a required XML
> object, e.g. <Options>. If no optional parameters are specified, then
> this tag is empty.
>
> hope this helps,
> Ray
>
>
Guy Rixon gtr at ast.cam.ac.uk
Institute of Astronomy Tel: +44-1223-337542
Madingley Road, Cambridge, UK, CB3 0HA Fax: +44-1223-337523
More information about the grid
mailing list