/** * Helper method to determine if an MAPs Action is empty (a null action * is considered empty, whereas a zero length action suppresses * the propagation of the Action property). * * @param maps the MAPs Action under test * @return true if the Action is empty */ public static boolean hasEmptyAction(AddressingProperties maps) { boolean empty = maps.getAction() == null; if (maps.getAction() != null && maps.getAction().getValue().isEmpty()) { maps.setAction(null); empty = false; } return empty; }
public String getAction() { AttributedURIType action = implementation.getAction(); return (action != null ? action.getValue() : null); }
/** * Helper method to determine if an MAPs Action is empty (a null action * is considered empty, whereas a zero length action suppresses * the propagation of the Action property). * * @param maps the MAPs Action under test * @return true if the Action is empty */ public static boolean hasEmptyAction(AddressingProperties maps) { boolean empty = maps.getAction() == null; if (maps.getAction() != null && maps.getAction().getValue().isEmpty()) { maps.setAction(null); empty = false; } return empty; }
/** * Helper method to determine if an MAPs Action is empty (a null action * is considered empty, whereas a zero length action suppresses * the propagation of the Action property). * * @param maps the MAPs Action under test * @return true if the Action is empty */ public static boolean hasEmptyAction(AddressingProperties maps) { boolean empty = maps.getAction() == null; if (maps.getAction() != null && maps.getAction().getValue().length() == 0) { maps.setAction(null); empty = false; } return empty; }
/** * Helper method to determine if an MAPs Action is empty (a null action * is considered empty, whereas a zero length action suppresses * the propagation of the Action property). * * @param maps the MAPs Action under test * @return true if the Action is empty */ public static boolean hasEmptyAction(AddressingProperties maps) { boolean empty = maps.getAction() == null; if (maps.getAction() != null && maps.getAction().getValue().length() == 0) { maps.setAction(null); empty = false; } return empty; }
public void handleMessage(SoapMessage message) throws Fault { String s = (String)message.get(SoapBindingConstants.SOAP_ACTION); AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); if (inProps != null && s == null) { //MS/WCF doesn't put a soap action out for this, must check the headers s = inProps.getAction().getValue(); } if (s != null && s.contains("/RST/SCT") && (s.startsWith(STSUtils.WST_NS_05_02) || s.startsWith(STSUtils.WST_NS_05_12))) { message.put(org.apache.cxf.ws.addressing.MAPAggregator.ACTION_VERIFIED, Boolean.TRUE); } }
public void handleMessage(SoapMessage message) throws Fault { String s = (String)message.get(SoapBindingConstants.SOAP_ACTION); AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); if (inProps != null && s == null) { //MS/WCF doesn't put a soap action out for this, must check the headers s = inProps.getAction().getValue(); } if (s != null && s.contains("/RST/SCT") && (s.startsWith(STSUtils.WST_NS_05_02) || s.startsWith(STSUtils.WST_NS_05_12))) { message.put(org.apache.cxf.ws.addressing.MAPAggregator.ACTION_VERIFIED, Boolean.TRUE); } }
return; AttributedURIType action = maps.getAction(); if (action != null) { String value = action.getValue();
public void handleMessage(SoapMessage message) throws Fault { AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); AddressingProperties outProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND); if (inProps != null) { if (outProps == null) { outProps = new AddressingProperties(inProps.getNamespaceURI()); } AttributedURIType action = new AttributedURIType(); action.setValue(inProps.getAction().getValue().replace("/RST/", "/RSTR/")); outProps.setAction(action); message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND, outProps); } }
public void handleMessage(SoapMessage message) throws Fault { AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); AddressingProperties outProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND); if (inProps != null) { if (outProps == null) { outProps = new AddressingProperties(inProps.getNamespaceURI()); } AttributedURIType action = new AttributedURIType(); action.setValue(inProps.getAction().getValue().replace("/RST/", "/RSTR/")); outProps.setAction(action); message.put(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND, outProps); } }
public void handleMessage(Message message) throws Fault { String action = (String)message.get(SoapBindingConstants.SOAP_ACTION); if (action == null) { AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); if (inProps != null && inProps.getAction() != null) { action = inProps.getAction().getValue(); } } if ("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get".equals(action) || "http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request".equals(action)) { message.remove(AssertionInfoMap.class.getName()); Exchange ex = message.getExchange(); Endpoint endpoint = createEndpoint(message); ex.put(Endpoint.class, endpoint); ex.put(Service.class, endpoint.getService()); ex.put(org.apache.cxf.binding.Binding.class, endpoint.getBinding()); ex.put(BindingOperationInfo.class, endpoint.getBinding().getBindingInfo() .getOperation(new QName("http://mex.ws.cxf.apache.org/", "Get2004"))); ex.remove(BindingOperationInfo.class); message.put(MAPAggregator.ACTION_VERIFIED, Boolean.TRUE); message.getInterceptorChain().add(endpoint.getInInterceptors()); message.getInterceptorChain().add(endpoint.getBinding().getInInterceptors()); } }
public void handleMessage(Message message) throws Fault { String action = (String)message.get(SoapBindingConstants.SOAP_ACTION); if (action == null) { AddressingProperties inProps = (AddressingProperties)message .getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND); if (inProps != null && inProps.getAction() != null) { action = inProps.getAction().getValue(); } } if ("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get".equals(action) || "http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata/Request".equals(action)) { message.remove(AssertionInfoMap.class.getName()); Exchange ex = message.getExchange(); Endpoint endpoint = createEndpoint(message); ex.put(Endpoint.class, endpoint); ex.put(Service.class, endpoint.getService()); ex.put(org.apache.cxf.binding.Binding.class, endpoint.getBinding()); ex.put(BindingOperationInfo.class, endpoint.getBinding().getBindingInfo() .getOperation(new QName("http://mex.ws.cxf.apache.org/", "Get2004"))); ex.remove(BindingOperationInfo.class); message.put(MAPAggregator.ACTION_VERIFIED, Boolean.TRUE); message.getInterceptorChain().add(endpoint.getInInterceptors()); message.getInterceptorChain().add(endpoint.getBinding().getInInterceptors()); } }
private void updateOutputAction(String append) { AddressingProperties p = ContextUtils.retrieveMAPs(PhaseInterceptorChain.getCurrentMessage(), false, false); AddressingProperties pout = new AddressingProperties(); AttributedURIType action = new AttributedURIType(); action.setValue(p.getAction().getValue() + append); pout.exposeAs(p.getNamespaceURI()); pout.setAction(action); ContextUtils.storeMAPs(pout, PhaseInterceptorChain.getCurrentMessage(), true); }
private void updateOutputAction(String append) { AddressingProperties p = ContextUtils.retrieveMAPs(PhaseInterceptorChain.getCurrentMessage(), false, false); AddressingProperties pout = new AddressingProperties(); AttributedURIType action = new AttributedURIType(); action.setValue(p.getAction().getValue() + append); pout.exposeAs(p.getNamespaceURI()); pout.setAction(action); ContextUtils.storeMAPs(pout, PhaseInterceptorChain.getCurrentMessage(), true); }
private CallContext setupCallContext( SoapMessage message, Header callHeader, Header callbackHeader) throws Fault { final AddressingProperties maps = getAddressingProperties(message); if (maps == null) { throw new IllegalStateException( "Request-Callback enabled but no WS-Addressing headers set. "); } CallContext ctx = new CallContext(); message.put(RequestCallbackFeature.CALLCONTEXT_PROPERTY_NAME, ctx); final QName operationName = QName.valueOf(maps.getAction().getValue()); if (!isGenericOperation(operationName)) { ctx.setOperationName(operationName); } ctx.setCallId(valueOf(callHeader)); if (callbackHeader != null) { ctx.setCallbackId(valueOf(callbackHeader)); } ctx.setRequestId(maps.getMessageID().getValue()); ctx.setReplyToAddress(maps.getReplyTo().getAddress().getValue()); ctx.setCorrelationId(getCorrelationId(message)); // Try to get SAM flowId in request message // to store it in CallContext for subsequent use // in callback message if (callbackHeader == null) { setupFlowId(message); } fillCallContext(ctx, message); return ctx; }