WebSphere Application Server - Adding soap header block using SDO API in mediation handler

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > December 2006 > Adding soap header block using SDO API in mediation handler





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Adding soap header block using SDO API in mediation handler
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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com