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 Guido Wischrop <wi...@googlemail.com> on 2007/11/15 18:36:57 UTC

[Axis2] How to add a phase by code on a Axis2 client

Hello,
I'm using axis2 1.3 and I want to log the SOAP envelop on outgoing
client messages without using the HTTPClient logger. So I want to add
a Axis2LogPhase. Can I do this by code i.e. without creating a
axis2.xml? I looked in the api doc and I found the PhasesInfo class
and I'm asking if this would work:

//-------untested--------

        AxisConfiguration axisConf =
serviceStub._getServiceClient().getAxisConfiguration();
        ArrayList<Phase> phasesList = axisConf.getPhasesInfo().getOUTPhases();
        Phase logPhase = new Phase("Axis2LogPhase");
        logPhase.addHandler(new Axis2LogHandler());
        phasesList.add(logPhase);
        axisConf.getPhasesInfo().setOUTPhases(phasesList);

//-------untested off--------

This might be totally wrong.

Thanks for any help,
Guido

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org