Examples of AxisServer


Examples of org.apache.axis.server.AxisServer

    if (value == null) value = getInitParameter(param);

    if (value == null) value = context.getInitParameter(param);
    try
    {
      AxisServer engine = getEngine();
      if (value == null && engine != null) value = (String) engine
          .getOption(param);
    }
    catch (AxisFault axisFault)
    {
    }
View Full Code Here

Examples of org.apache.axis.server.AxisServer

        if (value == null) value = getInitParameter(param);

        if (value == null) value = context.getInitParameter(param);
        try
        {
            AxisServer engine = getEngine();
            if (value == null && engine != null) value = (String) engine
                    .getOption(param);
        }
        catch (AxisFault axisFault)
        {
        }
View Full Code Here

Examples of org.apache.axis.server.AxisServer

    }
   
    public org.dom4j.Document getWSDL( String serviceName ) throws Exception
    {
      AxisService service = ( AxisService ) lookup( AxisService.ROLE );
      AxisServer server = service.getAxisServer();
   
      LocalTransport transport = new LocalTransport(server);
   
      MessageContext msgContext = new MessageContext(server);
      msgContext.setSOAPConstants(SOAPConstants.SOAP12_CONSTANTS);
      msgContext.setEncodingStyle(SOAPConstants.SOAP12_CONSTANTS.getEncodingURI());
   
      msgContext.setTargetService( serviceName );
       
      // During a real invocation this is set by the handler, however we
      // need to set it hear to get the wsdl generation working.
      msgContext.setProperty( MessageContext.TRANS_URL,
                  services + serviceName );
      server.generateWSDL( msgContext );       
       
      // another one of those undocumented "features"
      Document doc = (Document) msgContext.getProperty( "WSDL" );
       
        DOMReader xmlReader = new DOMReader();
View Full Code Here

Examples of org.apache.axis.server.AxisServer

      InputStream is = url.openStream();
     
      EngineConfiguration fromBundleResource = new FileProvider(is);
     
      log.info("Configuration file read.");
      axisServer = new AxisServer(fromBundleResource);
      log.info("Axis server started.");
      webApp = new WebApp(getWebAppDescriptor());
      webApp.start(axisBundle);
      log.info("Web application started.");
      axisBundle.addServiceListener(this);  
View Full Code Here

Examples of org.apache.axis.server.AxisServer

    public TestAttributes(String name) {
        super(name);
    }

    public void testBean () throws Exception {
        MessageContext msgContext = new MessageContext(new AxisServer(new BasicServerConfig()));
        SOAPEnvelope msg = new SOAPEnvelope();

        // Create bean with data
        AttributeBean bean = new AttributeBean();
        bean.setAge(35);
View Full Code Here

Examples of org.apache.axis.server.AxisServer

   
    private void checkSimpleBeanRoundTrip(String text, float temp) throws Exception {
        SimpleBean bean = new SimpleBean(text);
        bean.temp = temp;

        MessageContext msgContext = new MessageContext(new AxisServer(new BasicServerConfig()));
        SOAPEnvelope msg = new SOAPEnvelope();

        RPCParam arg = new RPCParam("", "simple", bean);
        RPCElement body = new RPCElement("urn:myNamespace", "method1", new Object[]{ arg });
        msg.addBodyElement(body);
View Full Code Here

Examples of org.apache.axis.server.AxisServer

        super(s);
    }

    protected void setUp() throws Exception {
        config = new BasicServerConfig();
        server = new AxisServer(config);

        // Deploy a service which contains an option that we expect to be
        // available by asking the MessageContext in the service method (see
        // PropertyHandler.java).
View Full Code Here

Examples of org.apache.axis.server.AxisServer

    }

    protected void setUp() throws Exception {
        try {
            SimpleProvider provider = new SimpleProvider();
            server = new AxisServer(provider);
            transport = new LocalTransport(server);

            SOAPService service = new SOAPService(new RPCProvider());

            service.setOption("className", "test.encoding.TestArrayListConversions");
View Full Code Here

Examples of org.apache.axis.server.AxisServer

    /**
     * Allocate an embedded Axis server to process requests and initialize it.
     */
    public synchronized void init() {
        this.server= new AxisServer();
    }
View Full Code Here

Examples of org.apache.axis.server.AxisServer

    public void invoke(MessageContext clientContext) throws AxisFault {
        if (log.isDebugEnabled()) {
            log.debug("Enter: LocalSender::invoke");
        }

        AxisServer targetServer =
            (AxisServer)clientContext.getProperty(LocalTransport.LOCAL_SERVER);

        if (log.isDebugEnabled()) {
            log.debug(Messages.getMessage("usingServer00",
                "LocalSender", "" + targetServer));
        }

        if (targetServer == null) {
            // This should have already been done, but it doesn't appear to be
            // something that can be relied on.  Oh, well...
            if (server == null) init();
            targetServer = server;
        }

        // Define a new messageContext per request
        MessageContext serverContext = new MessageContext(targetServer);

        // copy the request, and force its format to String in order to
        // exercise the serializers.
        String msgStr = clientContext.getRequestMessage().getSOAPPartAsString();

        if (log.isDebugEnabled()) {
            log.debug(Messages.getMessage("sendingXML00", "LocalSender"));
            log.debug(msgStr);
        }

        serverContext.setRequestMessage(new Message(msgStr));
        serverContext.setTransportName("local");

        // Also copy authentication info if present
        String user = clientContext.getUsername();
        if (user != null) {
            serverContext.setUsername(user);
            String pass = clientContext.getPassword();
            if (pass != null)
                serverContext.setPassword(pass);
        }

        // set the realpath if possible
        String transURL = clientContext.getStrProp(MessageContext.TRANS_URL);
        if (transURL != null) {
            try {
                URL url = new URL(transURL);
                String file = url.getFile();
                if (file.length()>0 && file.charAt(0)=='/') file = file.substring(1);
                serverContext.setProperty(Constants.MC_REALPATH, file);
               
                // This enables "local:///AdminService" and the like to work.
                serverContext.setTargetService(file);
            } catch (Exception e) {
                throw AxisFault.makeFault(e);
            }
        }

        // If we've been given an explicit "remote" service to invoke,
        // use it. (Note that right now this overrides the setting above;
        // is this the correct precedence?)
        String remoteService = clientContext.getStrProp(LocalTransport.REMOTE_SERVICE);
        if (remoteService != null)
            serverContext.setTargetService(remoteService);

        // invoke the request
        try {
            targetServer.invoke(serverContext);
        } catch (AxisFault fault) {
            Message respMsg = serverContext.getResponseMessage();
            if (respMsg == null) {
                respMsg = new Message(fault);
                serverContext.setResponseMessage(respMsg);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.