<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Get IHttpRequest for SOAP web service</title><link>https://answers.axonivy.com/questions/1594/get-ihttprequest-for-soap-web-service</link><description>&lt;p&gt;Hello everyone!&lt;/p&gt;
&lt;p&gt;I would like to get an object that implements ch.ivyteam.ivy.request.IHttpRequest in order to extract the remote client's hostname. &lt;/p&gt;
&lt;p&gt;A great solution for this problem has already been described here:
&lt;a href="http://answers.axonivy.com/questions/1055/access-ihttprequest-object"&gt;http://answers.axonivy.com/questions/1055/access-ihttprequest-object&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;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").&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/Process.png"&gt;&lt;/p&gt;
&lt;p&gt;I have also tried to modify the generated JAX-WS class to achieve the same result (with no success so far).&lt;/p&gt;
&lt;p&gt;What is the right way of doing this under Ivy 5.1?&lt;/p&gt;
&lt;p&gt;Thank you in advance!&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1594/get-ihttprequest-for-soap-web-service" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 16 Dec 2015 14:56:41 -0500</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/1594/get-ihttprequest-for-soap-web-service/1597</link><description>&lt;p&gt;I have a solution, but this is absolutely &lt;strong&gt;not&lt;/strong&gt; public API and could be changed in every ivy Version.
IvyScript version:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;HttpServletRequest request = DiCore.getGlobalInjector().getInstance(HttpServletRequest.class) as HttpServletRequest;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Wed, 16 Dec 2015 14:56:41 -0500</pubDate><guid>https://answers.axonivy.com/questions/1594/get-ihttprequest-for-soap-web-service/1597</guid></item></channel></rss>