uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

36.7.2 Operations of the handler when the SOAP Header is included in the SOAP Message (in the Web Service client)

When a SOAP Message containing a SOAP Header is received, the handler processing varies according to the settings in the soap:mustUnderstand attribute of the SOAP Header. This subsection describes the processing contents when the soap:mustUnderstand attribute is 1 and when the soap:mustUnderstand attribute is not 1.

Organization of this subsection
(1) When the soap:mustUnderstand attribute is '1'
(2) When the soap:mustUnderstand attribute is not '1'

(1) When the soap:mustUnderstand attribute is '1'

When a SOAP Message with a SOAP Header wherein soap:mustUnderstand attribute is 1 is received, all the handlers are invoked if that SOAP Header can be processed using one of the set up handlers or the Web Service client.

The following figure shows the handler processing when the SOAP Header can be processed using handlers:

Figure 36-20 Processing when the SOAP Header can be processed using handlers (in the Web Service client)

[Figure]

The example in the figure assumes that handler 3 that can process the element name tns:headerA is set up. At this time, if the SOAP Header tns:headerA is received, all the handlers - handler 3, handler 2, and handler 1 are invoked.

The following figure shows the handler processing when the SOAP Header can be processed using the Web Service Implementation Class:

Figure 36-21 Processing when the SOAP Header can be processed using the Web Service Implementation Class (in the Web Service client)

[Figure]

Even assuming that only the Web Service Implementation Class can process the element name tns:headerCL, all the handlers are invoked as for processing using handlers.

When a SOAP Message with a SOAP Header wherein soap:mustUnderstand attribute is 1 is received, javax.xml.ws.soap.SOAPFaultException is returned and an error occurs (KDJW10022-E) in the following cases:

The following figure shows handler processing when the SOAP Header cannot be processed:

Figure 36-22 Processing of the handler when the SOAP Header cannot be processed (in the Web Service client)

[Figure]

(2) When the soap:mustUnderstand attribute is not '1'

When the soap:mustUnderstand attribute is not 1, all the set up handlers are invoked.

The following figure shows the handler processing when the soap:mustUnderstand attribute is not 1:

Figure 36-23 Processing of the handler when the soap:mustUnderstand attribute is not '1' (in the Web Service client)

[Figure]

In the above example, when both the handler and the Web Service Implementation Class cannot process the element tns:headerCL, but the soap:mustUnderstand attribute is not "1", an error does not occur and all the handlers are invoked.