Package er.examples.erjaxws

Source Code of er.examples.erjaxws.Application

package er.examples.erjaxws;

import javax.xml.ws.Endpoint;

import er.examples.erjaxws.ws.Calculator;
import er.extensions.appserver.ERXApplication;
import er.extensions.appserver.ws.ERJaxWebService;
import er.extensions.appserver.ws.ERJaxWebServiceRequestHandler;

public class Application extends ERXApplication {
  public static void main(String[] argv) {
    ERXApplication.main(argv, Application.class);
  }

  public Application() {
    ERXApplication.log.info("Welcome to " + name() + " !");
    /* ** put your initialization code in here ** */
    setAllowsConcurrentRequestHandling(true);   

        // do it the WONDER way
        ERJaxWebServiceRequestHandler wsHandler = new ERJaxWebServiceRequestHandler();
        wsHandler.registerWebService("Calculator", new ERJaxWebService<Calculator>(Calculator.class));
        this.registerRequestHandler(wsHandler, this.webServiceRequestHandlerKey());

        // create a standalone endpoint using Jax WS mechanisms
        Endpoint.publish("http://localhost:9999/ws/Calculator", new Calculator());
  }
 
  // modify URL to auto open in Browser to show the wsdl
  @Override
  public String directConnectURL() {
    return super.directConnectURL() + "/ws/Calculator?wsdl";
  }
}
TOP

Related Classes of er.examples.erjaxws.Application

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.