1 17 package org.apache.servicemix.components.wsif; 18 19 import javax.jbi.messaging.MessageExchange; 20 import javax.jbi.messaging.NormalizedMessage; 21 22 import org.apache.servicemix.components.util.OutBinding; 23 import org.apache.wsif.WSIFMessage; 24 import org.apache.wsif.WSIFOperation; 25 26 31 public class WSIFOutBinding extends OutBinding { 32 33 private WSIFMarshaler marshaler = new WSIFMarshaler(); 34 private WSIFOperationMap operationMap; 35 36 39 public WSIFMarshaler getMarshaller() { 40 return marshaler; 41 } 42 43 46 public void setMarshaller(WSIFMarshaler marshaler) { 47 this.marshaler = marshaler; 48 } 49 50 53 public WSIFMarshaler getMarshaler() { 54 return marshaler; 55 } 56 57 60 public void setMarshaler(WSIFMarshaler marshaler) { 61 this.marshaler = marshaler; 62 } 63 64 public WSIFOperationMap getOperationMap() { 65 return operationMap; 66 } 67 68 public void setOperationMap(WSIFOperationMap operationMap) { 69 this.operationMap = operationMap; 70 } 71 72 protected void process(MessageExchange exchange, NormalizedMessage normalizedMessage) throws Exception { 75 WSIFOperationInfo operationInfo = operationMap.getOperationForExchange(exchange); 76 WSIFOperation operation = operationInfo.createWsifOperation(); 77 WSIFMessage message = operation.createInputMessage(); 78 marshaler.fromNMS(operationInfo, message, normalizedMessage, getBody(normalizedMessage)); 79 operation.executeInputOnlyOperation(message); 80 done(exchange); 81 } 82 } 83 | Popular Tags |