Professional Documents
Culture Documents
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
Warning:Invalidargumentsuppliedforforeach()in/home/sapagcoin/sappi.sapag.co.in/wpcontent/plugins/truemagshortcodes/shortcodes/smartcontent.phponline152
SAPPITutorials
SAPPITutorials,SAPPIJobs,SAPPI
InterviewQuestions
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH
PostedonMarch6,2009byadmin
SAPPIInterviewQuestionsandSAPPITutorials
SAPPIInterviewQuestionsandSAPPITutorials
Tweet
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH
SYNCHRONOUSSOAPTOJDBC,USINGSTORED
PROCEDURES.
ENDTOENDWALKTHROUGH
ThisWebLogisaimedtoExplainandprovideaclear,stepbystep,endtoend,walkthroughtoimplementa
SOAPtoJDBCsynchronousscenario,executingagivenstoredprocedureandprocessingtherespective
response.
TheintendedaudienceforthisWebLogarethecompletebeginners,andpeoplethatneedsaquickguideto
implementtheJDBCReceiverintheirinterfacesWiththisinmind,Ihavemadeaefforttodocumentallthe
necessarystepstosuccessfullyimplementthisinterface.
BUSINESSSCENARIO
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
1/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
ThecompanyABCneedsaninterfacetosynchronizetheiremployeessalarydetails.
TheyneedtoconnecttoanoldSQLServerDatabasethroughaSOAPclient,andcheckifthesalaryinformation
ofagiven(orseveral)employee(s)hasbeenupdated.([RecordStatus]=U)
Ifso,theinterfacehavetoretrievetheupdatedrecordandupdateitsstatustoProcessed([RecordStatus]=P)
Assumptions,prerequisitesandknownissues:
SQLServer2000istheDBServerusedinthisscenario.
Forconveniencewewillcreateourobjectsinthedatabase[Northwind](youcancreateabrandnewDBifyou
feelso).
IfyourSQLServer200isinstalledonaWindowsusingXPwithSP2,IsuggesttodisabletheWindows
Firewalland,ifneeded,followtheTroubleshotingguideavailableattheendofthisweblog.
Namingconventions
Toeasilyidentifyalltheobjectsrelatedtothisinterface,wewilluseayoracapitalYatthebeginningofallthe
objectnames.
SYSTEMLANDSCAPEDIRECTORYSETUP:
1Goto[SoftwareCatalog]
Createa[NewProduct]withtheFollowingDetails:
Vendor:YABCvendor
Name:YABC
Version:1
Clickon[Create]
Definea[NewSoftwareComponent]withtheFollowingDetails:
UsethepreviouslydefinedProductandVendor
Name(uppercase):YABC_SW_COMP
Version:1
Clickon[Create]
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
2/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
2ReturntotheSLDHomeandgoto[TechnicalLandscape]
Createa[NewTechnicalsystem]withtheFollowingDetails:
TechnicalSystemType:ThirdParty
>NEXT
SystemName:YTSABC
Hostname:YABCSERVER
>NEXT
Addtheproduct:YABC,1ofYABCVendor
>FINISH
3ReturntotheSLDHomeandgoto[BusinessLandscape]
Createa[NewBusinessSystem]
Name:YBSABC
>NEXT
Tech.Syst.Type:ThirdParty
>NEXT
System:YTSABConyabcserver
LogicalSystemName:YLSABC
>NEXT
SelectyourpreferredIntegrationServer
>FINISH
WehavefinishingsettinguptheSLDforourSOAPtoJDBCSynchronousInterface.
INTEGRATIONREPOSITORYSETUP:
1.ImporttheSWComponent:
FirstwewillimporttherecentlycreatedSoftwareComponent
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
3/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
Goto[Tools]intheMenuBar
>TransferfromSystemLandscapeDirectory>ImportSoftwareComponentVersions
Select[YABC_SW_COMP,1ofyabcvendor]
>[Import]
>[Exit]
Fig.1ImportSCVersions
TheSoftwareComponentYABC_SW_COMPshallbeavailableintheObjectsTablist.
2.CreateTheNamespace
UnderSCYABC_SW_COMPcreatethefollowingnamespace:http://yabc.com/soap2jdbc/sync
3.CreateTheDataTypes
WeneedtocreatefourdifferentDataTypesforthisinterfaceasfollows:
SOAPRequest:ySoapEmpReq_dt
SOAPResponse:ySoapEmpRes_dt
JDBCRequest:yJDBCEmpReq_dt
JDBCResponse:yJDBCEmpReq_dt_response
PleaseensurethatthenameoftheJDBCResponseDatatypeandMessagetypehavethestring
_responseintheend,thisisobligatorytoproperlyhandletheresultofthestoredprocedure
execution.
e.g.Ifyourjdbcrequestmessageisnamed[xyz],theresponsehavetobenamed[xyz_response].
BeverycarefulwithallthenamesoftheelementswithintheJDBCRequestorResponseDataTypes,
byexample,theelementgetEmpDetails,needstobetheexactnameofthestoredprocedurethatwe
willexecuteintheDatabase,andtheelementEmpIDistheexactinputvariablenamethatwewill
providetotheStoredProcedure.
NowyoucanproceedtocreatetheDataTypesasshownintheFigures2,3,4&5.
Fig2.SOAPRequest:ySoapEmpReq_dt
Fig2.SOAPRequest:ySoapEmpReq_dt
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
4/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
Fig3.SOAPResponse:ySoapEmpRes_dt
Fig3.SOAPResponse:ySoapEmpRes_dt
Fig4.JDBCRequest:yJDBCEmpReq_dt
Fig4.JDBCRequest:yJDBCEmpReq_dt
Fig5.JDBCResponse:yJDBCEmpReq_dt_response
Fig5.JDBCResponse:yJDBCEmpReq_dt_response
4.CreateTheMessageTypes
TocontinueweneedtocreateaMessageTypeforeachDataType,thisstepisreallysimple,becausetherelation
betweentheDTsandMTsisonetoone.
TheFigure6willgiveaclearideaoftherelationshipbetweentheDTandMTinthisScenario.
Fig.6DatatypesandMessageTypes
Tip:WhileCreatingtheMessageTypes,youcandraganddropthedesiredDatatypeandNamespacetothe
RespectiveTextBoxesStartwiththenamespace,andfinishwiththeNameoftheDatatype,thensavethe
MessageType.
Fig7.DragandDroptheDTandtheNamespace
5.CreateTheMessageInterfaces
WewillrequireTwoSynchronousMessageInterfaces,oneOutboundSynchronousandoneInbound
Synchronous
ConfigureeachMessageInterfaceasisshowninthefires8&9.
Fig8:OutboundMessageInterface
Fig9:InboundMessageInterface
6.CreateTheMessageMappings
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
5/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
Wewillrequiretwomessagemappings,onefortheRequestandanotherfortheResponse.Figure10,10a,
10bandFigure11showsthemappingdetails.
Fig.10SOAPRequesttoJDBCRequest
Fig.10a:Constant[EXECUTE]>@action
Fig.10b:Constant[CHAR]>@type
ClickonthelinkbelowformoreinformationonthedocumentformatfortheReceiverJDBCAdapter
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
Fig.11JDBCResponsetoSOAPResponse
7.CreateTheInterfaceMapping
ThelaststepthatwewillconfigureintheIntegrationRepositoryistheInterfaceMapping.
WewillonlyrequireoneInterfaceMapping.
SelecttheSourceInterfaceandtheTargetInterfaceasshownintheFigure12
Fig12:InterfaceMapping
NowClickonThebutton[ReadInterfaces]andselectthecorrespondingmessagemappingsintheRequestand
ResponseTab.
Thefigure12aand12bshowsthemessagemappingsalreadyselectedineachtab.
Fig.12a.
Fig.12b
WehavefinishingsettinguptheIRforourSOAPtoJDBCSynchronousInterface.
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
6/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
INTEGRATIONDIRECTORYSETUP
Firstofall,inthemenubar,selectEnviroment>ClearSLDDataCache
ThiswillensurethatourBusinessSystemisavailableforselection.
1.CreateaNewConfigurationScenario
IntheMenuBarSelectObject>New>ConfigurationScenario
Nameitas:YSOAP_TO_JDBC_SYNC
2.AssigntheBussinesSystem
OpentheRecentlyCreatedConfig.Scenario
RightClickonBusinessSystem
SelectAssignBussinesSystem
[Continue]
[Continue]
ScrollDownasneededandselecttheYBSABCBusinessSystem.
UnselecttheCreateCommunicationChannelsAutomaticallybox.
Clickon[Finish]
Figure13:SelectingBusinessSystem
3.CreatethecommunicationChannels
CreatetheSenderSOAPComm.Channelasshowninthefigure14.
Youonlyneedtobecarefulwhentypingthenamespaceandthe[Outbound]InterfaceName.
Fig14:YSOAP_SENDER
NowcreatetheReceiverJDBCComm.Channelwiththefollowingattributes:
NAME:YJDBC_RECVR
JDBCDriver:com.microsoft.jdbc.sqlserver.SQLServerDriver
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
7/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
Connection:jdbc:microsoft:sqlserver://127.0.0.1:3333DatabaseName=Northwind
(TheIP127.0.0.1isjustasample,replaceitwiththeIPofyourSQLSeverAlsoensurethattheportthatyouare
usingiscorrect)
User:Imusingthealmightysauser,youmightneedtouseadifferentuserforyourconnection.
Password:Thecorrectpasswordfortheaboveuser.
Check[AdvancedMode]
NumberofRetries:2
TransactionIsolationLevel:serializable
Activatethecheckbox[DatabaseAutoCommit]
Activatethecheckbox[DisconnectfromDatabase]
TheFigure15istrimmedtoshowonlythemeaningfulconfiguration.
Fig.15:YJDBC_RECVR
4.CreatetheReceiverAgreement,SenderAgreement,InterfaceDeterminationandReceiver
Determination.
Thefollowingstepsshouldbeverystraightforward.
Refertothefigures16,17,18&19ifyouhaveproblemssettinguptheIDcomponents.
Fig.16:ReceiverAgreement
Fig.17:SenderAgreement
Fig.18:InterfaceDetermination
Fig.19ReceiverDetermination
Withthis,wehavefinishedourIntegrationDirectoryConfiguration.
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
8/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
UNITTESTING
1.CREATETHESQLSERVEROBJECTS
WeneedtocreatetheTableEMP_DETAILSandthestoredproceduregetEmpDetails
Tomakethissimple,copyandpastethesourcecode1,avaialbleattheendofthisweblog,andexecuteitto
createalltheobjectsandpopulatethetableinthedatabase.
Followtheproceduredescribedbelow:
OpentheSQLServerEnterpriseManager
Inthemenubarselect[Tools]
Select[QueryAnalyzer]
Copyandpastethesourcecode1,availableattheendofthisweblog.
Press[F5]keyorClickontheRunbutton.
Figure20showstheTablewiththerowsalreadyinserted
Fig.20:EMP_DETAILSTable
2.CREATETHESOAPCLIENT
ThesimplestwaytotestthisinterfaceiscreatingaclientwithinanHTMLfileandexecuteitwiththeInternet
Explorer.
Youdontevenneedahtmleditor,justopenthegoodoldnotepadandpastethecodebelow,savethefileand
nameitSOAP_TO_JDBC.html
Ensurethatyoudidntsaveatxtfile,ifso,justchangetheextensiontohtml.
OpentheFilewithInternetExplorer
EnsurethatyouAllowBlockedContent
YoucanchangetheEmpID,oraddseveralatthesametime.
Clickon[Enviar](Send)
Fig.21:SoapClient
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
9/10
1/21/2017
SYNCHRONOUSSOAPTOJDBCENDTOENDWALKTHROUGH|SAPPITutorials
ApopupwindowwillappearaskingforyourXIuserandpassword.
Fillin,andclick[ok.]
Fig22.PopupWindow
SAPPIInterviewQuestionsandSAPPITutorials
SAPPIInterviewQuestionsandSAPPITutorials
TheResponsemessagewillappearintheResponsebox,scrolltotherightandyouwillbeabletoseethe
messagebody.
Ifanyerrorhappens,itwillbeshownintheResponseboxaswell.
Fig.23:Responsemessage
WehaveSuccessfullycreatedalltheXIObjectsthatareneededfortheSOAPtoJDBCSync.Interface.
Attheendofthisweblogyouwillfindthesourcecodeneededfortheunittestingsandabriefconectivity
trobuleshotingguide.
SAPPIInterviewQuestionsandSAPPITutorials
SAPPIInterviewQuestionsandSAPPITutorials
Sharethis:
Relatedposts:
1.JDBC2JDBC
SendarticleasPDF Enteremailaddress
Send
Thisentrywaspostedinflatfiletofilesenario,idocsenariostepbystep,jdbc2jdbcsapxisenario,sappi7.0training,sapxialerts,SOAP2JDBC.Bookmarkthepermalink.
CopyrightSAPPITutorials
ZoneThemebySAPPITUTORIALS
http://www.sappi.sapag.co.in/flatfiletofilesenario/synchronoussoaptojdbcendtoendwalkthrough/
10/10