<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Log soap request from web service call step</title><link>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step</link><description>&lt;p&gt;Hello ivy Team&lt;/p&gt;
&lt;p&gt;I've got an issue in Web Service Call Step behind a firewall. It is not allowed  to install Wireshark or similar tool on the (outsourced) server.&lt;/p&gt;
&lt;p&gt;Is it possible to get the content of Soap-Request? derectly in ivy-log or something like that.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 18 Dec 2013 09:22:09 -0500</lastBuildDate><item><title>Comment by Reguel Wermelinger on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step#216</link><description>&lt;p&gt;The ILC file does not work with the Designer. This is only meant for the Server. If you wan't to provide additional VM options for the Designer, then you should modify the "Xpert.ivy Designer.ini" in the root folder of your Designer installation.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Wed, 18 Dec 2013 09:22:09 -0500</pubDate><guid>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step#216</guid></item><item><title>Comment by Sergej on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step#215</link><description>&lt;p&gt;Thank you for example of a possible solution.&lt;/p&gt;
&lt;p&gt;I tested the VM options with Xpert.ivy Designer (4.3.18).&lt;/p&gt;
&lt;p&gt;.ilc file with following content:&lt;/p&gt;
&lt;p&gt;ivy.vm.additional.options=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog ...etc&lt;/p&gt;
&lt;p&gt;But I've got no logs from Axis2 on this way. (Runtime Log &amp;amp; ch.team.ivy.log on a local hd)&lt;/p&gt;
&lt;p&gt;Afterwards I solved the problem with wireshark.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergej</dc:creator><pubDate>Tue, 17 Dec 2013 16:15:11 -0500</pubDate><guid>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step#215</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step/210</link><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;Webservice calls in Xpert.ivy are by default executed with Axis2. To generate debug log outputs in Axis2 the following VM arguments (&lt;a href="http://stackoverflow.com/a/3034130/1945922"&gt;stackoverflow&lt;/a&gt;) have to be set:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug
-Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Additional VM arguments can be set in Xpert.ivy within the Launch Configuration (*.ilc file). More informations to launch configurations can be found in the &lt;a href="http://www.xpertivy.ch/releases/Xpert.ivy/5.0.latest/documents/ServerGuideHtml/ivy.server.toolreference.ilc.html"&gt;Server Guide, Chapter 8&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the VM arguments are properly set, the output generated by a webservice call could look as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;2013/12/17 08:02:00:003 CET [DEBUG] DefaultHttpParams - Set parameter http.connection.timeout = 600000
2013/12/17 08:02:00:003 CET [DEBUG] DefaultHttpParams - Set parameter http.socket.timeout = 600000
2013/12/17 08:02:00:003 CET [DEBUG] DefaultHttpParams - Set parameter http.socket.timeout = 600000
2013/12/17 08:02:00:003 CET [DEBUG] MultiThreadedHttpConnectionManager - HttpConnectionManager.getConnection:  config = HostConfiguration[host=http://zugtstweb:8080], timeout = 0
2013/12/17 08:02:00:003 CET [DEBUG] MultiThreadedHttpConnectionManager - Allocating new connection, hostConfig=HostConfiguration[host=http://zugtstweb:8080]
2013/12/17 08:02:00:003 CET [DEBUG] HttpConnection - Open connection to zugtstweb:8080
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "POST /axis2/services/StockQuoteService.StockQuoteServiceHttpEndpoint/getPrice HTTP/1.1[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] HttpMethodBase - Adding Host request header
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "Content-Type: application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "SOAPAction: ""[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "User-Agent: Axis2[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "Host: zugtstweb:8080[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "Content-Length: 14[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;gt;&amp;gt; "[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;gt;&amp;gt; "symbol=myStuff"
2013/12/17 08:02:00:004 CET [DEBUG] EntityEnclosingMethod - Request body sent
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;lt;&amp;lt; "HTTP/1.1 200 OK[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;lt;&amp;lt; "Server: Apache-Coyote/1.1[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;lt;&amp;lt; "Content-Type: application/xml;charset=UTF-8[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;lt;&amp;lt; "Transfer-Encoding: chunked[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - &amp;lt;&amp;lt; "Date: Tue, 17 Dec 2013 07:02:00 GMT[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "6"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "f"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "&amp;lt;"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "n"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "s"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; ":getPriceResponse xmlns:ns=""
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "http://quickstart.samples/xsd"&amp;gt;&amp;lt;ns:return&amp;gt;42.0&amp;lt;/ns:return&amp;gt;&amp;lt;/ns:getPriceResponse&amp;gt;"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "0"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - &amp;lt;&amp;lt; "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] HttpMethodBase - Resorting to protocol version default close connection policy
2013/12/17 08:02:00:020 CET [DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
2013/12/17 08:02:00:020 CET [DEBUG] HttpConnection - Releasing connection back to connection manager.
2013/12/17 08:02:00:020 CET [DEBUG] MultiThreadedHttpConnectionManager - Freeing connection, hostConfig=HostConfiguration[host=http://zugtstweb:8080]
2013/12/17 08:02:00:020 CET [DEBUG] IdleConnectionHandler - Adding connection at: 1387263720020
2013/12/17 08:02:00:020 CET [DEBUG] MultiThreadedHttpConnectionManager - Notifying no-one, there are no waiting threads
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 17 Dec 2013 08:16:09 -0500</pubDate><guid>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step/210</guid></item><item><title>Comment by Sergej on Daniel Oechslin's answer</title><link>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step#209</link><description>&lt;p&gt;Thanks for reply.&lt;/p&gt;
&lt;p&gt;But Response is too late. Request (as XML) is what I'm looking for.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergej</dc:creator><pubDate>Mon, 16 Dec 2013 12:50:29 -0500</pubDate><guid>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step#209</guid></item><item><title>Answer by Daniel Oechslin</title><link>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step/207</link><description>&lt;p&gt;I mixed request and response. Here the new answer:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    Map&amp;lt;String,Object&amp;gt; map= Request.getCurrentRequest().getParameters();
    Iterator it = map.entrySet().iterator();
    while (it.hasNext()) {
        Map.Entry pairs = (Map.Entry)it.next();
        Ivy.log().debug(pairs.getKey() + " = " + pairs.getValue());
        it.remove();
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This should print the all parameters of the request.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Oechslin</dc:creator><pubDate>Mon, 16 Dec 2013 11:26:02 -0500</pubDate><guid>https://answers.axonivy.com/questions/206/log-soap-request-from-web-service-call-step/207</guid></item></channel></rss>