Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8604257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:31:42+00:00 2026-06-12T02:31:42+00:00

I am having the next problem: I want to log the SOAP requests/responses that

  • 0

I am having the next problem:

I want to log the SOAP requests/responses that land on my web service (server side). Trying to configure my web service in the wsdd file. I am always landing on pages like the next one:

How to use the org.apache.axis.handlers.LogHandler

Which recommends to configure the Apeche Axis LogHandler to log the request/response. That is not valid for me, since a)there is no way to link the log4j there, and b)I just am not able to make it work.

Does anyone know a way to make my log4j to log the request/responses?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T02:31:43+00:00Added an answer on June 12, 2026 at 2:31 am

    So after hours or Googling out there in the web, I decided to get adventurous and program my own handler. Is much easier than expected.

    I made a class that extends the abstract class BasicHandler (org.apache.axis.handlers.BasicHandler), and implements the invoke method loging the request or the response. Here is my class, which I have baptized as SOAPLogHandler :

    package com.mypackage.axishandlers;
    
    import org.apache.axis.AxisFault;
    import org.apache.axis.MessageContext;
    import org.apache.axis.handlers.BasicHandler;
    import org.apache.log4j.Logger;
    
    public class SOAPLogHandler extends BasicHandler {
    
    private static Logger LOG= Logger.getLogger(SOAPLogHandler.class);
    private static final long serialVersionUID = 1L;
    
    @Override
    public void invoke(MessageContext msgContext) throws AxisFault {
        if(msgContext.getResponseMessage() != null && msgContext.getResponseMessage().getSOAPPart() != null) {
            LOG.info(" Response = " + msgContext.getResponseMessage().getSOAPPartAsString());
        } else {
            if(msgContext.getRequestMessage() != null && msgContext.getRequestMessage().getSOAPPartAsString() != null) {
                LOG.info(" Request = " + msgContext.getRequestMessage().getSOAPPartAsString());
            }    
        }
    }  }
    

    The idea is, to log first the request, and when processed, log the response. So, in the server-config.wsdd (or the wsdd file from your client if you are in the client side), we have to add a handler pointing to that class, and configure it to uses in the request/response chain:

    1st add the handler

     <handler name="log" type="java:com.mypackage.axishandlers.SOAPLogHandler"/>
    

    2nd add the use of that handler to the request/response from the http transport (focus on the log handler)

     <transport name="http">
      <requestFlow>
       <handler type="log"/>
       <handler type="URLMapper"/>
       <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
      </requestFlow>
      <responseFlow>
       <handler type="log"/>
      </responseFlow>
    ...
     </transport>
    

    With that, the magic should be done, and you should receive a pretty log from the request/responses!

    Disclaimer: I am not really sure from what will happend if you use some kind of SOAP multipart thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a little problem here, I want to use next() but I want
i am having some problem with position: absolute div. IE7 displays it next to
I am newbie in Spring Security 3, and I am having the next problem.
today i'm having a little problem, that probably is nothing for pros here :)
The problem I am having is that I would like to call a method
I'm having a problem trying to add an object to an object context in
the problem that im having is this that i am able to create a
I am having a problem with arrays, I want an object to be picked
The problem I'm having is that a Vehicle object is not being deleted from
I'm having a problem understanding the shift/reduce confict for a grammar that I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.