Package javax.xml.ws

Examples of javax.xml.ws.Service


   private Echo getPort(String endpointURI) throws MalformedURLException
   {
      QName serviceName = new QName("http://org.jboss.ws/testsuite", "EchoService");
      URL wsdlURL = new URL("http://localhost:8080/" + endpointURI + "?wsdl");

      Service service = Service.create(wsdlURL, serviceName);
      return service.getPort(Echo.class);
   }
View Full Code Here


      return implVendor;
   }

   private static Object getImplementationObject()
   {
      Service service = Service.create(new QName("dummyService"));
      Object obj = service.getHandlerResolver();
      if (obj == null)
      {
         service.addPort(new QName("dummyPort"), SOAPBinding.SOAP11HTTP_BINDING, "http://dummy-address");
         obj = service.createDispatch(new QName("dummyPort"), Source.class, Mode.PAYLOAD);
      }
      return obj;
   }
View Full Code Here

    * @throws Exception
    */
   public void testWebService() throws Exception
   {
     // JBAS-8540
      Service service = Service.create(
        new URL("http://"+getServerHostForURL()+":8080/webservices-ejb3/SimpleEndpoint?wsdl"),
        new QName("http://ejb3Integration.jaxws.ws.test.jboss.org/","SimpleEndpointService")
      );

      String msg = "testWebService";
      Ejb3WSEndpoint port = service.getPort(Ejb3WSEndpoint.class);
      String response = port.echo(msg);
      assertEquals(msg, response);
   }
View Full Code Here

    * @throws Exception
    */
   public void testWebServiceContext() throws Exception
   {
     // JBAS-8540
      Service service = Service.create(
        new URL("http://"+getServerHostForURL()+":8080/webservices-ejb3/WebServiceContextEndpoint?wsdl"),
        new QName("http://ejb3Integration.jaxws.ws.test.jboss.org/","WebServiceContextEndpointService")
      );

      String msg = "testWebServiceContext";
      Ejb3WSEndpoint port = service.getPort(Ejb3WSEndpoint.class);
      String response = port.echo(msg);
      assertNotNull(response);
   }
View Full Code Here

    * @throws Exception
    */
   public void testHandlerContext() throws Exception
   {
     // JBAS-8540
      Service service = Service.create(
        new URL("http://"+getServerHostForURL()+":8080/webservices-ejb3/HandlerContextEndpoint?wsdl"),
        new QName("http://ejb3Integration.jaxws.ws.test.jboss.org/","HandlerContextEndpointService")
      );

      String msg = "testHandlerContext";
      Ejb3WSEndpoint port = service.getPort(Ejb3WSEndpoint.class);
      String response = port.echo(msg);
      assertNotNull(response);
   }
View Full Code Here

      }
     
      QName serviceName = new QName("http://jbossws.org/injection", "POJOService");
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-injection-pojo/POJOService?wsdl");

      Service service = Service.create(wsdlURL, serviceName);
      EndpointIface proxy = (EndpointIface)service.getPort(EndpointIface.class);
      assertEquals("Hello World!:Inbound:TestHandler:POJOBean:Outbound:TestHandler", proxy.echo("Hello World!"));
   }
View Full Code Here

      }
     
      QName serviceName = new QName("http://jbossws.org/injection", "EJB3Service");
      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-injection-ejb3/EJB3Service?wsdl");

      Service service = Service.create(wsdlURL, serviceName);
      EndpointIface proxy = (EndpointIface)service.getPort(EndpointIface.class);
      assertEquals("Hello World!:Inbound:TestHandler:EJB3Bean:Outbound:TestHandler", proxy.echo("Hello World!"));
   }
View Full Code Here

   public void testDynamicProxy() throws Exception
   {
      URL wsdlURL = getResource("ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl");
      QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
      Service service = Service.create(wsdlURL, qname);
      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);

      String helloWorld = "Hello World!";
      Object retObj = port.echo(helloWorld);
      assertEquals(helloWorld, retObj);
   }
View Full Code Here

   public void testDynamicProxy() throws Exception
   {
      URL wsdlURL = getResource("ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl");
      QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
      Service service = Service.create(wsdlURL, qname);
      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);

      String helloWorld = "Hello World!";
      Object retObj = port.echo(helloWorld);
      assertEquals(helloWorld, retObj);
   }
View Full Code Here

   public void testDynamicProxy() throws Exception
   {
      URL wsdlURL = super.getResource("ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl");
      QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
      Service service = Service.create(wsdlURL, qname);
      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);

      String helloWorld = "Hello World!";
      Object retObj = port.echo(helloWorld);
      assertEquals(helloWorld, retObj);
   }
View Full Code Here

TOP

Related Classes of javax.xml.ws.Service

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.