| crajyaguru 2006-12-12, 7:36 pm |
| I use mediation handler to intercept a (soap) message coming to a queue destination. The mediation is supposed to decorate the message by adding some additional information in form of soap headers. My question is, how do I use SDO APIs to create soap head
er blocks?
This url shows the header layout:
http://publib.boulder.ibm.com/infoc...%6f%75%74%22%20
This url shows how to get headers (see 'Working with a header' section)
http://publib.boulder.ibm.com/infoc...%6f%75%74%22%20
As can be seen from the second link, to get headers
1. List headerEntries = infoNode.getList("headers");
2. DataObject headerEntry = (DataObject) headerEntries.get(0);
3. Sequence headerContent = headerEntry.getSequence("any");
4. DataObject header = (DataObject) headerContent.getValue(0);
5. int priority = header.getInt("priority");
It would appear that to set headers, you would follow the reverse path as in
DataObject header = create data object using factory
header.setInt ("priority", 4);
// add header in the sequence
// add sequence to a new data object
// add new data object to a list
// set list to Info node
BUT this will not work because header.setInt ("priority", 4); line will fail with "NO FEATURE NAMED priority DEFINED...." error.
So, how do I create soap header blocks? Do I have to define an xsd file for headers?
BTW I am using WAS 6.0.2.5 and RAD
Thanks
Chintan Rajyaguru
http://ChintanRajyaguru.com
|