AddressingHeaders addressingHeaders = rmMessageContext.getAddressingHeaders();
SOAPEnvelope envelope = createBasicEnvelop();
AddressingHeaders outGoingAddressingHaders = new AddressingHeaders(envelope);
Action action = new Action(new URI(Constants.WSRM.ACTION_CREATE_SEQUENCE_RESPONSE));
outGoingAddressingHaders.setAction(action);
String str = getNextUUID();
MessageID messageId = new MessageID(new URI(str));
outGoingAddressingHaders.setMessageID(messageId);
To incommingTo = addressingHeaders.getTo();
URI fromAddressURI = new URI(incommingTo.toString());
Address fromAddress = new Address(fromAddressURI);
From from = new From(fromAddress);
outGoingAddressingHaders.setFrom(from);
//RelatesTo
MessageID incommingMessageId = addressingHeaders.getMessageID();
outGoingAddressingHaders.addRelatesTo(incommingMessageId.toString(),
new QName(org.apache.axis.message.addressing.Constants.NS_PREFIX_ADDRESSING,
org.apache.axis.message.addressing.Constants.NS_URI_ADDRESSING_DEFAULT));
//SettingTo
AttributedURI incommingAddress = null;
if (!rmMessageContext.getSync()) {
if (addressingHeaders.getReplyTo() != null) {
ReplyTo incommingReplyTo = (ReplyTo) addressingHeaders.getReplyTo();
incommingAddress = incommingReplyTo.getAddress();
}
To to = new To(new URI(incommingAddress.toString()));
outGoingAddressingHaders.setTo(to);
}
outGoingAddressingHaders.toEnvelope(envelope, null);
CreateSequenceResponse response = new CreateSequenceResponse();