Skip to main content

Summary This article clarifies how to generate an Artix locator reference file which is valid for multiple runs of the Artix locator.
Environment

Artix 5.6.2 C runtime

All Supported Operating Systems

Question/Problem Description

Creating a WS-Addressing Artix locator reference file valid for multiple runs of the Artix locator.

Why do I need to run it_container_admin -publishreference after each Artix locator start?

Is there a way to create a reference to the Artix locator only once, so that this reference is valid for as long as the locator host and port is not changed?

Clarifying Information

Assume the Artix locator is started on port 1234 with:

it_container -port 1234 ...

An Artix client can query the Locator reference and publish it to a file with:

it_container_admin -port 1234 -publishreference locator.ref

Artix clients can then use the WS-Addressing reference stored in locator.ref as an initial reference to the Artix locator service.

Error Message

The WS-Addressing reference for the Artix locator stored in locator.ref file is only valid for one run of the Artix locator. After the Artix Locator has been re-started the Locator reference needs to be published again into locator.ref.

The locator reference file generated at runtime contains an endpoint reference similar to the one below:

<?xml version='1.0' encoding='utf-8'?><m1:EndpointReference xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:m1="http://www.w3.org/2005/08/addressing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><m1:Address>http://localhost:1234/services/LocatorService</m1:Address><m1:Metadata wsdlLocation="http://localhost:1234/get_wsdl/WPfb12/locator.wsdl"><m2:service xsi:type="m3:tService" name="LocatorService" xmlns:m2="http://ws.iona.com/2005/11/locator" xmlns:m3="http://schemas.xmlsoap.org/wsdl/"><m3:port xsi:type="m3:tPort" name="LocatorServicePort" binding="m2:LocatorServiceBinding"><m4:address xsi:type="m4:tAddress" location="http://localhost:1234/services/LocatorService" xmlns:m4="http://schemas.xmlsoap.org/wsdl/soap/"></m4:address></m3:port></m2:service></m1:Metadata></m1:EndpointReference>

For each run of the locator the wsdlLocation attribute is set to an unique endpoint exposed by the wsdl_publish plugin:

wsdlLocation="http://localhost:1234/get_wsdl/WPfb12/locator.wsdl"

Defect/Enhancement Number
Cause
Resolution

One can generate a reference file which remains valid for multiple runs of the Artix locator and removing the need of generating this file after each locator re-start.

In order to achieve this, please edit the Artix Locator WS-Addressing reference file locator.ref and change the wsdlLocation attribute from the example above to be:

wsdlLocation="http://localhost:1234/services/LocatorService?wsdl"

The contents of the reference file locator.ref will be:

<?xml version='1.0' encoding='utf-8'?><m1:EndpointReference xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:m1="http://www.w3.org/2005/08/addressing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><m1:Address>http://localhost:1234/services/LocatorService</m1:Address><m1:Metadata wsdlLocation="http://localhost:1234/services/LocatorService?wsdl"><m2:service xsi:type="m3:tService" name="LocatorService" xmlns:m2="http://ws.iona.com/2005/11/locator" xmlns:m3="http://schemas.xmlsoap.org/wsdl/"><m3:port xsi:type="m3:tPort" name="LocatorServicePort" binding="m2:LocatorServiceBinding"><m4:address xsi:type="m4:tAddress" location="http://localhost:1234/services/LocatorService" xmlns:m4="http://schemas.xmlsoap.org/wsdl/soap/"></m4:address></m3:port></m2:service></m1:Metadata></m1:EndpointReference>

You can then configure the above as an initial reference in your Artix clients, and these will be able to access the Artix Locator without issues as long as the host and port of the Artix Locator service do not change without the need to run it_container_admin -port 1234 -publishreference locator.ref each time the locatr is re-started.

Workaround
Notes
Attachment

#KnowledgeDocs
#Orbix