1 17 package org.apache.sandesha.server.msgprocessors; 18 19 import org.apache.axis.AxisFault; 20 import org.apache.axis.message.addressing.RelatesTo; 21 import org.apache.sandesha.IStorageManager; 22 import org.apache.sandesha.RMMessageContext; 23 import org.apache.sandesha.ws.rm.CreateSequenceResponse; 24 25 30 public class CreateSequenceResponseProcessor implements IRMMessageProcessor { 31 IStorageManager storageManager = null; 32 33 public CreateSequenceResponseProcessor(IStorageManager storageManger) { 34 this.storageManager = storageManger; 35 } 36 37 public boolean processMessage(RMMessageContext rmMessageContext) throws AxisFault { 38 39 CreateSequenceResponse createSeqRes = rmMessageContext.getRMHeaders() 40 .getCreateSequenceResponse(); 41 42 RelatesTo relatesTo = (RelatesTo) rmMessageContext.getAddressingHeaders().getRelatesTo() 43 .get(0); 44 String sequenceID = createSeqRes.getIdentifier().toString(); 45 47 storageManager.setApprovedOutSequence(relatesTo.getURI().toString(), sequenceID); 48 String offerID = storageManager.getOffer(relatesTo.getURI().toString()); 49 50 if (createSeqRes.getAccept() != null) { 51 storageManager.addRequestedSequence(offerID); 52 storageManager.setAcksTo(offerID, 53 createSeqRes.getAccept().getAcksTo().getAddress().toString()); 54 } 55 return false; 57 } 58 59 } | Popular Tags |