private String getContextProperty(Context context, String name) { Object p = context.getPropertyValue(name); if (p instanceof SOAPHeaderElement) { return ((SOAPHeaderElement)p).getValue(); } else if (p != null) { return p.toString(); } return null; } }
@Override public String getText() { return getSaajHeaderElement().getValue(); }
@Override public String getText() { return getSaajHeaderElement().getValue(); }
@Override public String getText() { return getSaajHeaderElement().getValue(); }
@Override public RpcHeader next() { SOAPHeaderElement se = hi.next(); return new RpcHeader(se.getNamespaceURI(), se.getLocalName(), se.getValue()); } @Override
@Override public void process(Exchange exchange) throws Exception { ServiceDomain domain = ((SwitchYardCamelContext)exchange.getContext()).getServiceDomain(); String socketAddr = (String)domain.getProperty("soapClientPort"); String socketAddrFault = (String)domain.getProperty("httpPort"); Order order = exchange.getIn().getBody(Order.class); System.out.println("Received Order " + order.getItem() + " with quantity " + order.getQuantity() + "."); if (order.getItem().equals("Airbus")) { throw new UnknownItem("Sorry, Airbus is no longer available with us!"); } SOAPHeaderElement messageId = (SOAPHeaderElement) exchange.getIn().getHeaders().get("{http://www.w3.org/2005/08/addressing}MessageID"); if (messageId == null) { messageId = (SOAPHeaderElement) exchange.getIn().getHeaders().get("{http://www.w3.org/2005/08/addressing}messageid"); } exchange.getOut().getHeaders().put("{http://www.w3.org/2005/08/addressing}ReplyTo", "http://localhost:" + socketAddr + "/soap-addressing/client/ResponseService"); exchange.getOut().getHeaders().put("{http://www.w3.org/2005/08/addressing}RelatesTo", messageId.getValue()); exchange.getOut().getHeaders().put("{http://www.w3.org/2005/08/addressing}FaultTo", "http://localhost:" + socketAddrFault + "/soap-addressing/fault/FaultService"); exchange.getOut().setBody(order); }
/** * Determines if the envelope has addressing action header. * * @param soapMessage The SOAPMessage * @return The action addressing header * @throws SOAPException If the envelope could not be read */ public static String getAddressingAction(SOAPMessage soapMessage) throws SOAPException { String action = null; Iterator<SOAPHeaderElement> headers = soapMessage.getSOAPPart().getEnvelope().getHeader().examineAllHeaderElements(); while (headers.hasNext()) { SOAPHeaderElement element = headers.next(); if (element.getElementQName().equals(WSA_ACTION_QNAME)) { action = element.getValue(); break; } } return action; }
for (SOAPHeaderElement soapHeaderElement : list) { if (soapHeaderElement.getLocalName().equals(WsaConstants.EN_TO)) { wsaHeaders.add(new WsaToHeader(soapHeaderElement.getValue())); to = true; } else if (soapHeaderElement.getLocalName().equals(WsaConstants.EN_ACTION)) { wsaHeaders.add(new WsaActionHeader(soapHeaderElement.getValue())); action = true; } else if (soapHeaderElement.getLocalName().equals(WsaConstants.EN_REPLY_TO)) { wsaHeaders.add(new WsaMessageIDHeader(soapHeaderElement.getValue())); messageId = true;
for (SOAPHeaderElement soapHeaderElement : list) { if (soapHeaderElement.getLocalName().equals(WsaConstants.EN_TO)) { wsaHeaders.add(new WsaToHeader(soapHeaderElement.getValue())); to = true; } else if (soapHeaderElement.getLocalName().equals(WsaConstants.EN_ACTION)) { wsaHeaders.add(new WsaActionHeader(soapHeaderElement.getValue())); action = true; } else if (soapHeaderElement.getLocalName().equals(WsaConstants.EN_REPLY_TO)) { wsaHeaders.add(new WsaMessageIDHeader(soapHeaderElement.getValue())); messageId = true;
/** * Determines if the envelope has addressing action header. * * @param soapMessage The SOAPMessage * @return The action addressing header * @throws SOAPException If the envelope could not be read */ public static String getAddressingAction(SOAPMessage soapMessage) throws SOAPException { String action = null; Iterator<SOAPHeaderElement> headers = soapMessage.getSOAPPart().getEnvelope().getHeader().examineAllHeaderElements(); while (headers.hasNext()) { SOAPHeaderElement element = headers.next(); if (element.getElementQName().equals(WSA_ACTION_QNAME)) { action = element.getValue(); break; } } return action; }
String identifierString = headerElement.getValue(); if (identifierString != null) { ArjunaContext arjunaContext = ArjunaContext.getContext(context);
String identifierString = headerElement.getValue(); if (identifierString != null) { ArjunaContext arjunaContext = ArjunaContext.getContext(context);
String identifierString = headerElement.getValue(); if (identifierString != null) { ArjunaContext arjunaContext = ArjunaContext.getContext(context);
String identifierString = headerElement.getValue(); if (identifierString != null) { ArjunaContext arjunaContext = ArjunaContext.getContext(context);
break; case VALUE: value = soapHeader.getValue(); break; case XML:
break; case VALUE: value = soapHeader.getValue(); break; case XML: