Hey folks,

When building a web service by starting with a .h file (then compiling
that to a wsdl and skeletons via soapcpp2), is it possible to define
some parameters of the web services request as optional and have that
state reflected in the WSDL file?

I tried adding a new integer parameter with a default value of 0 but saw
nothing other than the basic declaration in the WSDL and the skeletons. 
Using soapUI to validate a request for that service with the new
parameter set to blank results in soapUI complaining that a value is
required for that parameter.

//gsoap ns1  service method-style:   addMyData rpc
//gsoap ns1  service method-encoding:    addMyData
http://schemas.xmlsoap.org/soap/encoding/
//gsoap ns1  service method-action:  addMyData
http://localhost/Soap#addMyData
int ns1__addMyData(
     std::string    objectID,         ///< Request parameter
     int            objectData,       ///< Request parameter
     std::string    hexId,            ///< Request parameter
     int            blocking = 0,     ///< Request parameter (optional)
     struct ns1__addMyDataResponse &  ///< Response struct parameter
);

My attempt to make the parameter optional shown in red.

Cheers!
Jon

Reply via email to