1 / 32

SAP Business One Integration Framework Training - Building HTTP Calls

Learn to build HTTP Call scenarios in SAP Business One Integration Framework (B1if). Process inbound and outbound messages, set up sender and receiver systems, test scenarios, and analyze case studies.

orvalc
Download Presentation

SAP Business One Integration Framework Training - Building HTTP Calls

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Integration Framework of SAP Business OneTraining Solution Architects TeamFebruary 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 • Integration Scenario Package Scenario Step Inbound Outbound Processing • Setup Steps Sender System Receiver System Activate • Test Message Log • Case Analysis Process http call in B1if

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

  5. Case Analysis: Integration Step – XXX.callHTTP (Synchonous) http response Browser 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 • Integration Scenario Package Scenario Step Inbound Outbound Processing • Setup Steps Sender System Receiver System Activate • Test Message Log • Case Analysis Process http call in B1if

  7. Setup: Create an HTTP Any system 2 3 Path: SLD/B1iServer 4 5 6 1 3 2 4

  8. Setup: Create an HTTP Any system 2 3 Path: SLD/B1iServer 4 5 6 1 2

  9. Integration: Scenario Package Path: Scenarios/Package Design 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 4 1 2 3 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 2 3 6 7 4 5 8 9

  12. Integration: Inbound (2/2) 1 2 3

  13. Integration: Outbound Path: Scenarios/Step Design/Working Step/[Outbound] 2 3 1 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 2 5 3 4

  16. Integration: Processing Path: Scenarios/Step Design/Working Step/[Processing] 1 5 4 2 3

  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:templatename="transform"> <callxmlns=""> <!--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>www.google.com</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 isxml--> <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> <par id="htta.returnpltypedefault" value=""> <!--optional--> </par> </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:templatename="transform"> <result xmlns=""> <xsl:copy-of select="/vpf:Msg/vpf:Body/vpf:Payload[./@id=&apos;atom1&apos;]/*"/> </result> </xsl:template> Copy the result of callHTTP atom, in this case it is “atom1”

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

  22. Setup: Steps 2 3 Path: Scenarios/Setup 4 5 6 4 1 2 3

  23. Setup: Sender 2 3 Path: Scenarios/Setup 4 5 6 1 2 3 4 5 6

  24. Setup: Receiver 2 3 Path: Scenarios/Setup 4 5 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 2 3 Path: Scenarios/Setup 4 5 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 Process http call in B1if • Integration Scenario Package Scenario Step Inbound Outbound Processing • Setup Steps Sender System Receiver System Activate • Test Message Log

  28. Test: Check trigger 2 3 Path: Scenarios/Control 4 5 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 • 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. 6

  31. Thank You! For more information visit SDN at http://sdn.sap.com

More Related