Hello ivy Team

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.

Is it possible to get the content of Soap-Request? derectly in ivy-log or something like that.

Regards

asked 16.12.2013 at 10:15

Sergej's gravatar image

Sergej
(suspended)
accept rate: 0%

edited 18.02.2014 at 16:40

Flavio%20Sadeghi's gravatar image

Flavio Sadeghi ♦♦
(suspended)


Hi

Webservice calls in Xpert.ivy are by default executed with Axis2. To generate debug log outputs in Axis2 the following VM arguments (stackoverflow) have to be set:

-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

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 Server Guide, Chapter 8.

If the VM arguments are properly set, the output generated by a webservice call could look as follows:

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 - >> "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 - >> "Content-Type: application/x-www-form-urlencoded; charset=UTF-8[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - >> "SOAPAction: ""[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - >> "User-Agent: Axis2[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - >> "Host: zugtstweb:8080[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - >> "Content-Length: 14[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - >> "[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - >> "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 - << "HTTP/1.1 200 OK[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - << "Server: Apache-Coyote/1.1[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - << "Content-Type: application/xml;charset=UTF-8[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - << "Transfer-Encoding: chunked[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] header - << "Date: Tue, 17 Dec 2013 07:02:00 GMT[\r][\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "6"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "f"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "<"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "n"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "s"
2013/12/17 08:02:00:004 CET [DEBUG] content - << ":getPriceResponse xmlns:ns=""
2013/12/17 08:02:00:004 CET [DEBUG] content - << "http://quickstart.samples/xsd"><ns:return>42.0</ns:return></ns:getPriceResponse>"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "0"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\n]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\r]"
2013/12/17 08:02:00:004 CET [DEBUG] content - << "[\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
link

answered 17.12.2013 at 08:16

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

Thank you for example of a possible solution.

I tested the VM options with Xpert.ivy Designer (4.3.18).

.ilc file with following content:

ivy.vm.additional.options=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog ...etc

But I've got no logs from Axis2 on this way. (Runtime Log & ch.team.ivy.log on a local hd)

Afterwards I solved the problem with wireshark.

(17.12.2013 at 16:15) Sergej Sergej's gravatar image

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.

(18.12.2013 at 09:22) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

I mixed request and response. Here the new answer:

    Map<String,Object> 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();
    }

This should print the all parameters of the request.

link

answered 16.12.2013 at 11:26

Daniel%20Oechslin's gravatar image

Daniel Oechslin
(suspended)
accept rate: 39%

edited 16.12.2013 at 13:04

Thanks for reply.

But Response is too late. Request (as XML) is what I'm looking for.

(16.12.2013 at 12:50) Sergej Sergej'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:

×48
×28

Asked: 16.12.2013 at 10:15

Seen: 6,811 times

Last updated: 18.02.2014 at 16:40