apache camel - Http request and response lost after receiving Response from Web Service? -


I have an Apache camel application that talks to the web service, it's purely an integration (mediation) application. Take the last request and call it a SOAP message (using VM templates) and call the web service. Get feedback from the web service, convert it to JSON and send it back to our customer.

REST ----> Conversion to SOAP Reiki (velocity template) ----> WS ----> Call Get feedback ----> convert to JSON ---- > Respond to the caller.

We are using सर्वोपरਾਲ endpoint to obtain a request from our customer. Before we call the web service, you can get the HTTPSation object from the Exchange:

  HTTPSVRTREY REC = Exchange.Jet IN (). Beacode (HTTPSAllTeuast.class); Http session session = req.getSession (); However, the problem is that I can not get HTTPSession from the exchange after receiving a response from the web service. If I check the exchange object in debug mode, Exchange.getIn () is the default message type instead of HttpMessage. That's why I think I loose requests and feedback objects. 

I tried to set the exchange pattern for the inoc, but that does not help. The only solution I can get is to store the original text in the title or an asset in the message and it is to finally recover . But I think that could be a better solution than that.

Can anyone help please?

Note: We need an HTTP session so that we have information about this session such as session ID created on the WS for the session created by our request, we do not know about our calling session on WS , And need to place on our application to keep this mapping information. The HTTP session meets this requirement. Is there a better way?

You can store an http session as an Exchange property, camels are available for each exchanges These properties are copied in, so when you need it, you can access it on the way.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -