Hello everyone!

I would like to get an object that implements ch.ivyteam.ivy.request.IHttpRequest in order to extract the remote client's hostname.

A great solution for this problem has already been described here: http://answers.axonivy.com/questions/1055/access-ihttprequest-object

It works well when the type is set to "Business Process". However, I cannot cast the ivy.request to an IHttpRequest because it's always a ch.ivyteam.ivy.request.impl.ProcessRequest (since I'm using a different process type called "Web Service Process").

alt text

I have also tried to modify the generated JAX-WS class to achieve the same result (with no success so far).

What is the right way of doing this under Ivy 5.1?

Thank you in advance!

asked 16.12.2015 at 12:37

ivyUser's gravatar image

ivyUser
26225
accept rate: 50%


I have a solution, but this is absolutely not public API and could be changed in every ivy Version. IvyScript version:

HttpServletRequest request = DiCore.getGlobalInjector().getInstance(HttpServletRequest.class) as HttpServletRequest;
link

answered 16.12.2015 at 14:56

Christian%20Strebel's gravatar image

Christian St... ♦
3.2k21236
accept rate: 89%

It works perfectly.

Thanks a lot, Christian!

(16.12.2015 at 15:32) ivyUser ivyUser's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×122
×42
×8

Asked: 16.12.2015 at 12:37

Seen: 971 times

Last updated: 16.12.2015 at 15:32