Changes for page Calling a SOAP Web service
Last modified by Erik Bakker on 2024/08/26 12:56
From version 40.1
edited by Erik Bakker
on 2024/08/26 12:56
on 2024/08/26 12:56
Change comment:
There is no comment for this version
To version 33.1
edited by Erik Bakker
on 2022/06/12 09:14
on 2022/06/12 09:14
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - CallingSOAP Web1 +novice-soap-webservice-connectivity-configure-your-soap-webservice - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,108 +1,67 @@ 1 -{{container}}{{container layoutStyle="columns"}}((( 2 - Whentalking toxternalpartiesvia a SOAP webserviceyouneed to defineineMagizthat youwanttocall a SOAP webservicesoeMagizwill formacorrectSOAP message. Ontop ofthatconfigurationthereis a supportobject ineMagizthatwill helpyouwith theanalysisofyourproblems whencallingtheSOAP webservice. In this microlearning, we will learn howto callaSOAPwebservice fromeMagiz.1 +{{container}}{{container layoutStyle="columns"}}((( 2 +In some cases, the input you receive or the output that you need to send to an external party cannot handle all characters or the input or output is written with the help of a character set. In this microlearning, we will learn how you can define the character set for file-based connectivity to ensure that you can process and deliver files according to the specifications. 3 3 4 -Should you have any questions, please contact academy@emagiz.com. 4 +Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 6 +* Last update: May 31th, 2021 7 +* Required reading time: 7 minutes 8 + 6 6 == 1. Prerequisites == 10 + 7 7 * Basic knowledge of the eMagiz platform 8 8 9 9 == 2. Key concepts == 10 -This microlearning centers around calling a SOAP Webservice. 11 11 12 - WithSOAP, wemean:Amessagingprotocolspecificationforexchanging structuredinformationin theimplementationof webservices incomputernetworks.15 +This microlearning centers around learning how to define the character set to ensure that eMagiz processes the information correctly. 13 13 14 -* To call a REST Webservice you need either: 15 - ** A Web Service Outbound Gateway 16 -* Critical information when configuring this component: 17 - ** URL 18 - ** Retry Advice 19 - ** Error Handling 20 - ** Authentication 21 - 22 -== 3. Calling a SOAP Webservice == 17 +By character set, we mean: The composite number of different characters that are being used and supported by computer software and hardware. It consists of codes, bit patterns, or natural numbers used in defining some particular character. 23 23 24 -Calling a SOAP Webservice within eMagiz can be done with the help of a Web Service Outbound Gateway. To correctly configure this component you need to consider the following elements: 19 +* Some external system talk in a different character set 20 +* eMagiz talks in default UTF-8 as a character set and assumes everyone else also does this 21 +* In cases of mismatch correct is at the point where you talk with the other system (i.e. entry or exit) 25 25 26 -* URL 27 -* Retry Advice 28 -* Error Handling 29 -* Authentication 23 +== 3. Character set == 30 30 31 - Wewill discuss thefirstthreetemsinthislistin thismicrolearning.In themicrolearnings that willfollowthis microlearning, we willdelve deeperintovariousauthentication possibilities.25 +In some cases, the input you receive or the output that you need to send to an external party cannot handle all characters or the input or output is written with the help of a character set. In this microlearning, we will learn how you can define the character set for file-based connectivity to ensure that you can process and deliver files according to the specifications. 32 32 33 - Beforewedelve into the configurationofthecomponentletus firstmove toCreate andopen anexit flowin whichwewanttocalltheSOAPWebservice.Whenyou open theexit flowitwilllooksimilartothis:27 +Sometimes external systems only talk in a specific character set. To ensure that all the data is properly communicated between eMagiz and the other system we need to make sure that we define which character set that is so we can tell it to eMagiz via a component. That way eMagiz will deviate from its default (i.e. UTF-8) and will process the file according to that different character set. In practice, we mainly see windows-1252 as an alternative that pops up once in a while. In various components that deal with file handling, you can define the character set on which eMagiz should act. Examples of such components are: 34 34 35 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--exit-flow-starting-point.png]] 29 +- File to string transformer 30 +- Flat file to XML transformer 31 +- File outbound channel adapter 36 36 37 - Nowthatwehave openedtheflow andarein"StartEditing"modeweneed toaddthewebserviceoutboundgatewayto start with.33 +In all these components you have the option to define the character set within the Advanced tab of the component. In this microlearning, we will use the File to string transformer to illustrate how that will look. 38 38 39 -[[image:Main.Images.Microlearning.WebHome@novice- soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component.png]]35 +[[image:Main.Images.Microlearning.WebHome@novice-file-based-connectivity-characterset--characterset-configuration.png]] 40 40 41 - ===3.1URL===37 +In this field, you can define the character set of your choice. To make this work in eMagiz you need to navigate to the Create phase of eMagiz and open the entry flow in which you want to retrieve the file to a certain location. Within the context of this flow, we need to add functionality that will ensure that the correct character set is used. To do so first enter "Start Editing" mode on flow level. After that open, the File to string transformer, navigate to the Advanced tab, and fill in the correct character set. After you have defined the correct character set the only thing left to do is to Save the component. See the suggested additional readings section on the complete list of character sets that are supported by Java 8. 42 42 43 - Now thatwe have addedthe correct componenttothe canvas it has becometime to configure thecomponentcorrectly. The first thing to configure when callinga SOAP Webservice is determiningandregistering theendpoint(URL) eMagiz shouldcalltodeliver the messagetoo. As always in scenarios where an informationelementcan changebetween environments, you should useaproperty referenceand determine thecorrectvalueon a per-environmentbasis.39 +Congratulations you have successfully learned how to specify the character set. 44 44 45 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-url.png]]41 +== 4. Assignment == 46 46 47 -=== 3.2 Retry Advice === 43 +Configure an entry in which you define the component and configuration needed to process a file on a per-line basis. 44 +This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 48 48 49 - Thesecond setting we need to configure is the retry advice.With retryadvice, you can guard your solutionagainst temporary connection losses between eMagiz and the external party. Asthis can happen from time to time the best practice is to configure such a Retry Advice on every Web Service Outbound component. To add the Retry Advice move to the Advanced tab and move down to the Request handler advice chain segment. Within this segment, you will see a button called Retry Advice.46 +== 5. Key takeaways == 50 50 51 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-button.png]] 48 +* Some external system talk in a different character set 49 +* eMagiz talks in default UTF-8 as a character set and assumes everyone else also does this 50 +* In cases of mismatch correct is at the point where you talk with the other system (i.e. entry or exit) 51 +* eMagiz provides several components within which you can define the character set 52 52 53 - Whenyouclick ontheRetryAdvice buttonyou willbeprompted withapop-up. In here you needto configure the exact settings53 +== 6. Suggested Additional Readings == 54 54 55 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-empty.png]]55 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz and read the following links: 56 56 57 -The best practice for this configuration is as follows for asynchronous solutions: 58 -* Select the option called Simple Retry Policy 59 -* Set the max attempts at 6 60 -* Select the Fixed back off policy 61 -* Set the backoff period at 5000 (ms) 57 +* https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html 58 +* https://www.techopedia.com/definition/941/character-set 59 +* https://www.smashingmagazine.com/2012/06/all-about-unicode-utf8-character-sets/ 62 62 63 - Whenyouhavedone sotheconfiguration shouldlook as follows. Thely thing left iso press Savetosave your Retry Adviceconfiguration61 +== 7. Silent demonstration video == 64 64 65 - [[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-retry-advice-pop-up-filled-in.png]]63 +This video demonstrates how you could have handled the assignment and gives you some context on what you have just learned. 66 66 67 - ===3.3Error Handling===65 +{{video attachment="novice-file-based-connectivity-characterset.mp4" reference="Main.Videos.Microlearning.WebHome"/}} 68 68 69 -When calling a SOAP Web service with the configuration we have defined up till here you could suffer from cryptic error response you get back when the SOAP web service call fails. To improve the error handling to make your life easier when analyzing the problem you need to add a support object to the canvas and link it to the web service outbound gateway. This support object is named "Detailed SOAP Fault Message Resolver". 70 - 71 -To link the support object to your web service outbound gateway you open the web service outbound gateway, navigate to the Advanced tab, and select the Fault message resolver. Afterward press Save to save the link between the components. 72 - 73 -[[image:Main.Images.Microlearning.WebHome@novice-soap-webservice-connectivity-calling-a-soap-webservice--web-service-outbound-component-fault-message-resolver.png]] 74 - 75 -Now that we have configured the HTTP Outbound component to our liking we can press Save on the component level to store our changes. As a result the flow will look as follows: 76 - 77 -[[image:Main.Images.Microlearning.WebHome@microlearning/novice-soap-webservice-connectivity-calling-a-soap-webservice--flow-result.png]] 78 - 79 -== 4. Key takeaways == 80 - 81 -* eMagiz will create a valid SOAP message when using this component 82 -* eMagiz provides a support object for better error handling of SOAP faults 83 -* There are four key configuration elements: 84 - ** URL 85 - ** Retry Advice 86 - ** Error Handling 87 - ** Authentication 88 - 89 -== 5. Suggested Additional Readings == 90 - 91 -* [[Crash Course (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]] 92 -** [[Crash Course API Gateway (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]] 93 -*** [[Setting up Exit gate (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-setting-up-exit-gate||target="blank"]] 94 -* [[Novice (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Novice.WebHome||target="blank"]] 95 -** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.WebHome||target="blank"]] 96 -*** [[Configure your SOAP web service (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-configure-your-soap-webservice-gen3.WebHome||target="blank"]] 97 -*** [[Securing your SOAP Webservice (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-securing-your-soap-webservice||target="blank"]] 98 -*** [[Validate Incoming Messages (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-validate-incoming-messages-gen3.WebHome||target="blank"]] 99 -*** [[Endpoint Check (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-endpoint-check-gen3.WebHome||target="blank"]] 100 -*** [[SOAP Headers (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-soap-headers||target="blank"]] 101 -*** [[Authorization - Calling a SOAP Webservice (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.SOAP Web service Connectivity.novice-soap-webservice-connectivity-authorization-calling-a-soap-webservice||target="blank"]] 102 -* [[Intermediate (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]] 103 -** [[SOAP Web service Connectivity (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.SOAP Web service Connectivity.WebHome||target="blank"]] 104 -* [[Expert (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.WebHome||target="blank"]] 105 -** [[Webservice Security (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Expert Level.Webservice Security.WebHome||target="blank"]] 106 -* [[Calling a SOAP Web service (Search Result)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=%22calling+a+SOAP+Web+service%22||target="blank"]] 107 - 108 108 )))((({{toc/}}))){{/container}}{{/container}}