Forums Register Login

How to connect to webservice when there is middle layer between client system and webservices?

+Pie Number of slices to send: Send
Hi,

I have a requirement to consume the webservices.

I have genereted the client using axis2 and I could consume it if it can be accessed directly.

Client --> Webservice

I have an issue when there is an intermediate layer.

Client - -> Intermidate Layer(Http Request Redirector) -- > Webservice.

Please advice whether it can be accessed with the client generated or any other settings required on the axis2 side?

Is there any other alternate way to communicate with axis2?



Thank
Vinoth
+Pie Number of slices to send: Send
It's not an Axis2 issue, as this redirector is some piece of 3rd party software.

Does the intermediate layer perform an actual client-side HTTP redirect? If so, there is no way to make this work, as that would always be an HTTP GET, whereas SOAP relies on POST. You would have to rewrite the client so that it gets the new URL from the redirect, and then sends the original request to the new address.

Why is the redirector in place? Why can't the WS client just access the new server-side URL?
+Pie Number of slices to send: Send
Hi Ulf Dittmer,

Thanks.
Yes. intermediate layer perform an actual client-side HTTP redirect.
It connects to webservice and receives the response.

They have provided new http URL(intermediate layer) to access the webservice. The request xml sent to http URL provided and from there it is sent to actual webservices.
Please advice on the approach to write the client code. can this be done using Restful or xml over http.

Provided intermediate layer URL is accessible from soap UI and we could send the request and receive the response.

This redirection in place as the webservice is not in customer network and they want every request to go through their path.

Thanks
VInoth
+Pie Number of slices to send: Send
 

This redirection in place as the webservice is not in customer network and they want every request to go through their path.


This doesn't make sense. If the WS is not reachable by the client network then a straight HTTP redirect will not work (irrespective of the GET/POST issue I mentioned). It sounds more like a server-side redirect, or a proxy, to give it a more commonly used name.
+Pie Number of slices to send: Send

Hi,

WAS server doesn't have network connection to WS . But there is network connection from intermediate layer system.

That is the way it is designed and they say it is consumed by other projects.

I think we can consider it is like middle layer or proxy layer.

Please advice which approach can be used to consume it.


Thanks
Vinoth
+Pie Number of slices to send: Send
 

I think we can consider it is like middle layer or proxy layer.


I see. That clashes with your earlier statement of "intermediate layer perform an actual client-side HTTP redirect." - they can't both be true.

If the redirector is a proxy, then the client should run as is. What exactly happens if you do that?
+Pie Number of slices to send: Send
It doesnt work directly.

It works through HttpClient. Thanks
+Pie Number of slices to send: Send
Saying "it doesn't work" gives us precisely nothing to work with. What, exactly, are you doing, and what, exactly, is happening as a result? Same for "it works through HttpClient", where I have no idea what that means.
+Pie Number of slices to send: Send
I meant, the middle layer was consuming the webservice.

Client application required to send http request middle layer instead of soap.

Used HttpClient example from http://stackoverflow.com/questions/2735839/posting-xml-request-in-java to make it work.
+Pie Number of slices to send: Send
 

I meant, the middle layer was consuming the webservice. Client application required to send http request middle layer instead of soap.


Right, the middle layer would be the direct consumer of the. If it is not an exact proxy -meaning, it does not expose the consumed WS in the same way as the original WS- then you need to write a client for whatever API the middle layer *does* expose. If that's not SOAP, then a SOAP client obviously would not work. But if you were able to make HttpClient work, I'm wondering what exactly you're looking for?
Yes, my master! Here is the tiny ad you asked for:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1107 times.
Similar Threads
In Process Web service
Using different Content Types for REST Webservices
Create html form using json
low disk space problem caused by AXIS2 temp files
New To Web Service
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:54:04.