You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by stlecho <st...@gmail.com> on 2008/02/04 14:48:13 UTC
Log of request/response on transport level
Hi,
When using Axis2 as a client, the logging of the HTTP requests and responses
messages can be activated by using the "httpclient" package in the log4j
configuration. When calling a webservice, the Axis2 client uses an HTTP
connection for the communication with the server. Activating the logging
allows us to see the "raw" SOAP message and some additional information (>>
"POST /fourthway/1.0/NoticeRequesterInterface HTTP/1.0[\r][\n]", >>
"SOAPAction: "http://..."[\r][\n]", ...). Once the webservice has been
called, a synchronous HTTP response is received that contains for instance:
"HTTP/1.1 200 OK".
I have tried to achieve the same logging information when using Axis2 as a
server, but without success :-(. What I would like to achieve, is the
following: log every HTTP request to my Axis2 server on the HTTP level, i.e.
the "raw" SOAP message that traverses the wire and log every HTTP response
that my Axis2 server sends to the client. I suppose that - similar as in the
client scenario - when a client calls my Axis2 server, an HTTP connection is
established that allows the transport of the SOAP message. Activating the
"httpclient" package in the log4j configuration of my Axis2 server, is not
sufficient to log this kind of information.
I've seen some posts and the explanation on how to add LoggingHandlers in
the Axis2 process flow, but I think that this kind of logging does not log
on the HTTP request/response level.
What's the best way to log HTTP requests and responses when using Axis2 as a
server ?
Regards, Stefan Lecho.
--
View this message in context: http://www.nabble.com/Log-of-request-response-on-transport-level-tp15268442p15268442.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 changes the content of my static WSDL
Posted by Afkham Azeez <af...@gmail.com>.
The other option would be to set your cluster IP address in the axis2.xml as
follows (by adding a parameter):
<parameter name="hostname" locked="true">my.cluster.ip</parameter>
Now, all generated port addresses will have your cluster IP.
Azeez
On Feb 5, 2008 3:26 PM, Upul Godage <up...@gmail.com> wrote:
> There is another parameter. modifyUserWSDLPortAddress Try adding this
> parameter also with the value false.
>
> <parameter name="useOriginalwsdl">true</parameter>
> <parameter name=" modifyUserWSDLPortAddress">false</parameter>
>
> Upul
>
>
> On Feb 5, 2008 3:20 PM, Jan Philipp Seng <Se...@traveltainment.de> wrote:
>
> > Hi,
> >
> > I am using Axis2 1.3 and have a problem with the static WSDL in my
> > service
> > archiv.
> > When retrieving the WSDL for my service
> > (http://IP:Port/axis2/services/MyService?wsdl), Axis changes the IPs in
> > section
> > <wsdl:service> / <wsdl:port> / <soap:address location="..." > althought
> > all
> > other static changes I made appear correctly. This is a problem because
> > I
> > need to put the cluster IP here, not the server IP. Does anybody know
> > how I
> > can do this?
> > In service.xml I switched to static WSDL in this way:
> > <parameter name="useOriginalwsdl">true</parameter>
> > I dont understand why Axis changes my static WSDL instead of just
> > delivering
> > it as it is.
> >
> > Thanks a lot,
> > Jan
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
--
Thanks
Afkham Azeez
http://azeez78.blogspot.com
http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
RE: Axis2 changes the content of my static WSDL
Posted by Jan Philipp Seng <Se...@traveltainment.de>.
Thank you for you help. My problem is resolved now.
Jan
_____
From: Upul Godage [mailto:upulg.dev@gmail.com]
Sent: Tuesday, February 05, 2008 10:56 AM
To: axis-user@ws.apache.org
Subject: Re: Axis2 changes the content of my static WSDL
There is another parameter. modifyUserWSDLPortAddress Try adding this
parameter also with the value false.
<parameter name="useOriginalwsdl">true</parameter>
<parameter name=" modifyUserWSDLPortAddress">false</parameter>
Upul
On Feb 5, 2008 3:20 PM, Jan Philipp Seng <Se...@traveltainment.de> wrote:
Hi,
I am using Axis2 1.3 and have a problem with the static WSDL in my service
archiv.
When retrieving the WSDL for my service
(http://IP:Port/axis2/services/MyService?wsdl), Axis changes the IPs in
section
<wsdl:service> / <wsdl:port> / <soap:address location="..." > althought all
other static changes I made appear correctly. This is a problem because I
need to put the cluster IP here, not the server IP. Does anybody know how I
can do this?
In service.xml I switched to static WSDL in this way:
<parameter name="useOriginalwsdl">true</parameter>
I dont understand why Axis changes my static WSDL instead of just delivering
it as it is.
Thanks a lot,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Axis2 changes the content of my static WSDL
Posted by Upul Godage <up...@gmail.com>.
There is another parameter. modifyUserWSDLPortAddress Try adding this
parameter also with the value false.
<parameter name="useOriginalwsdl">true</parameter>
<parameter name=" modifyUserWSDLPortAddress">false</parameter>
Upul
On Feb 5, 2008 3:20 PM, Jan Philipp Seng <Se...@traveltainment.de> wrote:
> Hi,
>
> I am using Axis2 1.3 and have a problem with the static WSDL in my service
> archiv.
> When retrieving the WSDL for my service
> (http://IP:Port/axis2/services/MyService?wsdl), Axis changes the IPs in
> section
> <wsdl:service> / <wsdl:port> / <soap:address location="..." > althought
> all
> other static changes I made appear correctly. This is a problem because I
> need to put the cluster IP here, not the server IP. Does anybody know how
> I
> can do this?
> In service.xml I switched to static WSDL in this way:
> <parameter name="useOriginalwsdl">true</parameter>
> I dont understand why Axis changes my static WSDL instead of just
> delivering
> it as it is.
>
> Thanks a lot,
> Jan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
Axis2 changes the content of my static WSDL
Posted by Jan Philipp Seng <Se...@traveltainment.de>.
Hi,
I am using Axis2 1.3 and have a problem with the static WSDL in my service
archiv.
When retrieving the WSDL for my service
(http://IP:Port/axis2/services/MyService?wsdl), Axis changes the IPs in
section
<wsdl:service> / <wsdl:port> / <soap:address location="..." > althought all
other static changes I made appear correctly. This is a problem because I
need to put the cluster IP here, not the server IP. Does anybody know how I
can do this?
In service.xml I switched to static WSDL in this way:
<parameter name="useOriginalwsdl">true</parameter>
I dont understand why Axis changes my static WSDL instead of just delivering
it as it is.
Thanks a lot,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Log of request/response on transport level
Posted by stlecho <st...@gmail.com>.
Your explication is true for Axis2 v1.3, but unfortunately we are using Axis2
v1.1.1. In this version the MessageContext is only initialized with the HTTP
Request, but not with the HTTP Response. I'll have a look if we can migrate
to Axis2 v1.3.
Regards, Stefan Lecho.
Afkham Azeez wrote:
>
> In the AxisServlet, for each request received, the HTTP Request & Response
> are set in the MessageContext;
>
> msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, request);
> msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, response);
>
> So I believe that you can have a custom handler in the MessageOut phase,
> and
> log the HTTP request & response.
>
> HTH
> Azeez
>
> On Feb 4, 2008 7:18 PM, stlecho <st...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> When using Axis2 as a client, the logging of the HTTP requests and
>> responses
>> messages can be activated by using the "httpclient" package in the log4j
>> configuration. When calling a webservice, the Axis2 client uses an HTTP
>> connection for the communication with the server. Activating the logging
>> allows us to see the "raw" SOAP message and some additional information
>> (>>
>> "POST /fourthway/1.0/NoticeRequesterInterface HTTP/1.0[\r][\n]", >>
>> "SOAPAction: "http://..."[\r][\n]", ...). Once the webservice has been
>> called, a synchronous HTTP response is received that contains for
>> instance:
>> "HTTP/1.1 200 OK".
>>
>> I have tried to achieve the same logging information when using Axis2 as
>> a
>> server, but without success :-(. What I would like to achieve, is the
>> following: log every HTTP request to my Axis2 server on the HTTP level,
>> i.e.
>> the "raw" SOAP message that traverses the wire and log every HTTP
>> response
>> that my Axis2 server sends to the client. I suppose that - similar as in
>> the
>> client scenario - when a client calls my Axis2 server, an HTTP connection
>> is
>> established that allows the transport of the SOAP message. Activating the
>> "httpclient" package in the log4j configuration of my Axis2 server, is
>> not
>> sufficient to log this kind of information.
>>
>> I've seen some posts and the explanation on how to add LoggingHandlers in
>> the Axis2 process flow, but I think that this kind of logging does not
>> log
>> on the HTTP request/response level.
>>
>> What's the best way to log HTTP requests and responses when using Axis2
>> as
>> a
>> server ?
>>
>> Regards, Stefan Lecho.
>> --
>> View this message in context:
>> http://www.nabble.com/Log-of-request-response-on-transport-level-tp15268442p15268442.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> --
> Thanks
> Afkham Azeez
>
> http://azeez78.blogspot.com
> http://www.wso2.org
> GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
>
>
--
View this message in context: http://www.nabble.com/Log-of-request-response-on-transport-level-tp15268442p15285517.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Log of request/response on transport level
Posted by Afkham Azeez <af...@gmail.com>.
In the AxisServlet, for each request received, the HTTP Request & Response
are set in the MessageContext;
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, request);
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, response);
So I believe that you can have a custom handler in the MessageOut phase, and
log the HTTP request & response.
HTH
Azeez
On Feb 4, 2008 7:18 PM, stlecho <st...@gmail.com> wrote:
>
> Hi,
>
> When using Axis2 as a client, the logging of the HTTP requests and
> responses
> messages can be activated by using the "httpclient" package in the log4j
> configuration. When calling a webservice, the Axis2 client uses an HTTP
> connection for the communication with the server. Activating the logging
> allows us to see the "raw" SOAP message and some additional information
> (>>
> "POST /fourthway/1.0/NoticeRequesterInterface HTTP/1.0[\r][\n]", >>
> "SOAPAction: "http://..."[\r][\n]", ...). Once the webservice has been
> called, a synchronous HTTP response is received that contains for
> instance:
> "HTTP/1.1 200 OK".
>
> I have tried to achieve the same logging information when using Axis2 as a
> server, but without success :-(. What I would like to achieve, is the
> following: log every HTTP request to my Axis2 server on the HTTP level,
> i.e.
> the "raw" SOAP message that traverses the wire and log every HTTP response
> that my Axis2 server sends to the client. I suppose that - similar as in
> the
> client scenario - when a client calls my Axis2 server, an HTTP connection
> is
> established that allows the transport of the SOAP message. Activating the
> "httpclient" package in the log4j configuration of my Axis2 server, is not
> sufficient to log this kind of information.
>
> I've seen some posts and the explanation on how to add LoggingHandlers in
> the Axis2 process flow, but I think that this kind of logging does not log
> on the HTTP request/response level.
>
> What's the best way to log HTTP requests and responses when using Axis2 as
> a
> server ?
>
> Regards, Stefan Lecho.
> --
> View this message in context:
> http://www.nabble.com/Log-of-request-response-on-transport-level-tp15268442p15268442.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Thanks
Afkham Azeez
http://azeez78.blogspot.com
http://www.wso2.org
GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760