17
Shai Levit Verizon Business Web Service Reliable Messaging June 8, 2014 Implementation Guide for WSRM TABLE OF CONTENT Introduction 2 Overview 2 OASIS Standards of WSRM 2 Scope 2 Requirements 3 SUMS WSRM essentials 4 Server Side 4 Interceptors 5 Resources 6 Client Side 13 Appendix A: 14 SOAPUI response view with images 14 Client in Java response view with images 16 Definitions 16 Change Control DATE VERSION DESCRIPTION OF CHANGE Jun 9, 2014 1.0 Initial Draft Jun 11, 2014 1.1 Second Draft Jun 12, 2014 1.2 Final Draft 1

WSRM_WriteUp

Embed Size (px)

Citation preview

Page 1: WSRM_WriteUp

Shai Levit Verizon Business Web Service Reliable Messaging June 8, 2014

Implementation Guide for WSRM

TABLE OF CONTENT Introduction 2

Overview 2

OASIS Standards of WSRM 2

Scope 2

Requirements 3

SUMS WSRM essentials 4 Server Side 4

Interceptors 5

Resources 6

Client Side 13

Appendix A: 14

SOAPUI response view with images 14

Client in Java response view with images 16

Definitions 16

Change ControlDATE VERSION DESCRIPTION OF CHANGE

Jun 9, 2014 1.0 Initial Draft

Jun 11, 2014 1.1 Second Draft

Jun 12, 2014 1.2 Final Draft

�1

Page 2: WSRM_WriteUp

Introduction Overview The Apache CXF Web Service Reliable Messaging (WSRM) establishes the standard protocols, along with message formats and processing requirements for communication between two web service message exchanges.

WSRM specification allows two systems to send messages between each other reliably. The aim of this is to ensure that messages are transferred properly from the sender to the receiver. WSRM provides a level of guarantee for XML messaging by composing with existing SOAP-based systems whilst being transparent to the existing applications. The handlers that sit inside the client's and server's SOAP processing engines transfer messages, handle retries and do delivery, but aren’t necessarily visible at the application level. Simply, they ensure that the messages get re-transmitted if lost or undelivered.

OASIS Standards of WSRM Many errors can interrupt a conversation. Messages can be lost, duplicated or reordered. Further the host systems can experience failures and lose volatile state. The WS-ReliableMessaging specification defines an interoperable protocol that enables a Reliable Messaging (RM) Source to accurately determine the disposition of each message it Transmits as perceived by the RM Destination, so as to allow it to resolve any in-doubt status regarding receipt of the message Transmitted. The protocol also enables an RM Destination to efficiently determine which of those messages it Receives have been previously Received, enabling it to filter out duplicate message transmissions caused by the retransmission, by the RM Source, of an unacknowledged message. It also enables an RM Destination to Deliver the messages it Receives to the Application Destination in the order in which they were sent by an Application Source, in the event that they are Received out of order. Note that this specification places no restriction on the scope of the RM Source or RM Destination entities. For example, either can span multiple WSDL Ports or Endpoints. The protocol enables the implementation of a broad range of reliability features which include ordered Delivery, duplicate elimination, and guaranteed receipt. The protocol can also be implemented with a range of robustness characteristics ranging from in-memory persistence that is scoped to a single process lifetime, to replicated durable storage that is recoverable in all but the most extreme circumstances. It is expected that the Endpoints will implement as many or as few of these reliability characteristics as necessary for the correct operation of the application using the protocol. Regardless of which of the reliability features is enabled, the wire protocol does not change.

Scope This guide details options and setup of WS-Reliable Messaging for the HISP to HISP communication in the Verizon SUMS environment. At its simplest level, JMS sends messages between servers and clients. The format of these messages is quite flexible and can include ordinary text messages (including raw text, SOAP, and XML), entire Java objects, and "empty" messages that are suitable for basic communication. This document specifies preferred mechanisms that can be used and leveraged for better and secure communication between two HISP systems, utilizing SOAP / XML type messaging.

�2

Page 3: WSRM_WriteUp

Requirements To make a message exchange between two endpoints reliable, you need to ensure the presence of the RM Interceptors on the respective Interceptor Chain is invoked and (as WS-Reliable Messaging has a dependency on WS-Addressing) the addressing interceptors are added to the interceptor chains. This will ensure and enable the CreateSequence request and the CreateSequenceResponse response to initialize and handle the messaging chain. In addition, RM Interceptors are responsible for adding the Sequence headers to the application messages, and on the destination side, extracting them from the message. This means that no changes to application code are required to make the message exchange reliable. Furthermore, A Policy with an RMAssertion element is attached to the wsdl:service element (or any other wsdl element that according to the rules for WS-Policy Attachment is an attachment point for Policy or PolicyReference elements). The assertion attributes control the behavior of the source/destination.Interceptors are the fundamental processing unit which is native in Apache CXF. Basically they are Java classes that intercept your message to provide or apply certain core services to it. Interceptors are invoked in chain and organized in phases. When a CXF client invokes a CXF server, there is an outgoing interceptor chain for the client and an incoming chain for the server. When the server sends the response back to the client, there is an outgoing chain for the server and an incoming one for the client. Additionally, in the case of SOAPFaults, a CXF web service will create a separate outbound error handling chain and the client will create an inbound error handling chain.

�3

Page 4: WSRM_WriteUp

SUMS WSRM essentials The mechanism for obtaining a successful delivery notification across an XDR Edge scenario and including a HISP to HISP transaction is to use WS-ReliableMessaging.The Direct HISP MUST implement the Reliable Messaging Destination requirements of WS-ReliableMessaging 1.2 Protocol. A Direct HISP SHALL support a SOAP header named support X-DIRECT-FINAL-DESTINATION-DELIVERY. The X-DIRECT-FINAL-DESTINATION-DELIVERY header SHALL have a value of “true”. A Direct HISP MUST conform to Implementation Guide for Delivery Notification in Direct v1.0 to implement the necessary tracking mechanisms.

The client and server both use interceptor configuration to install the WS-RM interceptors, comprising logical interceptors (RMInInterceptor/RMOutInterceptor) responsible for managing the reliability properties of the current message.

Server Side The Apache CXF Server setup constitutes the following: • Java Webservice classes• Annotations for Interceptors• Annotations for the Policy• Annotations for Addressing

• Java Server Class• Endpoint definitions• JAXB configuration• Interceptor Logging

• Custom Interceptors• In / Out and Fault• Message Handlers• Soap header message handler

• Resources• Policy• WSDL

Messages coming and leaving the Server are packaged and tracked using the CXF Interceptors and their respective phases, within the interceptor chain. Interceptors are used with both CXF clients and CXF servers. When a CXF client invokes a CXF server, there is an outgoing interceptor chain for the client and an incoming chain for the server. When the server sends the response back to the client, there is an outgoing chain for the server and an incoming one for the client. Additionally, in the case of SOAPFaults, a CXF web service will create a separate outbound error handling chain and the client will create an inbound error handling chain.

�4

Page 5: WSRM_WriteUp

Interceptors The main four Interceptors (the OutInterceptors, InInterceptors and both FaultInterceptors) reliably assure that all messages are handled correctly and in the order specified, in accordance to their respective phase order. Customizing the Interceptors, avails the server to manage specific tasks either prior or post message sending/receiving and in addition to the default Interceptors processes. Handling the messages, including sending and reading headers / content, are all invoked and processed by the AbstractPhaseInterceptor <SoapMessage> class extension. In addition, the specified phases in the constructor manages the process within the chain of Interceptors.An example of the custom PhaseInInterceptor:

public class PhaseInInterceptor extends AbstractPhaseInterceptor<SoapMessage> { public PhaseInInterceptor(){ super(Phase.INVOKE); //Invocation of the service Phase.READ.contains(getId()); Phase.RECEIVE.contains(getPhase()); } public void handleMessage(SoapMessage msg) throws Fault { String contentType = (String) msg.get(Message.CONTENT_TYPE); msg.getInterceptorChain(); msg.getDestination().getAddress(); msg.getHeaders(); if (contentType != null && contentType.toLowerCase().indexOf("multipart/related") != -1) { AttachmentDeserializer ad = new AttachmentDeserializer(msg); try { ad.initializeAttachments(); } catch (IOException e) { throw new Fault(e); } } } }

For the customization of the outgoing message headers, in response to the client’s request, the custom PhaseOutInterceptor class extends the SoapActionOutInterceptor class, as is dictated in the requirements for the HISP to HISP communication. The marshal phase of this Interceptor specifies the custom header back to the client. Note that the constructor assures that this process happens before the final PhaseOutInterceptor send phase is invoked.

public SoapActionOutInterceptor(String msg){ super(Phase.MARSHAL); addBefore(PhaseOutInterceptor.class.getName()); } public void handleMessage(SoapMessage msg) throws SoapFault {

//Creating HTTP headers MultivaluedMap<String, Object> headers = new MetadataMap<String, Object>(); headers.putSingle("X-DIRECT-DELIVER-PROCESSED-MDN", "true"); msg.put(SoapMessage.PROTOCOL_HEADERS, headers);

if (!(msg == msg.getExchange().getInMessage())) { setSoapAction(msg);

�5

Page 6: WSRM_WriteUp

Finally, the PhaseOutInterceptor’s constructor and handle message manages the final send phase of the SOAP message.

public PhaseOutInterceptor(){ super(Phase.SEND); //Sends the message and closes the transport stream. addAfter(SoapActionOutInterceptor.class.getName()); }

Resources A Policy XML file containing the RMAssertions and the required URI’s provide the needed support to create and terminate the communication sequences, as well as define the allotted time frame of retransmission, duplication and error handling.A Policy with an RMAssertion element is attached to the wsdl:service element (or any other wsdl element that according to the rules for WS-Policy Attachment is an attachment point for Policy or PolicyReference elements).The CXF WS-Policy Framework is enabled via the Annotations in the implementation class as:

@Policy(uri="resources/policy.xml", includeInWSDL=true) the RM interceptors will be automatically added to their respective interceptor chains by the policy framework. The assertion attributes control the behavior of the source/destination.The Policy:

<wsp:Policy xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:wsp="http://schemas.xmlsoap.org/ws/2005/02/policy" xmlns:beapolicy="http://www.bea.com/wsrm/policy">

<wsp:ExactlyOne> <wsp:All> <wsrmp10:RMAssertion xmlns:wsrmp10="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"> <wsrmp10:InactivityTimeout Milliseconds="600000"/> <wsrmp10:BaseRetransmissionInterval Milliseconds="6000"/> <wsrmp10:ExponentialBackoff/> <wsrmp10:AcknowledgementInterval Milliseconds="200"/> </wsrmp10:RMAssertion> </wsp:All> <wsp:All> <wsp:IncludeTimestamp /> <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm">

<wsrmp:InactivityTimeout Milliseconds="600000" /><wsrmp:BaseRetransmissionInterval Milliseconds="3000" /><wsrmp:ExponentialBackoff /><wsrmp:AcknowledgementInterval Milliseconds="200" /><beapolicy:QOS QOS="ExactlyOnce InOrder" /></wsrmp:RMAssertion>

</wsp:All> </wsp:ExactlyOne></wsp:Policy>

The Policy framework attributes describe the processes, configure additional parameters such as sequence creation and termination and contribute to the persistence. Note the deliveryAssurance, and Assertion attributes of timeout, retransmission and acknowledgement.

�6

Page 7: WSRM_WriteUp

The WSDL:Upon starting the server, the client can point their browser to the associated address to consume the WSDL of the service. This produces the boilerplate template for the requirements of services expected to communicate with the server. Note the output towards the end of the WSDL as to the exact match of the Policy that is invoked from the resource via the implementation class.Example of the WSDL:

This XML file does not appear to have any style information associated with it. The document tree is shown below. <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp="http://schemas.xmlsoap.org/ws/2005/02/policy" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="urn:gov:hhs:onc:hpdplus:2013" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="HpdPlusProviderInformationDirectoryImplService" targetNamespace="urn:gov:hhs:onc:hpdplus:2013"> <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:oasis:names:tc:DSML:2:0:core" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:DSML:2:0:core" version="1.0"> <xs:element name="batchRequest" type="tns:BatchRequest"/> <xs:element name="batchResponse" type="tns:BatchResponse"/> <xs:complexType name="BatchRequest"> <xs:sequence> <xs:element minOccurs="0" name="authRequest" type="tns:AuthRequest"/> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:element name="searchRequest" type="tns:SearchRequest"/> <xs:element name="modifyRequest" type="tns:ModifyRequest"/> <xs:element name="addRequest" type="tns:AddRequest"/> <xs:element name="delRequest" type="tns:DelRequest"/> <xs:element name="modDNRequest" type="tns:ModifyDNRequest"/> <xs:element name="compareRequest" type="tns:CompareRequest"/> <xs:element name="abandonRequest" type="tns:AbandonRequest"/> <xs:element name="extendedRequest" type="tns:ExtendedRequest"/> </xs:choice> </xs:sequence> <xs:attribute name="requestID" type="xs:string"/> <xs:attribute name="processing" type="xs:string"/> <xs:attribute name="responseOrder" type="xs:string"/> <xs:attribute name="onError" type="xs:string"/> </xs:complexType> <xs:complexType name="AuthRequest"> <xs:complexContent> <xs:extension base="tns:DsmlMessage"> <xs:sequence/> <xs:attribute name="principal" type="xs:string" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="DsmlMessage"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="control" nillable="true" type="tns:Control"/> </xs:sequence> <xs:attribute name="requestID" type="xs:string"/> </xs:complexType> <xs:complexType name="Control"> <xs:sequence> <xs:element minOccurs="0" name="controlValue" type="xs:anyType"/>

�7

Page 8: WSRM_WriteUp

</xs:sequence> <xs:complexType name="FilterSet"> <xs:sequence> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:element name="greaterOrEqual" type="tns:AttributeValueAssertion"/> <xs:element name="equalityMatch" type="tns:AttributeValueAssertion"/> <xs:element name="or" type="tns:FilterSet"/> <xs:element name="not" type="tns:Filter"/> <xs:element name="and" type="tns:FilterSet"/> <xs:element name="lessOrEqual" type="tns:AttributeValueAssertion"/> <xs:element name="extensibleMatch" type="tns:MatchingRuleAssertion"/> <xs:element name="substrings" type="tns:SubstringFilter"/> <xs:element name="approxMatch" type="tns:AttributeValueAssertion"/> <xs:element name="present" type="tns:AttributeDescription"/> </xs:choice> </xs:sequence> </xs:complexType> <xs:complexType name="AttributeValueAssertion"> <xs:sequence> <xs:element name="value" type="xs:string"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="AttributeDescription"> <xs:sequence/> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="MatchingRuleAssertion"> <xs:sequence> <xs:element name="value" type="xs:string"/> </xs:sequence> <xs:attribute name="dnAttributes" type="xs:boolean"/> <xs:attribute name="matchingRule" type="xs:string"/> <xs:attribute name="name" type="xs:string"/> </xs:complexType> <xs:complexType name="ExtendedRequest"> <xs:complexContent> <xs:extension base="tns:DsmlMessage"> <xs:sequence> <xs:element name="requestName" type="xs:string"/> <xs:element minOccurs="0" name="requestValue" type="xs:anyType"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="AbandonRequest"> <xs:complexContent> <xs:extension base="tns:DsmlMessage"> <xs:sequence/> <xs:attribute name="abandonID" type="xs:string" use="required"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="DelRequest"> <xs:complexContent> <xs:extension base="tns:DsmlMessage"> <xs:sequence/> <xs:attribute name="dn" type="xs:string" use="required"/>

�8

Page 9: WSRM_WriteUp

</xs:extension> </xs:complexContent> </xs:complexType> <xs:simpleType name="LDAPResultCode"> <xs:restriction base="xs:string"> <xs:enumeration value="success"/> <xs:enumeration value="operationsError"/> <xs:enumeration value="protocolError"/> <xs:enumeration value="timeLimitExceeded"/> <xs:enumeration value="sizeLimitExceeded"/> <xs:enumeration value="compareFalse"/> <xs:enumeration value="compareTrue"/> <xs:enumeration value="authMethodNotSupported"/> <xs:enumeration value="strongAuthRequired"/> <xs:enumeration value="referral"/> <xs:enumeration value="adminLimitExceeded"/> <xs:enumeration value="unavailableCriticalExtension"/> <xs:enumeration value="confidentialityRequired"/> <xs:enumeration value="saslBindInProgress"/> <xs:enumeration value="noSuchAttribute"/> <xs:enumeration value="undefinedAttributeType"/> <xs:enumeration value="inappropriateMatching"/> <xs:enumeration value="constraintViolation"/> <xs:enumeration value="attributeOrValueExists"/> <xs:enumeration value="invalidAttributeSyntax"/> <xs:enumeration value="noSuchObject"/> <xs:enumeration value="aliasProblem"/> <xs:enumeration value="invalidDNSyntax"/> <xs:enumeration value="aliasDerefencingProblem"/> <xs:enumeration value="inappropriateAuthentication"/> <xs:enumeration value="invalidCredentials"/> <xs:enumeration value="insufficientAccessRights"/> <xs:enumeration value="busy"/> <xs:enumeration value="unavailable"/> <xs:enumeration value="unwillingToPerform"/> <xs:enumeration value="loopDetect"/> <xs:enumeration value="namingViolation"/> <xs:enumeration value="objectClassViolation"/> <xs:enumeration value="notAllowedOnNonLeaf"/> <xs:enumeration value="notAllowedOnRDN"/> <xs:enumeration value="entryAlreadyExists"/> <xs:enumeration value="objectClassModsProhibited"/> <xs:enumeration value="affectMultipleDSAs"/> <xs:enumeration value="other"/> </xs:restriction> </xs:simpleType> </xs:schema> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:gov:hhs:onc:hpdplus:2013" xmlns:ns1="urn:oasis:names:tc:DSML:2:0:core" elementFormDefault="qualified" targetNamespace="urn:gov:hhs:onc:hpdplus:2013" version="1.0"> <xs:import namespace="urn:oasis:names:tc:DSML:2:0:core"/> <xs:element name="hpdPlusRequest" type="tns:HpdPlusRequest"/> <xs:element name="hpdPlusResponse" type="tns:HpdPlusResponse"/> <xs:complexType name="HpdPlusRequest"> <xs:sequence> <xs:element minOccurs="0" name="requestMetadata" type="tns:HpdPlusRequestMetadata"/> <xs:element minOccurs="0" name="batchRequest" type="ns1:BatchRequest"/> </xs:sequence>

�9

Page 10: WSRM_WriteUp

<xs:attribute name="directoryID" type="xs:string"/> <xs:attribute name="requestID" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="HpdPlusRequestMetadata"> <xs:complexContent> <xs:extension base="tns:HpdPlusMetadata"> <xs:sequence/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType abstract="true" name="HpdPlusMetadata"> <xs:sequence> <xs:element minOccurs="0" name="properties" type="tns:HpdPlusMetadataProperties"/> </xs:sequence> </xs:complexType> <xs:complexType name="HpdPlusMetadataProperties"> <xs:sequence> <xs:element maxOccurs="unbounded" minOccurs="0" name="property" nillable="true" type="tns:HpdPlusMetadataProperty"/> </xs:sequence> </xs:complexType> <xs:complexType name="HpdPlusMetadataProperty"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="tns:HpdPlusMetadataPropertyName" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:complexType name="HpdPlusResponseMetadata"> <xs:complexContent> <xs:extension base="tns:HpdPlusMetadata"> <xs:sequence> <xs:element minOccurs="0" name="requestMetadata" type="tns:HpdPlusRequestMetadata"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="HpdPlusResponse"> <xs:sequence> <xs:element minOccurs="0" name="responseMetadata" type="tns:HpdPlusResponseMetadata"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="hpdPlusError" nillable="true" type="tns:HpdPlusError"/> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:element ref="ns1:batchResponse"/> <xs:element name="hpdPlusResponse" type="tns:HpdPlusResponse"/> </xs:choice> </xs:sequence> <xs:attribute name="directoryID" type="xs:string" use="required"/> <xs:attribute name="requestID" type="xs:string" use="required"/> <xs:attribute name="directoryUri" type="xs:anyURI"/> </xs:complexType> <xs:complexType name="HpdPlusError"> <xs:sequence> <xs:element minOccurs="0" name="message" type="xs:token"/> <xs:element minOccurs="0" name="detail" type="tns:HpdPlusErrorDetail"/> </xs:sequence> <xs:attribute name="directoryID" type="xs:string" use="required"/> <xs:attribute name="requestID" type="xs:string" use="required"/>

�10

Page 11: WSRM_WriteUp

<xs:attribute name="type" type="tns:HpdPlusErrorType"/> </xs:complexType> <xs:complexType name="HpdPlusErrorDetail"> <xs:sequence> <xs:any namespace="##other" processContents="lax"/> </xs:sequence> </xs:complexType> <xs:simpleType name="HpdPlusMetadataPropertyName"> <xs:restriction base="xs:string"> <xs:enumeration value="doNotFederate"/> <xs:enumeration value="flattenResponse"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="HpdPlusErrorType"> <xs:restriction base="xs:string"> <xs:enumeration value="notAttempted"/> <xs:enumeration value="couldNotConnect"/> <xs:enumeration value="connectionClosed"/> <xs:enumeration value="malformedRequest"/> <xs:enumeration value="gatewayInternalError"/> <xs:enumeration value="authenticationFailed"/> <xs:enumeration value="unresolvableURI"/> <xs:enumeration value="other"/> <xs:enumeration value="duplicateRequestId"/> <xs:enumeration value="organizationalQueryRulesViolation"/> </xs:restriction> </xs:simpleType> </xs:schema> </wsdl:types> <wsdl:message name="Hpd_Plus_ProviderInformationQueryRequestResponse"> <wsdl:part element="tns:hpdPlusResponse" name="queryResponse"></wsdl:part> </wsdl:message> <wsdl:message name="Hpd_Plus_ProviderInformationQueryRequest"> <wsdl:part element="tns:hpdPlusRequest" name="queryRequest"></wsdl:part> </wsdl:message> <wsdl:portType name="HpdPlusProviderInformationDirectoryImpl"> <wsdl:operation name="Hpd_Plus_ProviderInformationQueryRequest"> <wsdl:input message="tns:Hpd_Plus_ProviderInformationQueryRequest" name="Hpd_Plus_ProviderInformationQueryRequest" wsam:Action="urn:gov:hhs:onc:hpdplus:2013:Hpd_Plus_ProviderInformationQueryRequest" wsaw:Action="urn:gov:hhs:onc:hpdplus:2013:Hpd_Plus_ProviderInformationQueryRequest"></wsdl:input> <wsdl:output message="tns:Hpd_Plus_ProviderInformationQueryRequestResponse" name="Hpd_Plus_ProviderInformationQueryRequestResponse" wsam:Action="urn:gov:hhs:onc:hpdplus:2013:HpdPlusProviderInformationDirectoryImpl:Hpd_Plus_ProviderInformationQueryRequestResponse" wsaw:Action="urn:gov:hhs:onc:hpdplus:2013:HpdPlusProviderInformationDirectoryImpl:Hpd_Plus_ProviderInformationQueryRequestResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="HpdPlusProviderInformationDirectoryImplServiceSoapBinding" type="tns:HpdPlusProviderInformationDirectoryImpl"> <soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsaw:UsingAddressing wsdl:required="true"/> <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="#HpdPlusProviderInformationDirectoryImplServiceSoapBinding_WSAM_Addressing_Policy"/> <wsp:PolicyReference URI="#HpdPlusProviderInformationDirectoryImplServiceSoapBindingBindingPolicy"/> <wsdl:operation name="Hpd_Plus_ProviderInformationQueryRequest">

�11

Page 12: WSRM_WriteUp

<soap12:operation soapAction="urn:gov:hhs:onc:hpdplus:2013:Hpd_Plus_ProviderInformationQueryRequest" style="document"/> <wsdl:input name="Hpd_Plus_ProviderInformationQueryRequest"> <soap12:body use="literal"/> </wsdl:input> <wsdl:output name="Hpd_Plus_ProviderInformationQueryRequestResponse"> <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="HpdPlusProviderInformationDirectoryImplService"> <wsdl:port binding="tns:HpdPlusProviderInformationDirectoryImplServiceSoapBinding" name="HpdPlusProviderInformationDirectoryImplPort"> <soap12:address location="http://127.0.0.1:8661/pdti-server/Hpd_Plus_ProviderInformationDirectoryService"/> </wsdl:port> <wsp:PolicyReference URI="#HpdPlusProviderInformationDirectoryImplServiceServicePolicy"/> <wsp:PolicyReference URI="#HpdPlusProviderInformationDirectoryImplServiceServicePolicy"/> </wsdl:service> <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" wsu:Id="HpdPlusProviderInformationDirectoryImplServiceSoapBinding_WSAM_Addressing_Policy"> <wsam:Addressing> <wsp:Policy/> </wsam:Addressing> </wsp:Policy> <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:wsp="http://schemas.xmlsoap.org/ws/2005/02/policy" xmlns:beapolicy="http://www.bea.com/wsrm/policy" wsu:Id="HpdPlusProviderInformationDirectoryImplServiceSoapBindingBindingPolicy"> <wsp:ExactlyOne> <wsp:All> <wsrmp10:RMAssertion xmlns:wsrmp10="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"> <wsrmp10:InactivityTimeout Milliseconds="600000"/> <wsrmp10:BaseRetransmissionInterval Milliseconds="6000"/> <wsrmp10:ExponentialBackoff/> <wsrmp10:AcknowledgementInterval Milliseconds="200"/> </wsrmp10:RMAssertion> </wsp:All> <wsp:All> <wsp:IncludeTimestamp/> <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm"> <wsrmp:InactivityTimeout Milliseconds="600000"/> <wsrmp:BaseRetransmissionInterval Milliseconds="3000"/> <wsrmp:ExponentialBackoff/> <wsrmp:AcknowledgementInterval Milliseconds="200"/> <beapolicy:QOS QOS="ExactlyOnce InOrder"/> </wsrmp:RMAssertion> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> <wsp:Policy xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:wsp="http://schemas.xmlsoap.org/ws/2005/02/policy" xmlns:beapolicy="http://www.bea.com/wsrm/policy" wsu:Id="HpdPlusProviderInformationDirectoryImplServiceServicePolicy"> <wsp:ExactlyOne> <wsp:All> <wsrmp10:RMAssertion xmlns:wsrmp10="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">

�12

Page 13: WSRM_WriteUp

<wsrmp10:InactivityTimeout Milliseconds="600000"/> <wsrmp10:BaseRetransmissionInterval Milliseconds="6000"/> <wsrmp10:ExponentialBackoff/> <wsrmp10:AcknowledgementInterval Milliseconds="200"/> </wsrmp10:RMAssertion> </wsp:All> <wsp:All> <wsp:IncludeTimestamp/> <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm"> <wsrmp:InactivityTimeout Milliseconds="600000"/> <wsrmp:BaseRetransmissionInterval Milliseconds="3000"/> <wsrmp:ExponentialBackoff/> <wsrmp:AcknowledgementInterval Milliseconds="200"/> <beapolicy:QOS QOS="ExactlyOnce InOrder"/> </wsrmp:RMAssertion> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> </wsdl:definitions>

Running the WSDL will also result in a console output as follows (if logging is enabled):INFO: Inbound Message----------------------------ID: 1Address: http://127.0.0.1:8661/pdti-server/Hpd_Plus_ProviderInformationDirectoryService?wsdlHttp-Method: GETContent-Type: Headers: {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8], accept-encoding=[gzip,deflate,lzma,sdch], Accept-Language=[en-US,en;q=0.8], Cache-Control=[max-age=0], connection=[keep-alive], Content-Type=[null], Host=[127.0.0.1:8661], User-Agent=[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 OPR/22.0.1471.50]}--------------------------------------

Client Side To test the communication process between the Server and Client and assure that the respective headers and messages are being utilized appropriately and all errors handled in the appropriate Interceptor Chains, the use of the software SOAPUI as well as constructing a separate client service via the WSDL stub was extensively used and tested.

SOAPUI:SOAPUI provides a convenient client testing environment and provides several conveniences in assuring that WS-RM and WS-A are addressed, as well as the version control of the WS-RM. Using the SOAP Envelop XML query, one has to select both the WS-RM and WS-A settings to assure that the WS-Reliable Messaging is advocated (see Appendix A for images and explanation).Java Client:Creating the Java Client side was managed by using the WSDL stub output compilation. This created the necessary classes and packages needed to support the web services for the client. In addition, one needed to include the policy.xml file, and a client class. To read back the header, the client has to implement the Java utility of Map<String, Object> responseContext and JAXB marshal to assure the headers can be read successfully.

�13

Page 14: WSRM_WriteUp

LoggingOutInterceptor used on both the client- and server-side to log the outbound SOAP messages and display these to the console.

Appendix A: SOAPUI response view with images Using the WSDL output one can create a Soap Envelope request for sending a query to the LDAP. Assuring that the WS-A and the WS-RM properties are checked to adhere to the Server’s requested component for a secure exchange via Reliable Messaging. The process and result are visualized in the images below. Note the customized header that is invoked via the customized OutInterceptors within the code.

�14

Page 15: WSRM_WriteUp

�15

Page 16: WSRM_WriteUp

Client in Java response view with images

Definitions

WS-ReliableMessaging—A protocol that allows messages to be delivered reliably between distributed applications in the presence of software component, system, or network failures.

WS-Addressing—A framework to identify Web service endpoints and to ensure end-to-end endpoint identification in messages.

WSDL—A set of constructs to specify Web service interfaces and bindings for endpoints.WS-Policy—A base set of constructs that can be used and extended by other Web services specifications to describe a broad range of requirements, preferences, and capabilities of service interfaces.

WS-Transactions and WS-Coordination—A set of Web service interface definitions and protocols that support participant control and agreement on the outcome of distributed, multi-party interactions.

WS-EndpointResolution—A set of Web service mechanisms that support selecting a specific endpoint for an operation or message from a set of allowed candidates. This is particularly useful in server farms and mobile environments.

�16

Page 17: WSRM_WriteUp

WS-MetadataExchange—A set of Web service mechanisms to exchange policies, WSDL and potentially other metadata between two or more parties.

The WS-Security Roadmap protocols—In April 2002, IBM and Microsoft published a roadmap for Web service security [WS-Security Roadmap] that supports, integrates and unifies several popular security models, mechanisms, and technologies.

WS-TransmissionControl—A set of constructs for controlling the exchange of messages between services to improve reliability by preventing message loss due to service unavailability, overloading queues and other causes.

�17