Endpoint Check

Last modified by Eva Torken on 2023/06/27 11:57

When setting up a point at which your customers can talk to you eMagiz offers various methods of creating such a point. One of those options is by hosting a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. One last check to perform before you can communicate with the external parties that the endpoint is available to receive messages and up and running. In this microlearning, we will learn how you can perform such a check.

Should you have any questions, please contact academy@emagiz.com.

1. Prerequisites

  • Basic knowledge of the eMagiz platform

2. Key concepts

This microlearning centers around the endpoint check.

By endpoint check, we mean: determine whether the WSDL is accessible on the correct endpoint so we can forward the URL to the WSDL + the URL to call to our external parties

  • The endpoint consists of the following elements:
    • Starts with https:// or http://
    • Second part is the host (i.e. where is the endpoint running)
    • Third part is the port on which the incoming traffic is accepted
    • These three things combined make up the first part of our endpoint that will vary per environment
    • Following that we have a static remainder of the endpoint that is build up as follows: /{soap WS name}/{Id}/
    • If you want to get to the WSDL simply add the name of the WSDL (which is defined by the Id given to the "Dynamic WSDL" support object) and the .wsdl extension to the endpoint when viewing it in the browser

3. Endpoint Check

When setting up a point at which your customers can talk to you eMagiz offers various methods of creating such a point. One of those options is by hosting a SOAP Webservice in eMagiz that handles XML messages asynchronously or synchronously. One last check to perform before you can communicate with the external parties that the endpoint is available to receive messages and up and running. In this microlearning, we will learn how you can perform such a check.

  • The endpoint consists of the following elements:
    • Starts with https:// or http://
    • Second part is the host (i.e. where is the endpoint running)
    • Third part is the port on which the incoming traffic is accepted
    • These three things combined make up the first part of our endpoint that will vary per environment
    • Following that we have a static remainder of the endpoint that is build up as follows: /{soap WS name}/{Id}/
    • If you want to get to the WSDL simply add the name of the WSDL (which is defined by the Id given to the "Dynamic WSDL" support object) and the .wsdl extension to the endpoint when viewing it in the browser

As you can see the endpoint can be divided into two parts. One part is dynamic across environments and one part is static across environments. Let us first determine how we can find out the first part of our endpoint.

3.1 HTTPS or HTTP

We start at the top with the determination of HTTPS or HTTP. A simple rule of thumb is that when running in the eMagiz Cloud the endpoint starts with https:// and when the endpoint is running locally (i.e. on-premise) the endpoint starts with http:// (unless you secure it yourself, more on that later).

3.2 Host

The next part of the endpoint is the host. The host is effectively the (virtual) machine on which the endpoint is running. When hosting an endpoint in the eMagiz cloud the host part is the combination between the DNS left-most label on Route level and the cloudslot on which your environment is running. The first part of the equation can be found under Deploy -> Architecture. The second part can be found under Deploy -> Properties by looking for the {technicalnameproject}.amqp01.host. You need to combine the two elements via a dash -. An example of this would then be spwbsrv-test-cloud0001.emagizcloud.com. In case of an on-premise installation, you should ask your customer what the IP address or DNS name is to connect to the machine on which your runtime is running. If the runtime is running locally on your laptop the host equals localhost.

3.3 Port and Path

Whether or not the port needs to be defined to get to the endpoint is once again determined by the location. If the endpoint is hosted in the eMagiz Cloud the port is *not* part of the endpoint. However, when you host your endpoint locally the endpoint becomes part of your endpoint. Note that to make this piece work in the eMagiz Cloud you should set up your Route properly. More on that in our Cloud Management courses. You can determine the port, for the endpoint or the route, by navigating to the infra flow of the runtime through which you host your SOAP web service. In the infra flow you can also find the remainder of the path to get to the WSDL location.

In the infra flow there is a support object of the type "Dynamic WSDL". In here you see the default location of the hosted SOAP endpoint, which is http://localhost:${entry.connector.ws.port}/ws/{soap WS name}/. Based on this, you can find the WSDL by adding {Id}.wsdl to the URI. In this example, when hosting the SOAP web service on-premise, a valid URI would be http://localhost:8099/ws/soapgn3-connector/soapgn3-connector.wsdl.

Note that when running your web service in the eMagiz cloud, the first part (the host part) will change depending on your configuration in Deploy Architecture and the cloud slot on which you are running. An example URI, in that case, would be https://soap-test-cloud0000.emagizcloud.com/ws/soapgn3-connector/soapgn3-connector.wsdl

novice-soap-webservice-connectivity-validate-incoming-messages-gen3--dynamic-wsdl-support-object-infra.png

4. Key takeaways

  • The endpoint consists of the following elements:
    • Starts with https:// or http://
    • Second part is the host (i.e. where is the endpoint running)
    • Third part is the port on which the incoming traffic is accepted
    • These three things combined make up the first part of our endpoint that will vary per environment
    • Following that we have a static remainder of the endpoint that is build up as follows: /{soap WS name}/{Id}/
    • If you want to get to the WSDL simply add the name of the WSDL (which is defined by the Id given to the "Dynamic WSDL" support object) and the .wsdl extension to the endpoint when viewing it in the browser
  • The relevant information can be derived from the "Dynamic WSDL" support object and by determining where the endpoint is hosted

5. Suggested Additional Readings

If you are interested in this topic and want more information on it please read the help text provided by eMagiz.