Package javax.xml.rpc

Examples of javax.xml.rpc.Service


      URL wsdlURL = new URL("http://" + inetAddr.getHostAddress() + ":8080/jaxws-jbws1178/testpattern?wsdl");

      ServiceFactory factory = ServiceFactory.newInstance();
      QName serviceName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointService");
      QName portName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointPort");
      Service service = factory.createService(wsdlURL, serviceName);
      CallImpl call = (CallImpl)service.createCall(portName);
      URL epURL = new URL(call.getEndpointMetaData().getEndpointAddress());

      assertEquals(wsdlURL.getHost(), epURL.getHost());
   }
View Full Code Here


      URL wsdlURL = new URL("http://" + inetAddr.getHostName() + ":8080/jaxws-jbws1178/testpattern?wsdl");

      ServiceFactory factory = ServiceFactory.newInstance();
      QName serviceName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointService");
      QName portName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointPort");
      Service service = factory.createService(wsdlURL, serviceName);
      CallImpl call = (CallImpl)service.createCall(portName);
      URL epURL = new URL(call.getEndpointMetaData().getEndpointAddress());

      assertEquals(wsdlURL.getHost(), epURL.getHost());
   }
View Full Code Here

   {
      super.setUp();
      if (port == null)
      {
         InitialContext iniCtx = getInitialContext();
         Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
         port = (TestEndpoint)service.getPort(TestEndpoint.class);
      }
   }
View Full Code Here

      deploy("jaxrpc-addressrewrite.war");
      try
      {
         ServiceFactory serviceFactory = ServiceFactory.newInstance();

         Service service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "ValidURLService"));
         Call call = (Call)service.createCall(new QName(NAMESPACE, "ValidURLPort"), "sayHello");
         assertEquals("http://" + webServiceHost + ":8080/jaxrpc-addressrewrite/ValidURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "InvalidURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "InvalidURLPort"), "sayHello");
         assertEquals("http://" + webServiceHost + ":8080/jaxrpc-addressrewrite/InvalidURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "ValidSecureURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "ValidSecureURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite/ValidSecureURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "InvalidSecureURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "InvalidSecureURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite/InvalidSecureURL", call.getTargetEndpointAddress());
      }
      finally
      {
         undeploy("jaxrpc-addressrewrite.war");
View Full Code Here

      deploy("jaxrpc-addressrewrite-sec.war");
      try
      {
         ServiceFactory serviceFactory = ServiceFactory.newInstance();

         Service service = serviceFactory.createService(new URL(wsdlLocationSec), new QName(NAMESPACE, "ValidURLService"));
         Call call = (Call)service.createCall(new QName(NAMESPACE, "ValidURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite-sec/ValidURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocationSec), new QName(NAMESPACE, "InvalidURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "InvalidURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite-sec/InvalidURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocationSec), new QName(NAMESPACE, "ValidSecureURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "ValidSecureURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite-sec/ValidSecureURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocationSec), new QName(NAMESPACE, "InvalidSecureURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "InvalidSecureURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite-sec/InvalidSecureURL", call.getTargetEndpointAddress());
      }
      finally
      {
         undeploy("jaxrpc-addressrewrite-sec.war");
View Full Code Here

      deploy("jaxrpc-addressrewrite.war");
      try
      {
         ServiceFactory serviceFactory = ServiceFactory.newInstance();

         Service service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "ValidURLService"));
         Call call = (Call)service.createCall(new QName(NAMESPACE, "ValidURLPort"), "sayHello");
         assertEquals("http://somehost:80/somepath", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "InvalidURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "InvalidURLPort"), "sayHello");
         assertEquals("http://" + webServiceHost + ":8080/jaxrpc-addressrewrite/InvalidURL", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "ValidSecureURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "ValidSecureURLPort"), "sayHello");
         assertEquals("https://somehost:443/some-secure-path", call.getTargetEndpointAddress());

         service = serviceFactory.createService(new URL(wsdlLocation), new QName(NAMESPACE, "InvalidSecureURLService"));
         call = (Call)service.createCall(new QName(NAMESPACE, "InvalidSecureURLPort"), "sayHello");
         assertEquals("https://" + webServiceHost + ":8443/jaxrpc-addressrewrite/InvalidSecureURL", call.getTargetEndpointAddress());
      }
      finally
      {
         undeploy("jaxrpc-addressrewrite.war");
View Full Code Here

      this.serviceToUse = null;

      // Cache the QName for the port.
      this.portQName = getQName(getPortName());

      Service service = getJaxRpcService();
      if (service == null) {
        service = createJaxRpcService();
      }
      else {
        postProcessJaxRpcService(service);
      }

      Class portInterface = getPortInterface();
      if (portInterface != null && !alwaysUseJaxRpcCall()) {
        // JAX-RPC-compliant port interface -> using JAX-RPC stub for port.

        if (logger.isDebugEnabled()) {
          logger.debug("Creating JAX-RPC proxy for JAX-RPC port [" + this.portQName +
              "], using port interface [" + portInterface.getName() + "]");
        }
        Remote remoteObj = service.getPort(this.portQName, portInterface);

        if (logger.isDebugEnabled()) {
          Class serviceInterface = getServiceInterface();
          if (serviceInterface != null) {
            boolean isImpl = serviceInterface.isInstance(remoteObj);
View Full Code Here

      // Cache the QName for the port.
      this.portQName = getQName(getPortName());

      try {
        Service service = getJaxRpcService();
        if (service == null) {
          service = createJaxRpcService();
        }
        else {
          postProcessJaxRpcService(service);
        }

        Class portInterface = getPortInterface();
        if (portInterface != null && !alwaysUseJaxRpcCall()) {
          // JAX-RPC-compliant port interface -> using JAX-RPC stub for port.

          if (logger.isDebugEnabled()) {
            logger.debug("Creating JAX-RPC proxy for JAX-RPC port [" + this.portQName +
                "], using port interface [" + portInterface.getName() + "]");
          }
          Remote remoteObj = service.getPort(this.portQName, portInterface);

          if (logger.isDebugEnabled()) {
            Class serviceInterface = getServiceInterface();
            if (serviceInterface != null) {
              boolean isImpl = serviceInterface.isInstance(remoteObj);
View Full Code Here

    if (serviceFactory == null) {
      serviceFactory = createServiceFactory();
    }

    // Create service based on this factory's settings.
    Service service = createService(serviceFactory);

    // Allow for custom post-processing in subclasses.
    postProcessJaxRpcService(service);

    return service;
View Full Code Here

    */
   public void testServiceCreation(  )
   throws Exception
   {
      final ServiceFactory service_factory = ServiceFactory.newInstance(  );
      final Service        service = service_factory.createService( ExampleConstants.SERVICE_QNAME );
      assertTrue( service != null );
      assertEquals( ExampleConstants.SERVICE_QNAME,
                    service.getServiceName(  ) );

      return;
   }
View Full Code Here

TOP

Related Classes of javax.xml.rpc.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.