Download presentation
Presentation is loading. Please wait.
Published byDamian Parrish Modified over 9 years ago
1
©Centre for Development of Advanced Computing http://nsdg.gov.in SSDG Connector s in.Net
2
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Application Specific SP Generic Application Specific
3
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connectors
4
©Centre for Development of Advanced Computing http://nsdg.gov.in Generic SAP API SubmitRequest() - This function should be used for making initial request to SSDG for availing a service. DocumentPoll() – This function is used to check the status of the request which has been submitted through asynchronous mode. DocumentDelete() –This function is used to delete the request and response which have already been fulfilled successfully. DocumentList() – It helps in getting the status of all the requests submitted to SSDG during a particular period. Note: Only SubmitRequest() is used for Synchronous as well as asynchronous Requests while all the other functions will use Synchronous based requests only.
5
©Centre for Development of Advanced Computing http://nsdg.gov.in Generic Responses Success Status –Actual Response Failed Status Resubmit
6
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : ClassValue Data Type : String Mandatory : YES (for all functions) Description :Service ID of the service registered at gateway.
7
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name :TransactionId Data Type : String Mandatory : Optional (Depends on the SAP Application Specific Connector) Description :Used by the SAP application to club multiple Submit Request into single transaction.
8
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : BodyContent Data Type : XMLElement[ ] Mandatory : YES (for SubmitRequest() ) Description : Payload or body content. SAP and SP must adhere to the schema of payload.
9
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : CorrelationID Data Type : String (32 bit character value) Mandatory : YES (for functions DocumentPoll(), DocumentDelete() ) Description : Unique identifier of the message received from gateway.
10
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : ResponseMode Data Type : Enum Mandatory : YES (for all functions) Description :Response mode specifies the type of communication needed by Service. ASYNCHRONOUS SYNCHRONOUS
11
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : SenderID Data Type : String Mandatory : YES(for SubmitRequest() and DocumentList() methods only) Description :User Id of SAP for authentication at gateway.
12
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name :Password Data Type : String Mandatory : YES (Required in SubmitRequest() and DocumentList() methods only) Description :Password to authenticate SAP.
13
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name :TargetEndpoint Data Type : String Mandatory : YES (for all functions) Description :URL of the Gateway.
14
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : AuthMode Data Type : Enum Mandatory : YES ( Required in SubmitRequest() and DocumentList() methods only. ) Description : Indicates how the SAP will be authenticated to gateway. There are three types of Authentication Modes Clear -AuthMode.Clear SHA-1-AuthMode.SHA1; W3C signed-AuthMode.W3CSigned
15
©Centre for Development of Advanced Computing http://nsdg.gov.in SAP Generic Connector Elements Element Name : Signed Authentication Data Type : Enum Mandatory : Optional Description : Indicates whether the payload should be signed or not. False –indicates payload should not be signed. True-SAP will sign payload and signature verification of payload should be done by SP.
16
©Centre for Development of Advanced Computing http://nsdg.gov.in Sequences
17
©Centre for Development of Advanced Computing http://nsdg.gov.in Synchronous Submit Request from SAP to SP
18
©Centre for Development of Advanced Computing http://nsdg.gov.in Synchronous Submit Request from SAP SAP (portal) Gateway SP( Back off ) synSubmitRequest() Synchronous Response Synchronous Response SubmitRequest() ConnectorInterface inter = new ConnectorInterface ( ); //Optional Field set by Client inter.TransactionId = "12345678912345678912345678912345"; inter.CorrelationID = ""; //Type of Service Requested i.e. Synchronous inter.ResponseMode = ResponseMode.Synchronous; //Valid Service Class inter.ClassValue = "http://127.0.0.1/22"; //Address of SSDG inter.TargetEndPoint="http://nsdg.staging.cdacmumbai.in/gatew ay/services/NSDGService"; //Authentication Details received after registration of SAP inter.AuthMode = AuthMode.Clear; inter.SenderID = "SAP130720081454"; inter.Password = "[B@13a87a0"; XmlElement[] body =Body received from SAP Application Specific Connector ; inter.BodyContent = body; //Calling of SSDG through Generic Connector API ConnectorInterface.SubmitRequest(ref inter);
19
©Centre for Development of Advanced Computing http://nsdg.gov.in Synchronous Response for Synchronous submit request Gateway SP Generic Connector SP Application Specific Connector synSubmitRequest() Sending Submit Response public void synSubmitRequest ( ref SPInterface interfaceSP ) { //Retrieving the Values received from SAP through SSDG XmlElement[] bodyArr = new XmlElement[1]; bodyArr = interfaceSP.Body; //Processing of Body is done by SP application Specific Connector //Business logic of body processing will come here interfaceSP.Body[0] = bodyArr[0]; interfaceSP.SubmissionStatus = "response"; } { //If the content received in the body is incorrect. Also set the body as per schema of Error giving the reason for the error. setProperties.SubmissionStatus = "error"; } SubmitRequest()
20
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in Submit Response send to SAP SAP (portal) Gateway SP( Back off ) synSubmitRequest() Synchronous Response /Error SubmitRequest()
21
©Centre for Development of Advanced Computing http://nsdg.gov.in Submit Response SAP (portal) Gateway Synchronous Response //If Status is error string errorCode = inter.ErrorCode; string[] errorList=new string[1]; XmlElement[] bodyArr = new XmlElement[1]; errorList = inter.ErrorList; string error=null; if ( errorList != null ) { error = errorList [ 0 ]; } //Receiving Result string status= inter.SubmissionStatus; //if status is response string corrID=inter.CorrelationID; string classID = inter.ClassValue;
22
©Centre for Development of Advanced Computing http://nsdg.gov.in Synchronous SUBMIT_REQUEST SAP (portal) GatewaySP( Back off ) Synchronous Submit Request Synchronous Response Synchronous Submit Request
23
©Centre for Development of Advanced Computing http://nsdg.gov.in ASynchronous Submit Request from SAP to SP
24
©Centre for Development of Advanced Computing http://nsdg.gov.in Asynchronous Submit Request from SAP SAP (portal) Gateway SP( Back off ) asynSubmitRequest() Submit Acknowledgement/ ErrorSubmit Acknowledgement/ Error SubmitRequest() ConnectorInterface inter = new ConnectorInterface ( ); //Optional Field set by Client inter.TransactionId = "12345678912345678912345678912345"; inter.CorrelationID = ""; //Type of Service Requested i.e. Asynchronous inter.ResponseMode = ResponseMode.ASynchronous; //Valid Service Class inter.ClassValue = "http://127.0.0.1/22"; //Address of SSDG inter.TargetEndPoint="http://nsdg.staging.cdacmumbai.in/gatew ay/services/NSDGService"; //Authentication Details received after registration of SAP inter.AuthMode = AuthMode.Clear; inter.SenderID = "SAP130720081454"; inter.Password = "[B@13a87a0"; XmlElement[] body =Body received from SAP Application Specific Connector; inter.BodyContent = body; //Calling of SSDG through Generic Connector API ConnectorInterface.SubmitRequest(ref inter);
25
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in Submit Acknowledgement send to SAP SAP (portal) Gateway SP( Back off ) asynSubmitRequest() Submit Acknowledgement/ Error SubmitRequest() string status= inter.SubmissionStatus; //if status is acknowledgement //Process the ConnectorInterface object string corrID=inter.CorrelationID; string classID = inter.ClassValue; string endPoint = inter.TargetEndPoint; //If Status is error string errorCode = inter.ErrorCode; string[] errorList=new string[1]; XmlElement[] bodyArr = new XmlElement[1]; errorList = inter.ErrorList; string error=null; if ( errorList != null ) { error = errorList [ 0 ]; }
26
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in Submit Poll from SAP SAP (portal) Gateway SP( Back off ) Document Poll Submit Response /Submit Acknowledgement Submit Response /Submit Acknowledgement DocumentPoll() ConnectorInterface inter = new ConnectorInterface ( ); inter.TransactionId = ""; //It should contain the value as received in Asynchronous SubmitRequest inter.CorrelationID = "34E17E40952F4EAEB37E7B1FD7BA67EF"; //Valid Service class inter.ClassValue = "http://127.0.0.1/22"; //End Point Url of the Gateway where DocumentPoll can be done inter.TargetEndPoint="http://nsdg.staging.cdacmumbai.in/gateway/services/NSDGServ ice"; inter.DocumentPoll ( ref inter )
27
©Centre for Development of Advanced Computing http://nsdg.gov.in Submit Response Component of SP SP Generic Connector SP Application Specific Connector public void SPResponse ( ref SPInterface interfaceSP ) { XmlElement[] bodyArr = new XmlElement[1]; interfaceSP.CorrelationID="Value stored in DB from asynchronous request"; interfaceSP.ClassValue=" Value stored in DB from asynchronous request "; interfaceSP.TargetEndPoint="Address of SSDG"; //Create response in SP Application Specific connector code and write the business logic to store it in bodyArr element interfaceSP.Body[0] = bodyArr[0]; interfaceSP.SubmissionStatus = "response"; SPImplSoapSoap callResponse = new SPImplSoapSoap ("path of Generic Connector"); callResponse.submitResponse ( ref interfaceSP ); }
28
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in Submit Acknowledgement / Submit Response send to SAP from SP SAP (portal) Gateway SP( Back off ) Submit Poll Submit Response /Submit Acknowledgement DocumentPoll() //Actual Response //Can be retrieved for Business Error and response. if ( inter.BodyContent != null ) { element = inter.BodyContent } //If Status is error string errorCode = inter.ErrorCode; string[] errorList=new string[1]; errorList = inter.ErrorList; string error=null; if ( errorList != null ) { error = errorList [ 0 ]; } //Receiving Result string status= inter.SubmissionStatus; /if status is acknowledgement, it means response is still awaited from SSDG. string corrID=inter.CorrelationID //Target End point for the Gateway string responseEndPoint=inter.TargetEndPoint; string classId = inter.ClassValue
29
©Centre for Development of Advanced Computing http://nsdg.gov.in Asynchronous Communication SAP (portal) GatewaySP( Back off ) Asynchronous Submit Request Submit poll Submit ACK Submit Response Submit poll RESPONSE Asynchronous Submit Request Submit ACK
30
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in List Request from SAP SAP (portal) Gateway List Response DocumentList() ConnectorInterface inter = new ConnectorInterface ( ); inter.CorrelationID = ""; //Type of Details Requested i.e. Asynchronous or Synchronous inter.ResponseMode = ResponseMode.Asynchronous; inter.ClassValue = "http://192.168.0.140/133"; //Address of SSDG inter.TargetEndPoint = "http://nsdgstaging.cdacmumbai.in/gateway/services/NSDGService"; //Authentication Details received after registration of SAP inter.AuthMode = AuthMode.Clear; inter.SenderID = "SAP1238072453839"; inter.Password = "[B@1f19353"; //Prepare Body as List request Schema provided in Manual Appendix inter.BodyContent = body; //Calling of SSDG through Generic Connector API ConnectorInterface.DocumentList (ref inter );
31
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in List Response From SSDG to SAP SAP (portal) Gateway List Response //Receiving Result string status = inter.SubmissionStatus; //if status is response string corrID=inter.CorrelationID; string classID = inter.ClassValue; XmlElement [ ] element=new XmlElement[1] ; if ( inter.BodyContent != null ) { //Receive result as per schema mentioned in Manual element = inter.BodyContent; } //in case of error string errorCode = inter.ErrorCode; string[] errorList=new string[1]; errorList = inter.ErrorList; string error=null; if ( errorList != null ) { error = errorList [ 0 ]; } DocumentList()
32
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in Delete Request from SAP SAP (portal) Gateway Delete Response / Delete Acknowledgement DocumentDelete() ConnectorInterface inter = new ConnectorInterface ( ); inter.TransactionId = "12345678912345678912345678912345"; //or give response as it is optional field inter.TransactionId = ""; //It should contain the value as received in Asynchronous SubmitRequest inter.CorrelationID = "34E17E40952F4EAEB37E7B1FD7BA67EF"; //Valid Service Class inter.ClassValue = "http://127.0.0.1/22"; //End Point Url of the Gateway where DocumentDelete can be done inter.TargetEndPoint = “http://nsdg.staging.cdacmumbai.in/gateway/services/NSDGService"; inter.DocumentDelete ( ref inter );
33
©Centre for Development of Advanced Computing http://nsdg.gov.in ©Centre for Development of Advanced Computing http://nsdg.gov.in Delete Response From SSDG to SAP SAP (portal) Gateway Delete Response / Delete Acknowledgement //Receiving Result string status= inter.SubmissionStatus; //if status is response string corrID=inter.CorrelationID; //Target End point for the Gateway string responseEndPoint=inter.TargetEndPoint; string classId = inter.ClassValue; //If Status is error string errorCode = inter.ErrorCode; string[] errorList=new string[1]; errorList = inter.ErrorList; string error=null if ( errorList != null ) { error = errorList [ 0 ]; } DocumentDelete()
34
©Centre for Development of Advanced Computing http://nsdg.gov.in Thank You
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.