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 Stadelmann Josef <jo...@axa-winterthur.ch> on 2012/04/04 11:12:37 UTC

[axis2] - CL versus SV and Sender versus Listeners-Receivers

While I am struggling with JAXWS, I tried to get the jaxws-samples
running, I have managed to get em running from the JSP, and they work,
to say, most of them work;

As one can see you can select synchronous invocations, asynchronous
invocations and "async on wire"

"Async on wire" does not work at all, if the SampleServices are built as
WAR and passed as WAR to Tomcat on my PC!

Tomcat receives and logs the HELLO Message but the Client logs for ever 
>> CLIENT: SEI Async invocation still not complete
>> CLIENT: SEI Async invocation still not complete
>> CLIENT: SEI Async invocation still not complete
. . .
What 
a)	server side AND
b)	client  side setup is missing?
c)	I don't know.
d)	it's an example toget hands on

So I toke the SampleClient project, using the debugger. 
I see, as reported in previous e-mails, that the client raises an Axis2
Fault Exception reporting that the port has not been detected. 
When, under which circumstances does autodetection of client side ports
work?

I learned reading axis2 transport documents that I need to specify a
port in the client-side-axis2.xml; 
I did so AND since then my SampleClient does no longer rais an Axis2
fault exception as said above, 
but reports the same way as the JSP Client does 
>> CLIENT: SEI Async invocation still not complete
>> CLIENT: SEI Async invocation still not complete
>> CLIENT: SEI Async invocation still not complete
. . .

Now I am as far as with the jaxws-samples/JSP Client


While I am struggling with that, reading missed parts of the widely
spread online documenation, I shuffer from the followin short-coming

The context or view-point is seldom documented when developers refer to
axis2.xml 
(To say - do they mean at any given time a client-axis2.xml or do they
most of the time mean a service-side-axis2.xml?)

EXAMPLE:
CL side has axis2.xml
SV side has axis2.xml 
CL side needs a TransportSender for request
	
SV side TransportReceiver or TransportListener to get request
	
SV side TransportSender should be used to return response
CL  side needs a TransportReceiver or TransportListener to receive
response
	BUT which one?

When I look what the SampleClient ListenerManager.init engageds, it is
the AxisServletListener.
Looking at the code of the AxisServletListener it is absolut unclear at
which End, CL or SV this AxisServletListener is used!

When I read the code, I think, that this AxisServletListener is made for
the server for the axis2-servlet
/**
 * {@link TransportListener} implementation for {@link AxisServlet}.
There will be one instance
 * of this class for each protocol (HTTP and/or HTTPS) accepted by the
Axis2-servlet.
 */
public class AxisServletListener implements TransportListener {

    private static final Log log =
LogFactory.getLog(AxisServletListener.class);
    
    /**
     * The URL scheme which can be either <tt>http</tt> or
<tt>https</tt>. This is the same as the
     * transport name.
     */
    private String scheme;
    
    /**
     * The port number. <code>-1</code> means that the port number will
be autodetected.
     */
    private int port;

But then, what Client Side TransportListener has to be engaged for async
http wire communication. 

SampleClient ListenerManager initializes all the transport listeners,
and as it stands, it engages the AxisServletListener. IS THAT WANTED AND
CORRECT?
we use the AxisServletListener at the Client?
        // initialize all the transport listeners
        for (TransportInDescription transportIn :
 
configctx.getAxisConfiguration().getTransportsIn().values()) {
            
            try {
                TransportListener listener = transportIn.getReceiver();
                if (listener != null &&
startedTransports.get(transportIn.getName()) == null) {
                    listener.init(configctx, transportIn);
                }
            } catch (Exception e) {
                log.error("Couldn't initialize the "
                        + transportIn.getName() + "transport listener",
e);
            }
        }


HOW DO WE TELL THE SERVER SIDE TRANSPORT ABOUT OUR CLIENT SIDE LISTENER
PORT in particular for jaxws asynchrounous wire transfers ?

Josef