by
dcooper@jade.co.nz >> Fri, 31 Oct 2003 1:30:06 GMT
To define SOAP headers in JADE:
Define a class representing the data in a particular SOAP header as a subclass of the JadeWebServiceSoapHeader class. Make sure that the soap header direction is defined an input-output (on the Web Services sheet of the Define Class dialog). Add properties to this class as required; for example, usercode and password.
To process SOAP headers in JADE:
In your Web Service class, add a property reference to the SOAP header class (that you defined above). For each Web Service method that you want the SOAP header to apply to, use the Web Service Options menu item (from the Methods menu) to add the SOAP header to the method.
The generated WSDL will now contain enough information for your web service client to create and process the SOAP headers.
Note that in JADE 6.0.17, the JADE Web Service Client (aka Consumer) is a beta release and does not support the processing of SOAP headers. However if your Web Service (Provider) application receives a SOAP header, a transient instance of the appropriate SOAP header class will be created and the property in your Web Service class that references this header will be set up to refer to this object. Your code only needs to reference this object (making sure you check for a null value) and retrieve the property values of the object in the usual way. If your SOAP header is defined as input-output, then the Web Services framework will also generate the appropriate SOAP headers in the message that is sent back to the client.
You may also want to check out the documentation on using session handling and secure services.
Cheers,
Lather.