Presentation is loading. Please wait.

Presentation is loading. Please wait.

Integration Framework of SAP Business One Training

Similar presentations


Presentation on theme: "Integration Framework of SAP Business One Training"— Presentation transcript:

1 Integration Framework of SAP Business One Training
Solution Architects Team February 2011 How to make a HTTP Call

2 B1if Training: How to build a HTTP Call in B1if
The following training is designed to show you how to build a Http Call scenario using B1if. After this training, you should be able to: Build a scenario processing HTTP Call in B1if. Setup the scenario and test it for running.

3 Agenda Case Analysis Integration Setup Test Process http call in B1if
Scenario Package Scenario Step Inbound Outbound Processing Setup Steps Sender System Receiver System Activate Test Message Log

4 Agenda Case Analysis Integration Setup Test Process http call in B1if
Scenario Package Scenario Step Inbound Outbound Processing Setup Steps Sender System Receiver System Activate Test Message Log

5 Case Analysis: Integration Step – XXX.callHTTP (Synchonous)
Browser http response http request call B1if The potential scenario is making several http calls to public services (e.g. Telecom, Bank, Google, Facebook API etc) and composing together into a new interface in B1if An HTTP Call is triggered via A URL by an external system (e.g. browser), and the request is sent to B1if. The scenario step XXX.callHTTP in B1if is triggered for process by the given URL parameter(e.g. action=callHTTP), calling to the target http call URLs for result. Then transform and handover the call results back to the original caller via HTTP

6 Agenda Case Analysis Integration Setup Test Process http call in B1if
Scenario Package Scenario Step Inbound Outbound Processing Setup Steps Sender System Receiver System Activate Test Message Log

7 Setup: Create an HTTP Any system
2 3 Path: SLD/B1iServer 4 5 1 Choose HAnyforXcelsius 2 Click Copy 3 Choose copy_HAnyforXcelsius copied from HAnyforXcelsius above 4 Click Edit 6 2 1 4 3

8 Setup: Create an HTTP Any system
2 3 Path: SLD/B1iServer 4 5 1 Change the system name into HAnyforDemo 2 Click Save 6 2 1

9 Integration: Scenario Package
Path: Scenarios/Package Design 1 Type the Scenario Package Identifier. Do not use spaces or special characters in the identifier. (callHTTP) 2 Type the name of the vendor of the scenario 3 Click on Save 1 2 3 B1if will add the namespace configured before the Scenario identifier as configured. The package will be created in design mode after save. If you want to modify the package later on, you can use the ellipsis (…) button next to the Scenario Package Identifier textbox to select your package.

10 Integration: Scenario Step
Path: Scenarios/Step Design 1 Click New Button 2 Type the Scenario Step identifier. Do not use spaces or special characters in the identifier. (callHTTP) 3 Using the ellipsis button (…) select the Package to which you want to assign the step. (callHTTP) 4 Click on Save 2 3 1 4 B1if will add the namespace configured before the step identifier as configured. The step will be empty and a version number will be automatically assigned for version control.

11 Integration: Inbound (1/2)
Path: Scenarios/Step Design/Working Step/[Inbound] 1 Click on Channel 2 Using the ellipsis button (…) select HTTP Call as Inbound Type 3 Using the ellipsis button (…) select Synchronous as Process Mode 4 Using the ellipsis button (…) select Call as Process Trigger 5 Using the ellipsis button (…) select URL Parameter as Identification Method 6 Input urlpar(wsaction) as Identification Parameter 7 Input callHTTP as Identifier 8 Click Save 9 Click Close 1 2 3 4 5 6 7 8 9

12 Integration: Inbound (2/2)
1 Click on Retrieval 2 Click Save 3 Click Close 1 2 3

13 Integration: Outbound
Path: Scenarios/Step Design/Working Step/[Outbound] 1 Select Void as Outbound Channel 2 Click Save 3 Click Close 1 2 3 No outbound required. The final response will be sent back to the caller.

14 Integration: Processing
Path: Scenarios/Step Design/Working Step/[Processing] The processing is the part in which B1if transforms the inbound message to the outbound message in order to get the desired results. Each processing unit inside the scenario step is called an atom and can do different types of work. By default all scenario steps have one atom ( called final) associated with an xslt file to perform the last transformation.

15 Integration: Processing
Path: Scenarios/Step Design/Working Step/[Processing] 1 Click on triangle icon to add a new atom 2 Select Call HTTP as new Flow Atom 3 Click Save 4 Click Ok to create an predecessor transformation atom for Call HTTP atom 5 Click Close 1 2 3 5 4

16 Integration: Processing
Path: Scenarios/Step Design/Working Step/[Processing] 1 Click on pen icon to edit httpCall atom 2 Select #atom2 as reference for connectivity (#HttpforDemo system can also be used if all connectivity details given there) 3 Select #atom2 (the predecessor xform atom) as Payload and settings 4 Click Save 5 Click Close. 1 2 3 4 5

17 Integration: Processing
Path: Scenarios/Step Design/Working Step/[Processing] After the configuration the Processing diagram should be showing a green light icon at the top of both httpCall atoms. The next step is to modify the XSLT file of the Final atom using your preferred XML Editor. In order to have access to the XSLT file, WebDav should be enabled as “full”. Refer to B1if guides for instructions or the session about “B1if installation”

18 Integration: Processing
Path: Scenarios/Step Design/Working Step/[Processing] The httpCall payload is prepared in the xform atom (atom2).The parameters will be specified in the XSLT file (atom2.xsl) The httpCall atom processes the http call with the given parameters The final atom transforms the httpCall result and hands over the response to the original requester

19 Integration: Processing – Implement atom2.xsl
<xsl:template name="transform"> <call xmlns=""> <!--query id="identifier" value="value"/--> <!--optional - define your own query parameters - multiple elements allowed--> <connect> <!--the connect section is optional - you can also define a reference to the sld--> <destProtocol>http</destProtocol> <destHost> <destPort>80</destPort> <destPath>/</destPath> <query/> <proxyHost/> <proxyPort/> <method>get</method> <authentification></authentification> <user></user> <password></password> <user2query/> <password2query/> <sslTruststorePath/> <sslTruststorePassword/> </connect> <!--optional - default is xml--> <pltype>html</pltype> <payload></payload> <htta> <par id="httpheader.???" value=""> <!--optional - you can specify here your own http header definitions - multiple elements allowed--> </par> <par id="htta.returnpltypeforce" value=""> <!--optional--> <par id="htta.returnpltypedefault" value=""> </htta> </call> </xsl:template> You can make any HTTP call with the given URL parameters, such as calling facebook, twitter etc Note: Depending on your system different parameters need to be specified. For example if there is a proxy server, proxyHost and proxyPort should be specified.

20 Integration: Processing – Implement atom0.xsl (final step)
<xsl:template name="transform"> <result xmlns=""> <xsl:copy-of </result> </xsl:template> Copy the result of callHTTP atom, in this case it is “atom1”

21 Agenda Case Analysis Integration Setup Test Process http call in B1if
Scenario Package Scenario Step Inbound Outbound Processing Setup Steps Sender System Receiver System Activate Test Message Log

22 Setup: Steps Path: Scenarios/Setup 1 2 3 4 Click on Steps
5 1 Click on Steps 2 Click on the Activate checkbox 3 Click on the Generate checkbox 4 Click on Save Confirm action Close the Select Scenario Steps Window 6 1 4 2 3

23 Setup: Sender Path: Scenarios/Setup 1 2 3 4 5 6 Click on Sender
Select Maintain Sender List from the dropdown Choose document 3 Click on Select 4 Check the HAnyforDemo as sender system 5 Click Save 6 Click Close 6 1 2 3 4 5 6

24 Setup: Receiver Path: Scenarios/Setup
2 3 Path: Scenarios/Setup 4 5 1 Click on Receiver. 6 Click Ok 6 No Receiver required for this scenario, since it is a synchronous call, the response will be sent back to the sender. No Outbound channel defined. 1 2

25 Setup: Activate Path: Scenarios/Setup
2 3 Path: Scenarios/Setup 4 5 1 Click on Activate 2 Click on Activate on the Scenario Setup Result window Confirm Operation 6 1 2 After the operation is completed the status of the Package is changed from design to active

26 Setup: Check activation
2 3 Path: Scenarios/Control 4 5 6

27 Agenda Case Analysis Integration Setup Test Process http call in B1if
Scenario Package Scenario Step Inbound Outbound Processing Setup Steps Sender System Receiver System Activate Test Message Log

28 Test: Check trigger Path: Scenarios/Control 1 2 Click Trigger
3 Path: Scenarios/Control 4 5 1 Click Trigger 2 Copy the trigger URL 6 1 2

29 Test After everything is completed you can perform the following test:
Open the browser Paste the trigger URL to process the http call Result as below

30 Test: Message Log 2 3 Path: Monitoring/Message Log 4 5 6 The result of the tests will be displayed in the message log Select the date and time you want to check. Click on Display/Refresh button to check results For more information about debugging check the Debugging Appendix.

31 Thank You! For more information visit SDN at

32


Download ppt "Integration Framework of SAP Business One Training"

Similar presentations


Ads by Google