0% found this document useful (0 votes)
706 views10 pages

Synchronous Soap To JDBC - End To End Walkthrough - Sap Pi Tutorials

soap to jdbc

Uploaded by

Jagadish Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
706 views10 pages

Synchronous Soap To JDBC - End To End Walkthrough - Sap Pi Tutorials

soap to jdbc

Uploaded by

Jagadish Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

1/21/2017

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

You might also like