How to pass URL value from KeyValueMapOperation to HTTPTargetConnection in TargetEndpoint

Team,

May I know how to pass URL value from KeyValueMapOperation to HTTPTargetConnection in TargetEndpoint? I have tried using uriRef, ref and with in URL tag tried mentioning the {env_target_endpoint} but didn't work. Appreciate a solution for this.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
<PreFlow name="PreFlow">
<Request/>
<Response/>
</PreFlow>
<Flows/>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<HTTPTargetConnection>
<URL uriRef="env_target_endpoint"/>
</HTTPTargetConnection>
</TargetEndpoint>

Solved Solved
0 1 80
1 ACCEPTED SOLUTION

@vysyarajusantos - You can set the values read from the KVM to a variable called "target.url". Make sure you are setting this in the TargetEndpoint configuration. Once this variable is set, it will override the URL you have in the TargetEndpoint. So you can set some dummy URL in the TargetEndpoint

For example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
    <PreFlow name="PreFlow">
        <Request>
            <Step>
                <Name>AM-SetVariables</Name>
            </Step>
        </Request>
        <Response/>
    </PreFlow>
    <Flows/>
    <PostFlow name="PostFlow">
        <Request/>
        <Response/>
    </PostFlow>
    <HTTPTargetConnection>
        <URL>https://abc.com</URL>
    </HTTPTargetConnection>
</TargetEndpoint>

Am setting the target.url variable in the AssignMessage policy in my example. That overrides the value of abc.com

There are many examples in the community you can look at if you just search for "target.url"

View solution in original post

1 REPLY 1

@vysyarajusantos - You can set the values read from the KVM to a variable called "target.url". Make sure you are setting this in the TargetEndpoint configuration. Once this variable is set, it will override the URL you have in the TargetEndpoint. So you can set some dummy URL in the TargetEndpoint

For example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
    <PreFlow name="PreFlow">
        <Request>
            <Step>
                <Name>AM-SetVariables</Name>
            </Step>
        </Request>
        <Response/>
    </PreFlow>
    <Flows/>
    <PostFlow name="PostFlow">
        <Request/>
        <Response/>
    </PostFlow>
    <HTTPTargetConnection>
        <URL>https://abc.com</URL>
    </HTTPTargetConnection>
</TargetEndpoint>

Am setting the target.url variable in the AssignMessage policy in my example. That overrides the value of abc.com

There are many examples in the community you can look at if you just search for "target.url"