You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ward Harold <Wa...@us.ibm.com> on 2002/01/15 18:22:01 UTC

Axis and session oriented transports

I'm trying to use Axis to implement the SOAP binding to BEEP described in
http://www.ietf.org/internet-drafts/draft-etal-beep-soap-05.txt. BEEP,
http://www.ietf.org/rfc/rfc3080.txt?number=3080, is "a generic application
protocol kernel for connection oriented asynchronous interactions". Without
going into too much detail the basic model for BEEP is that two peers
establish a session between them and then create one or more channels, each
bound to a particular profile, e.g., the SOAP binding to BEEP, over which
they interact. I'm having trouble convincing the Axis client-side engine to
use the BEEP session that I've created for it. Here's what I've tried thus
far, I modified the samples.tcp.AdminClient to use a SoapBeepSender, which
takes a session and service name as parameters, instead of a TCPSender. See
line **** in the code below:

package com.ibm.wkh.beep.soap.profile.test;

import org.apache.axis.client.AdminClient;
import org.apache.axis.client.Call;
import org.apache.axis.SimpleTargetedChain;

import org.beepcore.beep.transport.tcp.TCPSessionCreator;
import org.beepcore.beep.core.ProfileRegistry;
import org.beepcore.beep.core.Session;

import com.ibm.wkh.beep.soap.transport.SoapBeepTransport;
import com.ibm.wkh.beep.soap.transport.SoapBeepSender;

public class TestSpike extends AdminClient {
      private static final String LOCALHOST = "localhost";
      private static final int PORT = 3006;

      public static void main(String[] args) {
            Call.addTransportPackage("com.ibm.wkh.beep.soap.transport");
            Call.setTransportForProtocol("soap.beep", SoapBeepTransport.
class);

            try {
                  ProfileRegistry pr = new ProfileRegistry();
                  Session session = TCPSessionCreator.initiate(LOCALHOST,
PORT, pr);

                  AdminClient client = new AdminClient(System.err);
                  SimpleTargetedChain c = new SimpleTargetedChain();
                  c.setPivotHandler(new SoapBeepSender(session,
"AdminService")); // ****
                  client.getCall().getService().getEngine().deployTransport
("soap.beep", c);

                  System.out.println(client.process(args));
            } catch (Exception e) {
                  System.err.println(e);
                  e.printStackTrace(System.err);
            }
      }
}

Unfortunately it seems that AxisEngine.deployTransport doesn't actually use
the SoapBeepSender I created. Instead it just uses it to derive a pivot
handler QName for the WSDDTransport that gets registered with the engine.
At invocation time the client engine uses that QName to create a new
SoapBeepHandler but since it's using the no-args constructor it doesn't
have the necessary session information and so is useless for communication.

I am new to Axis, I was trying to use the Apache SOAP code but it is way to
HTTP oriented, so it's entirely possible that I'm missing something here.
Any help in clearing this hurdle would be much appreciated.

... WkH

p.s. for what it's worth I think SOAP/BEEP provides a much nicer foundation
for Web Services comms than HTTP.