Package javax.xml.rpc

Examples of javax.xml.rpc.Service


      File wsdlFile = new File("resources/webservice/jbws309/META-INF/wsdl/OrganizationService.wsdl");
      assertTrue("wsdl file exists", wsdlFile.exists());

      ServiceFactory factory = ServiceFactory.newInstance();
      Service service = factory.createService(wsdlFile.toURL(), new QName(nsURI, "OrganizationService"));
      Call call = service.createCall(new QName(nsURI, "BasicSecuredPort"), "getContactInfo");
      call.setTargetEndpointAddress(targetAddress);

      try
      {
         call.invoke(new Object[] { "mafia" });
View Full Code Here


   }

   public void testRoleSecuredServiceAccess() throws Exception
   {
      InitialContext iniCtx = getClientContext();
      Service service = (Service)iniCtx.lookup("java:comp/env/service/RoleSecured");
      Organization endpoint = (Organization)service.getPort(new QName(nsURI, "RoleSecuredPort"), Organization.class);

      try
      {
         endpoint.getContactInfo("mafia");
         fail("Security exception expected");
View Full Code Here

   }

   public void testHelloString() throws Exception
   {
      InitialContext iniCtx = getClientContext();
      Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
      Hello helloPort = (Hello)service.getPort(Hello.class);

      String retStr = helloPort.helloString("Kermit");
      assertEquals("Hello Kermit!", retStr);
   }
View Full Code Here

   {
      super.setUp();
      if (helloPort == null)
      {
         InitialContext iniCtx = getClientContext();
         Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
         helloPort = (Hello)service.getPort(Hello.class);
      }
   }
View Full Code Here

      if (port == null)
      {
         InitialContext iniCtx = getClientContext("jbossws-client");
         Object lookup = iniCtx.lookup("java:comp/env/service/HelloWorldService");
         log.info("Lookup: " + lookup + " [" + lookup.getClass() + "]");
         Service service = (Service)lookup;
         port = (HelloWorld)service.getPort(HelloWorld.class);
      }
   }
View Full Code Here

    * Get a handle to the MeridioMetaCarta Web Service
    *================================================================*/
    if (meridioManifoldCFWSUrl != null)
    {
      MetaCartaLocator meridioMCWS = new MetaCartaLocator(engineConfiguration);
      Service McWsService = null;
      MetaCartaSoapStub meridioMetaCartaWebService = new MetaCartaSoapStub(meridioManifoldCFWSUrl, McWsService);

      meridioMetaCartaWebService.setPortName(meridioMCWS.getMetaCartaSoapWSDDServiceName());
      meridioMetaCartaWebService.setUsername(userName);
      meridioMetaCartaWebService.setPassword(password);
View Full Code Here

   {
      super.setUp();

      if (initial == null)
      {
         Service replytoService = (Service)getInitialContext("jaxrpc-addressing-replyto-client").lookup("java:comp/env/service/ReplyToService");
         replyto = (ReplyTo)replytoService.getPort(ReplyTo.class);
         Service initialService = (Service)getInitialContext("jaxrpc-addressing-replyto-client").lookup("java:comp/env/service/HelloService");
         initial = (Hello)initialService.getPort(Hello.class);
      }
   }
View Full Code Here

            ServiceFactory factory = ServiceFactory.newInstance();

       /*
  * Create an instance of the Service with the given service QName
  */
            Service service = factory.createService(new QName(serviceName));

            Call call = service.createCall(new QName(portName));

            call.setTargetEndpointAddress(address);

            QName intQName = new QName("http://www.w3.org/2001/XMLSchema", "int");            /*
       * Set operation name to invoke.
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

   {
      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

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.