FileDocCategorySizeDatePackage
JavaSender.javaAPI DocApache Axis 1.42772Sat Apr 22 18:57:28 BST 2006org.apache.axis.transport.java

JavaSender

public class JavaSender extends org.apache.axis.handlers.BasicHandler

Fields Summary
protected static Log
log
Constructors Summary
Methods Summary
public voidinvoke(org.apache.axis.MessageContext msgContext)


          
        if (log.isDebugEnabled()) {
            log.debug("Enter: JavaSender::invoke");
        }

        SOAPService   service     = null ;
        SOAPService   saveService = msgContext.getService();
        OperationDesc saveOp      = msgContext.getOperation();

        Call   call = (Call) msgContext.getProperty( MessageContext.CALL );
        String url  = call.getTargetEndpointAddress();
        String cls  = url.substring(5);
  
        msgContext.setService( null );
        msgContext.setOperation( null );

        if ( msgContext.getProperty(MessageContext.IS_MSG) == null ) 
          service   = new SOAPService(new RPCProvider());
        else
          service   = new SOAPService(new MsgProvider());

        if ( cls.startsWith("//") ) cls = cls.substring(2);
        service.setOption(RPCProvider.OPTION_CLASSNAME, cls);
        service.setEngine(msgContext.getAxisEngine());
  
        service.setOption( RPCProvider.OPTION_ALLOWEDMETHODS, "*" );
        service.setOption( RPCProvider.OPTION_SCOPE, Scope.DEFAULT.getName());
        service.getInitializedServiceDesc( msgContext );
        service.init();
  
        msgContext.setService( service );

        service.invoke( msgContext );
  
        msgContext.setService( saveService );
        msgContext.setOperation( saveOp );

        if (log.isDebugEnabled()) {
            log.debug("Exit: JavaSender::invoke");
        }