Default SOAP Result Checker Code

Default Result Checkers are built-in result checkers that are applied automatically on MBO operations by Unwired Server. They can be replaced by implementing and deploying a Custom Result Checker. This is the operation handler code used to check results in SOAP Web service data sources.

package com.sybase.sup.ws;

import javax.xml.soap.SOAPFault;

import com.sybase.dataservices.OHException;
import com.sybase.sup.ws.soap.SoapOperationHandler;

public class DefaultSoapOperationHandler extends SoapOperationHandler {

	public void resultCheck(
						javax.xml.soap.SOAPEnvelope response, 
						javax.xml.soap.SOAPEnvelope request) {

       SOAPFault fault = null;
       try 
       {
    	   fault = response.getBody().getFault();
       } 
       catch (Exception e)
       {
    	   //If we're in here, no fault was found.
       }
       if ( fault != null )
       {
    	   throw new OHException(OHException.INTERNAL_SERVER_ERROR, 0, fault.getFaultString());
       }
 
    }
}