private static void setAction(AddressingProperties maps, String action) { AttributedURIType actionURI = new AttributedURIType(); actionURI.setValue(action); maps.setAction(actionURI); } }
private static void setAction(AddressingProperties maps, String action) { AttributedURIType actionURI = new AttributedURIType(); actionURI.setValue(action); maps.setAction(actionURI); } }
/** * 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().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; }
.createAttributedURIType(); aAttributedURIType.setValue(wsaHeaderValue); maps.setAction(aAttributedURIType);
AttributedURIType action = new AttributedURIType(); action.setValue(inProps.getAction().getValue().replace("/RST/", "/RSTR/")); props.setAction(action); exchange.getOutMessage().put(JAXWSAConstants.ADDRESSING_PROPERTIES_OUTBOUND, props);
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); } }
/** * Assemble the generic MAPs (for both requests and responses). * * @param message the current message * @return AddressingProperties containing the generic MAPs */ private AddressingProperties assembleGeneric(Message message) { AddressingProperties maps = getMAPs(message, true, true); // MessageID if (maps.getMessageID() == null) { String messageID = ContextUtils.generateUUID(); maps.setMessageID(ContextUtils.getAttributedURI(messageID)); } // Action if (ContextUtils.hasEmptyAction(maps)) { maps.setAction(InternalContextUtils.getAction(message)); if (ContextUtils.hasEmptyAction(maps) && ContextUtils.isOutbound(message)) { maps.setAction(ContextUtils.getAttributedURI(getActionUri(message, true))); } } return maps; }
/** * Assemble the generic MAPs (for both requests and responses). * * @param message the current message * @return AddressingProperties containing the generic MAPs */ private AddressingProperties assembleGeneric(Message message) { AddressingProperties maps = getMAPs(message, true, true); // MessageID if (maps.getMessageID() == null) { String messageID = ContextUtils.generateUUID(); maps.setMessageID(ContextUtils.getAttributedURI(messageID)); } // Action if (ContextUtils.hasEmptyAction(maps)) { maps.setAction(InternalContextUtils.getAction(message)); if (ContextUtils.hasEmptyAction(maps) && ContextUtils.isOutbound(message)) { maps.setAction(ContextUtils.getAttributedURI(getActionUri(message, true))); } } return maps; }
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); }
AttributedURIType act = new AttributedURIType(); act.setValue(action); addrProperties.setAction(act);
AttributedURIType act = new AttributedURIType(); act.setValue(action); addrProperties.setAction(act);
/** * Construct and store MAPs for partial response. * * @param partialResponse the partial response message * @param namespaceURI the current namespace URI */ private static void ensurePartialResponseMAPs(Message partialResponse, String namespaceURI) { // ensure there is a MAPs instance available for the outbound // partial response that contains appropriate To and ReplyTo // properties (i.e. anonymous & none respectively) AddressingProperties maps = new AddressingProperties(); maps.setTo(EndpointReferenceUtils.getAnonymousEndpointReference()); maps.setReplyTo(ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType()); maps.getReplyTo().setAddress(ContextUtils.getAttributedURI(Names.WSA_NONE_ADDRESS)); maps.setAction(ContextUtils.getAttributedURI("")); maps.exposeAs(namespaceURI); ContextUtils.storeMAPs(maps, partialResponse, true, true, false); }
/** * Construct and store MAPs for partial response. * * @param partialResponse the partial response message * @param namespaceURI the current namespace URI */ private static void ensurePartialResponseMAPs(Message partialResponse, String namespaceURI) { // ensure there is a MAPs instance available for the outbound // partial response that contains appropriate To and ReplyTo // properties (i.e. anonymous & none respectively) AddressingProperties maps = new AddressingProperties(); maps.setTo(EndpointReferenceUtils.getAnonymousEndpointReference()); maps.setReplyTo(ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType()); maps.getReplyTo().setAddress(ContextUtils.getAttributedURI(Names.WSA_NONE_ADDRESS)); maps.setAction(ContextUtils.getAttributedURI("")); maps.exposeAs(namespaceURI); ContextUtils.storeMAPs(maps, partialResponse, true, true, false); }
/** * Construct and store MAPs for partial response. * * @param partialResponse the partial response message * @param namespaceURI the current namespace URI */ private static void ensurePartialResponseMAPs(Message partialResponse, String namespaceURI) { // ensure there is a MAPs instance available for the outbound // partial response that contains appropriate To and ReplyTo // properties (i.e. anonymous & none respectively) AddressingProperties maps = new AddressingProperties(); maps.setTo(EndpointReferenceUtils.getAnonymousEndpointReference()); maps.setReplyTo(ContextUtils.WSA_OBJECT_FACTORY.createEndpointReferenceType()); maps.getReplyTo().setAddress(ContextUtils.getAttributedURI(Names.WSA_NONE_ADDRESS)); maps.setAction(ContextUtils.getAttributedURI("")); maps.exposeAs(namespaceURI); ContextUtils.storeMAPs(maps, partialResponse, true, true, false); }