How to read Target Server which configured under Environment Configuration in Edge ?

Not applicable

I have configured Target Server under Environment Configuration like Target_Proxy_Endpoint = http://xxxx.com:9082/v1/r1.

I tried to access above configuration in Target Endpoints default flow in 2 ways. But Both options did not work and returns Service "faultstring": "The Service is temporarily unavailable". Did not find Target Endpoint while Trace. what I am wrong here ?

1) This shows Syntax Error:

<HTTPTargetConnection>
        <Properties/>        
        <URL>{Target_Proxy_Endpoint}</URL>
</HTTPTargetConnection>

2) Next I tried with <LoadBalancer>

<HTTPTargetConnection><LoadBalancer><Algorithm>RoundRobin</Algorithm><Server name="Target_Proxy_Endpoint"/></LoadBalancer><Path>/test</Path></HTTPTargetConnection>												
Solved Solved
0 8 925
1 ACCEPTED SOLUTION

HI @Kumaresan Sithambaram

If your target URL is http://abc.com:9082/v1/r1/test, then set just the host and port in the Target Server under Environment Configurations - in this case abc.com and 9082, so the TargetEndpoint will be

2893-screen-shot-2016-06-09-at-15709-pm.png

<HTTPTargetConnection>
    <LoadBalancer>
        <Algorithm>RoundRobin</Algorithm>
        <Server name="target1"/>
    </LoadBalancer>
    <Path>/v1/r1/test</Path>
</HTTPTargetConnection>

or

If you are using direct Target URL, you can set the URL directly in the TargetEndpoint config

<HTTPTargetConnection>
	<URL>http://abc.com:9082/v1/r1/test</URL>
</HTTPTargetConnection>

View solution in original post

8 REPLIES 8

HI @Kumaresan Sithambaram

If your target URL is http://abc.com:9082/v1/r1/test, then set just the host and port in the Target Server under Environment Configurations - in this case abc.com and 9082, so the TargetEndpoint will be

2893-screen-shot-2016-06-09-at-15709-pm.png

<HTTPTargetConnection>
    <LoadBalancer>
        <Algorithm>RoundRobin</Algorithm>
        <Server name="target1"/>
    </LoadBalancer>
    <Path>/v1/r1/test</Path>
</HTTPTargetConnection>

or

If you are using direct Target URL, you can set the URL directly in the TargetEndpoint config

<HTTPTargetConnection>
	<URL>http://abc.com:9082/v1/r1/test</URL>
</HTTPTargetConnection>

@Sai Saran Vaidyanathan Thanks for your Quick Reply.

I have updated my Target Endpoints default xml with,

<HTTPTargetConnection>
    <LoadBalancer>
        <Algorithm>RoundRobin</Algorithm>
        <Server name="target1"/>
    </LoadBalancer>
    <Path>/v1/r1/test</Path>
</HTTPTargetConnection>

But Still No Luck. I get Response like,

{"Envelope": {
   "encodingStyle": "http://schemas.xmlsoap.org/soap/encoding/",
   "Body": {"Fault":    {
      "faultcode": "soap:Server",
      "faultstring": "The Service is temporarily unavailable",
      "faultactor": {},
      "detail": {"source": {"errorcode": "messaging.adaptors.http.flow.ServiceUnavailable"}}
   }}
}}

And Trace shows like below 503 Service unavailable at the point "Response Send to Client".

2895-capture31.png

Can you please confirm you created the Target Server on the appropriate environment you are running this API on ? Target Server configuration is different for each env. Possible that you created the target on "test" but testing it on "prod" for example.

Can you also share the screenshot of the TargetServer config

Yes, I verified I configured in "dev" and my proxy deployed same in "dev" itself.

For sharing, I have updated my original with dummy. but this is the format.

2897-capture32.png

HI

Please remove the protocol (http://) in your Target Server config (refer my screenshot), just have the host.

abc.com is just an example. I assume you are passing the exact host info on your config 🙂

Saying this as I don't want abc.com to mislead you 🙂

@Sai Saran Vaidyanathan

Thank You !! That Solves the Problem. I appreciate your help.

@Sai Saran Vaidyanathan, I do not know you can answer this on this same thread. But, it's following question and related question. Now, the Path Suffix is concatenated with Target endpoint and fails.

I have path suffix properties set to false. But still fails.

<HTTPTargetConnection>
        <LoadBalancer>
            <Algorithm>RoundRobin</Algorithm>
            <Server name="Target_Proxy_Endpoint"/>
        </LoadBalancer>
        <Path>/ds/tmang</Path>
        <Properties>
            <Property name="target.copy.pathsuffix">false</Property>
            <Property name="success.codes">1xx,2xx,3xx,4xx,5xx,6xx</Property>
        </Properties>
    </HTTPTargetConnection>

@Kumaresan Sithambaram

Please refer to this post