ActiveVOS Server Console Help
On the URN Mappings page, you can assign a physical address to a universal resource name (URN). The URN is a logical address of a partner link, specified in a deployment resource.
URN mappings provide a flexible and dynamic way to define target endpoint references. Use URN mappings to specify the physical address of a partner link endpoint reference instead of using the address specified in a process deployment descriptor (.pdd) file or WSDL file. By mapping a URN to a URL, you do not have to rely on invoking a statically defined endpoint address. URN mappings give you flexibility, for example, to deploy the same BPR files for testing and production environments.
Also, if you specify a URL, you can replace the URL by mapping it to a different URL.
The following example illustrates one type of URN to URL mapping:
urn:localhost = http://localhost:8080/active-bpel/services/${urn.3}
This mapping might be used when a process is deployed with the following partner link address information:
<partnerLink name="assessor">
<partnerRole endpointReference="static"
invokeHandler="default:Address">
<wsa:EndpointReference xmlns:assessor="http://
tempuri.org/services/loanassessor">
<wsa:Address>urn:localhost:AssessRisk</wsa:Address>
<wsa:ServiceName PortName=
"SOAPPort">assessor:LoanAssessor</wsa:ServiceName>
</partnerRole>
</partnerLink>
The ActiveVOS invocation framework resolves the URN as follows:
urn:localhost:AssessRisk = http://localhost:8080/active-bpel/services/AssessRisk
Here are some ways you can map URNs to URLs. Note that each segment of the URN is separated by a colon. This means you can use a variable, such as ${urn.4} shown in the third example below, to indicate a replaceable token in the fourth segment.
|
URN |
URL |
|---|---|
|
urnSegment1:urnSegment2 |
http://localhost:8080/active-bpel/services/MyService |
|
http://ServerA:8080/active-bpel/services/MyService |
http://ServerB:8081/active-bpel/services/MyService |
|
urn:localhost:service |
http://localhost:${AE-NODE1-PORT}/active-bpel/services/${urn.4} |
The last example in the table above shows how you can use variable substitution in an URL.
The URL values can optionally contain variables. The variables
can be environment variables accessible through java.lang.System.getProperties()
or a segment from the URN itself. The Apache Ant style variable
declaration of ${property} is used to identify
a property within the URL. Segments from the input URN value can
be referenced by using a special property naming convention of ${urn.offset} where offset is
a one-based offset identifying the segment from the input URN value
to use for substitution.
The URL in the mapping above contains two variables. The ${AE-NODE1-PORT} variable
pulls the port number from an environment variable. This variable
would need to be set as a -D parameter on the Java runtime environment
(e.g., java -D AE-NODE1-PORT =8080 ...) or
populated externally to the ActiveVOS server.
The ${urn.4} variable in the above
mapping references the fourth segment from the input URN value.
Notice that the URN contains only three segments. The URN in the
.pdd file should contain at least one other segment. A sample URN
might be:
urn:localhost:service:StoreService.
The value of the fourth segment of this URN is StoreService.
The resulting URL is:
http://localhost:8080/active-bpel/services/StoreService/.
Updating or Deleting a URN Mapping
To update a URN mapping, select the URN. The URN and URL values appear in the text boxes where you can edit them and select Update. Editing the URN results in a new URN mapping. It does not update the existing one. Only the URL can be updated.
To delete a mapping, select the check box next to the mapping and select Delete.
Copyright (c) 2004-2009 Active Endpoints, Inc.