Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Transport Standard (DTS)

Similar presentations


Presentation on theme: "Data Transport Standard (DTS)"— Presentation transcript:

1 Data Transport Standard (DTS)
Nathan Chitty - Nelnet Mark Malinoski - AES

2 Outline Overview and Foundation Progress DTS Reference Implementation
Service Client Headers Examples Error Handling SOAP

3 Data Transport Standard
Task - Create a written specification for real-time exchange of data between organizations. Meets the business requirements Standards based Supports standard technologies (Java, .Net) Payload insensitive Secure Reliable

4 Opportunity Define an industry standard
Real-time implies using the world wide web Data transport on the web implies Web Service Meteor is already providing real-time transfer of data Add value to existing processes Create new processes to support other industry initiatives CR:C College Academic Transcript COD Future

5 Standards/Best Practices
Global XML Architecture (GXA) WSDL (Web Service Definition Language) SOAP (Simple Object Access Protocol) WS-I (Web Service Interoperability) WS-S (Web Service Security) XML Signature, x509 Certificates SAML (Security Assertion Markup Language) Payload compression and encoding

6 Milestones July 2004 Sept 2004 March 2005
Solved .Net to Java Interoperability SOAP Headers (Client to Server) Sept 2004 Solved .Net to Java Interoperability SOAP Headers (Server to Client) Finalized Core WSDL Finalized Core exception handling March 2005 Digitally signed and verified payload

7 How are we doing it? Conference calls 2 times a week
Periodic face to face meetings Using reference implementations in JAVA and .NET to: Assist the work group with steps needed to write the specification Helps to identify proven industry tools

8 What’s left to do? Reference Implementations
Get digital signatures into WS-S specification Create the application level interfaces from DTS Specification Documentation

9 Creating a Service Create the WSDL Creating Stubs Deploying Service

10 Create the WSDL Use your favorite WSDL tool. XML Spy See example WSDL

11 Creating Java Stubs (Service)
Axis 1.1 ToolKit java org.apache.axis.wsdl.WSDL2Java --skeletonDeploy false <wsdlfile> Files Created <service>_Port.java <service>_Impl.java (Code Augmentation Goes Here)

12 Creating Java Stubs (Client)
Axis 1.1 ToolKit java org.apache.axis.wsdl.WSDL2Java <wsdlfile> Files Created <service>_ServiceLocator.java <service>_Service.java <service>_Port.java <service>_BindingStub.java (Code Augmentation Goes Here)

13 Creating .Net Stubs Microsoft .Net Framework wsdl.exe Service Client
Command line: wsdl.exe /server filename.wsdl Output: service.cs Client Command line: wsdl.exe filename.wsdl Output: client.cs Alternative is to add Web Reference to client application pointing to wsdl file or running service This will create C# files containing abstract class stubs

14 Deploying the Service in Java
Axis installed to Tomcat Tomcat needs to be running. java org.apache.axis.client.AdminClient lhttp://localhost:8080/axis/servlet/AxisServlet <service.wsdd>

15 Deploying the Service .Net
If service created in Visual Studio .Net IDE- No additional steps necessary after augmenting code created If service not created in VS .Net then must make the directory a web application via IIS service manager

16 Adding SOAP Headers Change WSDL Create Container Classes
Container Classes require serialization/de-serialization directives Augment Service code Augment Client code

17 Modifying the WSDL New Header Elements DTSRequestRouting
DTSResponseRouting DTSRequestServiceExpectation DTSRequestPayloadType DTSResponsePayloadType DTSResponseAcknowledge DTSRequestSignature DTSResponseSignature

18 Modifying the WSDL (DTSRequestRouting)
Add Elements to Types Declaration <s:element minOccurs="1" maxOccurs="1" name="DTSRequestRouting“ type="DTS:DTSRoutingElements"/> <s:element minOccurs="1" maxOccurs="1" name="DTSResponseRouting" type="DTS:DTSRoutingElements"/> <s:complexType name="DTSRoutingElements"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="DTSUUID" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="DTSTransmissionDateTime" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="DTSSourceID“ type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="DTSSourceSubCode“ type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="DTSRecipientID" type="s:string"/> <s:element minOccurs="0" maxOccurs="1" name="DTSRecipientSubCode" type="s:string"/> </s:sequence> </s:complexType>

19 Modifying the WSDL (Messages)
<message name="DTSHeaders"> <part name="DTSRequestRouting" element="DTS:DTSRequestRouting"/> <part name="DTSResponseRouting" element="DTS:DTSResponseRouting"/> <part name="DTSRequestServiceExpectation" element="DTS:DTSRequestServiceExpectation"/> <part name="DTSRequestPayloadType" element="DTS:DTSRequestPayloadType"/> <part name="DTSResponsePayloadType" element="DTS:DTSResponsePayloadType"/> <part name="DTSResponseAcknowledge" element="DTS:DTSResponseAcknowledge"/> <part name="DTSRequestSignature" element="DTS:DTSRequestSignature"/> <part name="DTSResponseSignature" element="DTS:DTSResponseSignature"/> </message>

20 Modifying the WSDL (Binding)
<input> <soap:body use="literal"/> <soap:header message="DTS:DTSHeaders" part="DTSRequestSignature“ use="literal"/> <soap:header message="DTS:DTSHeaders" part="DTSRequestRouting" use="literal"/> <soap:header message="DTS:DTSHeaders“ part="DTSRequestServiceExpectation“ use="literal"/> <soap:header message="DTS:DTSHeaders“ part="DTSRequestPayloadType" use="literal"/> </input> <output> <soap:header message="DTS:DTSHeaders“ part="DTSResponseSignature" use="literal"/> <soap:header message="DTS:DTSHeaders" part="DTSResponseRouting“ use="literal"/> <soap:header message="DTS:DTSHeaders“ part="DTSResponsePayloadType" use="literal"/> <soap:header message="DTS:DTSHeaders“ part="DTSResponseAcknowledge" use="literal"/> </output>

21 Java Creating the Container Classes for the Service (IN)
public String getRecipientID() { return recipientID; } public void setRecipientID(String newRecipientID) { recipientID = newRecipientID; } public String getRecipientIDCode() { return recipientIDCode; } public void setRecipientIDCode(String newRecipientIDCode) recipientIDCode = newRecipientIDCode; public String getUUID() { return uuid; } public void setUUID(String newUUID) uuid = newUUID; public String getTransmissionDateTime() return transmissionDateTime; public void setTransmissionDateTime(String newTransDateTime) transmissionDateTime = newTransDateTime; package com.datatransportstandard. import java.io.Serializable; public class DTSRequestRouting implements Serializable { private String sourceID = null; private String sourceIDCode = null; private String recipientID = null; private String recipientIDCode = null; private String uuid = null; private String transmissionDateTime = null; public String getSourceID() { return sourceID; } public void setSourceID(String newSourceID) sourceID = newSourceID; } public String getSourceIDCode() { return sourceIDCode; } public void setSourceIDCode(String newSourceIDCode) sourceIDCode = newSourceIDCode;

22 Java Creating the Container Classes for the Service (OUT)
public String getRecipientID() { return recipientID; } public void setRecipientID(String newRecipientID) { recipientID = newRecipientID; } public String getRecipientIDCode() { return recipientIDCode; } public void setRecipientIDCode(String newRecipientIDCode) recipientIDCode = newRecipientIDCode; public String getUUID() { return uuid; } public void setUUID(String newUUID) uuid = newUUID; public String getTransmissionDateTime() return transmissionDateTime; public void setTransmissionDateTime(String newTransDateTime) transmissionDateTime = newTransDateTime; package com.datatransportstandard. import java.io.Serializable; public class DTSResponseRouting implements Serializable { private String sourceID = null; private String sourceIDCode = null; private String recipientID = null; private String recipientIDCode = null; private String uuid = null; private String transmissionDateTime = null; public String getSourceID() { return sourceID; } public void setSourceID(String newSourceID) sourceID = newSourceID; } public String getSourceIDCode() { return sourceIDCode; } public void setSourceIDCode(String newSourceIDCode) sourceIDCode = newSourceIDCode;

23 Java Examples (Service)
Modify the WSDD <beanMapping languageSpecificType="java:com.datatransportstandard. qname="ns2:DTSRequestRouting" xmlns:ns2=" <beanMapping languageSpecificType="java:com.datatransportstandard. qname="ns3:DTSResponseRouting" xmlns:ns3=" Augment the Code (inbound) MessageContext ctx = MessageContext.getCurrentContext(); SOAPEnvelope requestEnv = ctx.getRequestMessage().getSOAPEnvelope(); SOAPHeaderElement requestHeader = requestEnv.getHeaderByName(" “DTSRequestRouting"); DTSRequestRouting incontainer = (DTSRequestRouting) requestHeader.getObjectValue(); System.out.println(“SourceId = “ + incontainer.getSourceId());

24 Java Examples (Service)
Augment the Code (outbound) DTSResponseRouting outcontainer = new DTSResponseRouting(); outcontainer.setSourceId(“TEST SOURCE ID”); outcontainer.setSourceIdType(“TEST SOURCE ID TYPE”); SOAPHeaderElement responseHeader = new SOAPHeaderElement(“ ,“DTSResponseRouting”) responseHeader.setObjectValue(outcontainer); SOAPEnvelope responseEnv = ctx.getResponseMessage().getSOAPEnvelope(); responseEnv.addHeader(responseHeader);

25 Java Examples (Client)
Augment the Code (General) QName qn = new QName(“ call.registerTypeMapping(DTSRequestRouting.class, qn, new BeanSerializerFactory(DTSRequestRouting.class, qn), new BeanDeserializerFactory(DTSRequestRouting.class, qn)); QName qn1 = new QName(“ call.registerTypeMapping(DTSResponseRouting.class, qn1, new BeanSerializerFactory(DTSResponseRouting.class, qn1), new BeanDeserializerFactory(DTSResponseRouting.class, qn1));

26 Java Examples (Client)
Augment the Code (outbound) DTSRequestRouting outcontainer = new DTSRequestRouting(); outcontainer.setSourceId(“TEST SOURCE ID”); outcontainer.setSourceIdType(“TEST SOURCE ID TYPE”); SOAPHeaderElement requestHeader = new SOAPHeaderElement(“ “DTSRequestRouting”); requestHeader.setObjectValue(outcontainer); call.addHeader(requestHeader);

27 Java Examples (Client)
Augment the Code (inbound) SOAPEnvelope responseEnv = call.getMessageContext().getResponseMessage().getSOAPEnvelope(); SOAPHeaderElement responseHeader = responseEnv.getHeaderByName(“ DTSResponseHeader incontainer = (DTSResponseHeader) responseHeader.getObjectValue(); System.out.println(“Source Id=“ + intcontainer.getSourceId());

28 .Net: Creating the Container classes for Service
[XmlTypeAttribute(Namespace=“ [XmlRootAttribute(ElementName=“DTSRequestRouting”, Namespace=“ IsNullable=false)] [XmlInclude(typeof(DTSRequestRouting))] public class DTSRequestRouting : System.Web.Services.Protocols.SoapHeader { public string UUID; public string transmissionDateTime; public string sourceID; public string sourceIDCode; public string recipientID; } [XmlRootAttribute(ElementName=“DTSResponseRouting”, Namespace=“ IsNullable=false)] [XmlInclude(typeof(DTSResponseRouting))] public class DTSResponseRoutingElements : System.Web.Services.Protocols.SoapHeader [XmlTypeAttribute(Namespace=“ public class DTSResponseRouting : DTSResponseRoutingElements{};

29 .Net: Augment the Service
Add declarations to service Class public DTSRequestRouting DTSRequestRoutingVal; public DTSResponseRoutingElements DTSResponseRoutingVal; public SoapUnknownHeader[] unknownHeaders; Add serialization directives to WebMethod() [SoapHeaderAttribute("DTSRequestRoutingVal")] [SoapHeaderAttribute("DTSResponseRoutingVal", Direction=SoapHeaderDirection.Out)] [SoapHeader("unknownHeaders")] Other Headers require the same type of declarations and directives.

30 .Net usage of Header example (Service)
[return: System.Xml.Serialization.XmlElementAttribute(Namespace=" public string submitDTS([XmlElementAttribute(Namespace=" string submitDTSRequest) { //pull out values from incoming headers string tempSourceID = DTSRequestRoutingVal.sourceID; //We create objects from the extended class for response header elements //and then assign them to the public variables to be sent back that are of the base container class type DTSResponseRouting returnRouting = new DTSResponseRouting(); //assign values to the local return headers returnRouting.sourceID = tempRecipID; //Set the objects to the public variables to be returned this.DTSResponseRoutingVal = returnRouting;

31 .Net: Creating the Container classes for Client
[XmlTypeAttribute(Namespace=" [XmlRootAttribute(ElementName="DTSRequestRouting",Namespace=" IsNullable=false)] [XmlInclude(typeof(DTSRequestRouting))] public class DTSRequestRoutingElements : System.Web.Services.Protocols.SoapHeader { public string UUID; public string transmissionDateTime; public string sourceID; public string sourceIDCode; public string recipientID; } public class DTSRequestRouting : DTSRequestRoutingElements{} [XmlIncludeAttribute(typeof(DTSResponseRouting))] [XmlRootAttribute("DTSResponseRouting", Namespace=" IsNullable=false)] public class DTSResponseRouting : System.Web.Services.Protocols.SoapHeader

32 .Net: Augment the Client
Add declarations to Client Web Reference/Proxy Class public DTSRequestRoutingElements DTSRequestRoutingVal; public DTSResponseRouting DTSResponseRoutingVal; Add serialization directives to WebMethod() [SoapHeaderAttribute("DTSRequestRoutingVal")] [SoapHeaderAttribute("DTSResponseRoutingVal", Direction=SoapHeaderDirection.Out)]

33 .Net Example (Client) //declare header
//this is the extended header class container DTS004.DTSRequestRouting sendRoutingElements = new DTS004.DTSRequestRouting(); //assign values for elements sendRoutingElements.sourceID = txtSrcID.Text; ... //Set local header object to proxy class request header variable mySvc.DTSRequestRoutingVal = sendRoutingElements; //retrieve elements of response header string returnedSourceID = DTS004.DTSResponseRoutingVal.sourceID

34 Java Error Handling Java .Net Pre/Post Handlers can be defined in WSDD
Can be put in main service code .Net Put in the main service code (at this time)

35 Creating a Handler Class (Java)
package com.example.handlers; import org.apache.axis.AxisFault; import org.apache.axis.MessageContext; import org.apache.axis.handlers.BasicHandler; public class HeaderHandler extends BasicHandler { public void invoke(MessageContext msgContext) throws AxisFault try // Do something here } catch(Exception e) AxisFault fault = new AxisFault(); fault.setFaultCodeAsString(“Exampe Fault Code”); fault.setFaultString(e.getMessage()); throw fault;

36 Invoking the Handler (Java)
Augment the service WSDD Define the Handler <handler name="HeaderHandler“ type="java:com.example.handlers.HeaderHandler"/> Put Handler in Service Request Flow <requestFlow> <handler type=“HeaderHandler"/> </requestFlow> Or the Service Response Flow <responseFlow> </responseFlow>

37 Handling/Throwing (.Net)
public string submitDTS([System.Xml.Serialization.XmlElementAttribute(Namespace=" string submitDTSRequest) { //store off values try //Do something } catch (SoapException) throw; catch(Exception e) string message = e.ToString(); XmlQualifiedName internalErrorName = new XmlQualifiedName("Internal Error", " SoapException internalErrorException = new SoapException(message, internalErrorName); throw internalErrorException;

38 The SOAP SOAP across the wire is of primary importance
Element Names Type attribute Not necessarily the namespace moniker How it got there is of less importance

39 DTS SOAP (Java Request)
<soapenv:Envelope xmlns:soapenv=" xmlns:xsd=" xmlns:xsi=" <soapenv:Header> <ns1:DTSRequestSignature soapenv:mustUnderstand="0" xsi:type="ns1:DTSRequestSignature" xmlns:ns1=" <ns1:value>SignatureValue</ns1:value> </ns1:DTSRequestSignature> <ns2:DTSRequestRouting soapenv:mustUnderstand="0" xsi:type="ns2:DTSRequestRouting" xmlns:ns2=" <ns2:UUID>12345</ns2:UUID> <ns2:recipientID>NelNet</ns2:recipientID> <ns2:recipientIDCode>2222</ns2:recipientIDCode> <ns2:sourceID>AES</ns2:sourceID> <ns2:sourceIDCode>1111</ns2:sourceIDCode> <ns2:transmissionDateTime>04/22/ :13:17.699 </ns2:transmissionDateTime> </ns2:DTSRequestRouting> <ns3:DTSRequestServiceExpectation soapenv:mustUnderstand="0" xsi:type="ns3:DTSRequestServiceExpectation" xmlns:ns3=" <ns3:value>Immediate</ns3:value> </ns3:DTSRequestServiceExpectation> <ns4:DTSRequestPayloadCode soapenv:mustUnderstand="0" xsi:type="ns4:DTSRequestPayloadCode" xmlns:ns4=" <ns4:value>CRC</ns4:value> </ns4:DTSRequestPayloadCode> </soapenv:Header> <soapenv:Body> <submitDTSRequest xmlns=" </soapenv:Body> </soapenv:Envelope>

40 DTS SOAP (.Net Request) <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=" xmlns:xsi=" xmlns:xsd=" <soap:Header> <DTSRequestPayloadCode xsi:type="DTSRequestPayloadCode" xmlns=" <value>CRC01Request</value> </DTSRequestPayloadCode> <DTSRequestRouting xsi:type="DTSRequestRouting" xmlns=" <UUID> </UUID> <transmissionDateTime>4/25/2005 2:06:47.484</transmissionDateTime> <sourceID>Nelnet</sourceID> <sourceIDCode>OECode</sourceIDCode> <recipientID>AES</recipientID> </DTSRequestRouting> <DTSRequestServiceExpectation xsi:type="DTSRequestServiceExpectation" xmlns=" <value>Immediate</value> </DTSRequestServiceExpectation> <DTSRequestSignature xsi:type="DTSRequestSignature" xmlns=" <value>SignatureValue</value> </DTSRequestSignature> </soap:Header> <soap:Body> <submitDTSRequest xmlns=" </soap:Body> </soap:Envelope>

41 Questions? Contact Information Nathan Chitty Software Architect - Nelnet Mark Malioski Technical Coordinator/Web Development – AES


Download ppt "Data Transport Standard (DTS)"

Similar presentations


Ads by Google