step by step procedure to implement soap to jdbc scenario · pdf fileimplement soap to jdbc...
TRANSCRIPT
Step By Step Procedure to Implement Soap to JDBC Scenario
Applies to This scenario is implemented in PI 7.0 server, service pack: 14.
For more information, visit the SOA Management homepage.
Summary This article will explain you clear step by step procedure to implement SOAP to JDBC synchronous scenario.
Author: Leela Ratnam Morampudi
Company: Satyam Computers Services Ltd
Created on: 12 December, 2008
Author Bio Leela Ratnam Morampudi is a SAP Netweaver Consultant in Satyam Computer Services Ltd.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 1
Step By Step Procedure to Implement Soap to JDBC Scenario
Table of Contents Introduction .........................................................................................................................................................3 Pre-requisites......................................................................................................................................................3 Integration Repository.........................................................................................................................................3
Data Types......................................................................................................................................................3 Message Types...............................................................................................................................................6 Message Interfaces.........................................................................................................................................8 Message Mapping:..........................................................................................................................................9 Interface Mapping. ........................................................................................................................................10
Integration Directory .........................................................................................................................................11 Business Services and Communication Channels .......................................................................................11 Sender Agreement ........................................................................................................................................13 Receiver Determinations:..............................................................................................................................14 Interface Determinations: ..............................................................................................................................15 Receiver Agreements:...................................................................................................................................15
Generating the WSDL file: ................................................................................................................................16 Executing the Scenario in Microsoft Info path: .................................................................................................18
Testing ..........................................................................................................................................................25 Runtime Environment: ......................................................................................................................................26
Messages in MONI........................................................................................................................................26 Related Content................................................................................................................................................27 Disclaimer and Liability Notice..........................................................................................................................28
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 2
Step By Step Procedure to Implement Soap to JDBC Scenario
Introduction This document will explain you the Soap to JDBC communication using SAP XI. At sender side SOAP adapter is used and JDBC adapter is used to update the record in the data base table. If the record is updated we can know the response as the record is successfully updated or not.
Here we are going to update the record in the data base table. The company name should be updated based on the Id which the Soap client provides.
Pre-requisites • SQL Server 2000 is the DB Server used in this scenario.
• Data base table Employee with the Id, Name, and Company
• Using the data base name as AccPayDBV2
Integration Repository Import the software component.
Create the namespace.
Data Types
Create 4 data types.
Soap Request ---DT_Sender
Soap Response – DT_Receiver
JDBC_Request – DT_Employee
JDBC_Response – DT_Employee_response
Create data type for the Soap Request
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 3
Step By Step Procedure to Implement Soap to JDBC Scenario
Create the data type for the soap response
Create data type for the JDBC Request
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 4
Step By Step Procedure to Implement Soap to JDBC Scenario
Create the data type for the JDBC Response
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 5
Step By Step Procedure to Implement Soap to JDBC Scenario
Message Types
Create the message types for the above data types
Message type for the Soap Request
Message type for the soap response
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 6
Step By Step Procedure to Implement Soap to JDBC Scenario
Message type for the Jdbc Request
Message type for the Jdbc Response
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 7
Step By Step Procedure to Implement Soap to JDBC Scenario
Message Interfaces
Create outbound synchronous message interface for the soap
Create inbound synchronous message interface for the JDBC
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 8
Step By Step Procedure to Implement Soap to JDBC Scenario
Message Mapping:
Request mapping to update the record in the data base table.
Response mapping whether the record is updated in the data base table
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 9
Step By Step Procedure to Implement Soap to JDBC Scenario
Interface Mapping.
Create one interface mapping. Click on read interfaces and select the corresponding message mapping.
Activate all the IR objects. Integration Repository part completed.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 10
Step By Step Procedure to Implement Soap to JDBC Scenario
Integration Directory
Business Services and Communication Channels
Create Business service and select the sender and receiver interface
Create the sender communication channel. Select the adapter as soap. Enter the Sender interface and the namespace.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 11
Step By Step Procedure to Implement Soap to JDBC Scenario
Create the Receiver JDBC communication channel JDBC Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver Connection: jdbc:sqlserver://hostname:1433;databaseName=AccPayDBV2 Replace host name with the IP address of the SQL Server. Check whether you are using the correct port name Specify the username and password for the connecting to the database.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 12
Step By Step Procedure to Implement Soap to JDBC Scenario
Sender Agreement
Create the sender agreement for connecting to the sender communication channel
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 13
Step By Step Procedure to Implement Soap to JDBC Scenario
Receiver Determinations:
Create the receiver determination as shown below
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 14
Step By Step Procedure to Implement Soap to JDBC Scenario
Interface Determinations:
Create the interface determination. Interface mapping is specified here.
Receiver Agreements:
Create the receiver agreement
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 15
Step By Step Procedure to Implement Soap to JDBC Scenario
Generating the WSDL file: In the Integration Directory, from the menu bar, select the Tools----Define Web Service
Click on continue
Click on the propose URL and click on the continue
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 16
Step By Step Procedure to Implement Soap to JDBC Scenario
Select the Sender interface and namespace.
Specify the sender interface, sender namespace, and sender service.
It will display all the sender details. Then click finish.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 17
Step By Step Procedure to Implement Soap to JDBC Scenario
Save the generated wsdl file.
Executing the Scenario in Microsoft Info path: Open the Microsoft info path from start—programs---Microsoft office---Microsoft office info path.
Click on the design a from template
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 18
Step By Step Procedure to Implement Soap to JDBC Scenario
Select the Webservice icon and click ok
Select the radio button receives and submits data and click on next.
Enter the path of the generated wsdl which u have saved and click next.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 19
Step By Step Procedure to Implement Soap to JDBC Scenario
Select the interface and click next.
Click next
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 20
Step By Step Procedure to Implement Soap to JDBC Scenario
Click next
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 21
Step By Step Procedure to Implement Soap to JDBC Scenario
Select the interface and click next.
Double click on the parameters
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 22
Step By Step Procedure to Implement Soap to JDBC Scenario
Double click on the parameter (material). Then click on the query field and click ok.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 23
Step By Step Procedure to Implement Soap to JDBC Scenario
Click next. And click Finish.
Now drag the query fields on the data fields to the left side. And click preview.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 24
Step By Step Procedure to Implement Soap to JDBC Scenario
Testing
Before updating the table, the Company name is Wipro for the Id =3.
After the updating the record
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 25
Step By Step Procedure to Implement Soap to JDBC Scenario
Runtime Environment:
Messages in MONI
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 26
Step By Step Procedure to Implement Soap to JDBC Scenario
Related Content http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
For more information, visit the SOA Management homepage.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 27
Step By Step Procedure to Implement Soap to JDBC Scenario
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2008 SAP AG 28
Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.