Handler chain XML format and required classes

The JAX-WS handler chain XML must be in a specific format, whether you are using the default configuration provided by Sterling Selling and Fulfillment Suite, or your own custom handlers:
<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
<handler-chain>
<handler>
<handler-class>com.ibm.afc.samplehandlers.SoapHandler</handler-class>
<handler-class>com.ibm.afc.samplehandlers.LogicalHandler</handler-class>
</handler>
</handler-chain>
</handler-chains>

According to the JAX-WS specification, the handler classes should be derived from one or both of the two supported types: SOAPHandler and LogicalHandler. The handler classes must implement the required methods:

For SOAP handler classes:
public class SoapHandler implements
javax.xml.ws.handler.soap.SOAPHandler<SOAPMessageContext> {

public void close(MessageContext messagecontext) {
}

public Set<QName> getHeaders() {
return null;
}

public boolean handleFault(SOAPMessageContext messagecontext) {
return true;
}

public boolean handleMessage(SOAPMessageContext messagecontext) {
....
For Logical handler classes:
public class LogicalHandler implements
javax.xml.ws.handler.LogicalHandler<LogicalMessageContext>[

public void close(MessageContext messagecontext) {
}

public Set<QName> getHeaders() {
return null;
}

public boolean handleFault(LogicalMessageContext messagecontext) {
return true;
}

public boolean handleMessage(LogicalMessageContext context) {

...
Note:

Use a SOAPHandler to perform payload encryption. Sterling Selling and Fulfillment Suite does not ship any encryption libraries so this functionality is not provided out-of-the-box.