return setUpMessage(requestor, outbound, invalidMAP, preExistingSOAPAction, Names.WSA_NAMESPACE_NAME);
}
private SoapMessage setUpMessage(boolean requestor, boolean outbound, boolean invalidMAP,
boolean preExistingSOAPAction, String exposeAs) throws Exception {
SoapMessage message = new SoapMessage(new MessageImpl());
setUpOutbound(message, outbound);
expectRelatesTo = (requestor && !outbound) || (!requestor && outbound);
message.put(REQUESTOR_ROLE, Boolean.valueOf(requestor));
String mapProperty = getMAPProperty(requestor, outbound);
AddressingPropertiesImpl maps = getMAPs(requestor, outbound, exposeAs);
final Element header = control.createMock(Element.class);
codec.setHeaderFactory(new MAPCodec.HeaderFactory() {
public Element getHeader(SoapVersion version) {
return header;
}
});
List<Header> headers = message.getHeaders();
JAXBContext jaxbContext = control.createMock(JAXBContext.class);
ContextUtils.setJAXBContext(jaxbContext);
VersionTransformer.Names200408.setJAXBContext(jaxbContext);
VersionTransformer.Names200403.setJAXBContext(jaxbContext);
if (outbound) {