Package org.apache.geronimo.tomcat.app

Examples of org.apache.geronimo.tomcat.app.MockWebServiceContainer


public class ContainerTest extends AbstractWebModuleTest {

    public void testWebServiceHandler() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null,null, cl);
        HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
View Full Code Here


    public void testSecureWebServiceHandler() throws Exception {

        setUpSecurity();

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, securityRealmName, securityRealmName, "NONE", "BASIC", cl);

        //Veryify its secured
        HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
        try {
View Full Code Here

public class ContainerTest extends AbstractWebModuleTest {

    public void testWebServiceHandler() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null,null, cl);
        HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:8181" + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
View Full Code Here

    public void testSecureWebServiceHandler() throws Exception {

        setUpSecurity();

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, securityRealmName, securityRealmName, "NONE", "BASIC", cl);

        //Veryify its secured
        HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:8181" + contextPath).openConnection();
        try {
View Full Code Here

public class ContainerTest extends AbstractWebModuleTest {

    public void testWebServiceHandler() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null, null, null, cl);
        HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
View Full Code Here

    public void xtestSecureWebServiceHandler() throws Exception {

        setUpSecurityService();

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, "ContextID", realm, securityRealmName, "BASIC", null, cl);

        //Veryify its secured
        HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
        try {
View Full Code Here

public class ContainerTest extends AbstractWebModuleTest {

    public void testWebServiceHandler() throws Exception {

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, null, null, null, null, null, cl);
        HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
View Full Code Here

    public void xtestSecureWebServiceHandler() throws Exception {

        setUpSecurityService();

        String contextPath = "/foo/webservice.ws";
        MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
        container.addWebService(contextPath, null, webServiceInvoker, "ContextID", realm, securityRealmName, "BASIC", null, cl);

        //Veryify its secured
        HttpURLConnection connection = (HttpURLConnection) new URL(connector.getConnectUrl() + contextPath).openConnection();
        try {
View Full Code Here

       assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(connectorName));
       assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(containerName));

       String contextPath = "/foo/webservice.ws";
       MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
       kernel.invoke(containerName, "addWebService", new Object[] {contextPath, null, webServiceInvoker, null, null, null, null, cl}, new String[] {String.class.getName(), String[].class.getName(), WebServiceContainer.class.getName(), String.class.getName(), String.class.getName(), String.class.getName(), String.class.getName(), ClassLoader.class.getName()});

       HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:8080" + contextPath).openConnection();
       try {
           BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
View Full Code Here

       assertEquals(State.RUNNING_INDEX, kernel.getGBeanState(containerName));

       setUpSecurity();

       String contextPath = "/foo/webservice.ws";
       MockWebServiceContainer webServiceInvoker = new MockWebServiceContainer();
       kernel.invoke(containerName, "addWebService", new Object[] {contextPath, null, webServiceInvoker, "Geronimo", "Geronimo", "NONE", "BASIC",cl}, new String[] {String.class.getName(), String[].class.getName(), WebServiceContainer.class.getName(), String.class.getName(), String.class.getName(), String.class.getName(), String.class.getName(), ClassLoader.class.getName()});

       //Veryify its secured
       HttpURLConnection connection = (HttpURLConnection) new URL("http://localhost:8080" + contextPath).openConnection();
       try {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.tomcat.app.MockWebServiceContainer

Copyright © 2018 www.massapicom. 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.