Package xsul.ws_addressing

This module provides a simple implementation of WS-Addressing.

See:
          Description

Class Summary
WsAddressing This package contains implementation of WS-Addressing and this class contains some shared constants.
WsaEndpointReference Implementation of Endpoint Reference from Web Services Addressing (WS-Addressing)
WsaInvoker Invoker that will use WSA headers to decide where to send message (wsa:To) and will use WSA processing node to indicate where to send replies.
WsaMessageInformationHeaders Implementation of Message Information Headers from Endpoint Reference from Web Services Addressing 2004 (WS-Addressing)
WsaRelatesTo Implementation of RelatesTo element from Web Services Addressing (WS-Addressing) used in WSA MessageHeaders
WsaUtil Handy util methods right now helping to generate WSA comliant faults.
 

Package xsul.ws_addressing Description

This module provides a simple implementation of WS-Addressing.

Provided are get/set methods to access headers defined in WS-Addressing.

Depends on modules: common invoker processor soap*

 

Reference card (typical usage patterns)

Access WS-Addressing data (Message Information Headers) from SOAP message

To access WSA headers simpley wrap SOAP Envelope (or SOAP Header) element in WsaMessageInformationHeaders class and use its set/get methods to modify SOAP message content. Example:

        WsaMessageInformationHeaders inHeaders = new WsaMessageInformationHeaders(envelope);
        XmlElement outMessageEnvelope;
        try {
          outMessageEnvelope = envelope.clone();
        } catch (CloneNotSupportedException e) {
          throw new XsulException("internal error: could not clone message");
        }
        WsaMessageInformationHeaders outHeaders = new WsaMessageInformationHeaders(outMessageEnvelope);
        inHeaders.getTo();
        inHeaders.getReplyTo().getAddress();
        inHeaders.getFaultTo().getAddress();
        WsaRelatesTo relates = (WsaRelatesTo) inHeaders.getRelatesTo().iterator().next(); //if any ...
        relates.getRelationship();
        relates.getRelationshipType();
        inHeaders.getAction();
        URI messageId = inHeaders.getMessageId();
        if(messageId != null) {
          outHeaders.addRelatesTo(new WsaRelatesTo(messageId));
        }
        outHeaders.setAction(respAction);
        outHeaders.setTo(WsAddressing.ROLE_ANONYMOUS_URI);
        outHeaders.setFrom(new WsaEndpointReference(serviceLocation));



IU Extreme! Lab (http://www.extreme.indiana.edu)