Package javax.xml.rpc

Examples of javax.xml.rpc.Service


    logger.info("If this address is not correct, use 'setAddress()' to change it.");
    try
      {
          // creation of a Call object for the communication
          ServiceFactory serviceFactory = ServiceFactory.newInstance();
          Service service = serviceFactory.createService(new QName(webServicesName));
          call = (Call) service.createCall();
     
          // address of the service
          call.setTargetEndpointAddress(address);
      }
      catch (Exception e)
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

                "GetQuoteService");
        QName portQN = new QName("urn:xmltoday-delayed-quotes", "GetQuote");

        /* Now use those QNames as pointers into the WSDL doc */
        /******************************************************/
        Service service = ServiceFactory.newInstance().createService(
                new URL("file:samples/stock/GetQuote.wsdl"), servQN);
        Call call = service.createCall(portQN, "getQuote");

        /* Strange - but allows the user to change just certain portions of */
        /* the URL we're gonna use to invoke the service.  Useful when you  */
        /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
        /********************************************************************/
 
View Full Code Here

            System.exit(1);
        }

        /* Create default/empty Service and Call object */
        /************************************************/
        Service service = ServiceFactory.newInstance().createService(null);
        Call call = service.createCall();

        /* Strange - but allows the user to change just certain portions of */
        /* the URL we're gonna use to invoke the service.  Useful when you  */
        /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
        /********************************************************************/
 
View Full Code Here

                "GetQuoteService");
        QName portQN = new QName("urn:xmltoday-delayed-quotes", "GetQuote");

        /* Now use those QNames as pointers into the WSDL doc */
        /******************************************************/
        Service service = ServiceFactory.newInstance().createService(
                new URL("file:samples/stock/GetQuote.wsdl"), servQN);
        Call call = service.createCall(portQN, "getQuote");

        /* Strange - but allows the user to change just certain portions of */
        /* the URL we're gonna use to invoke the service.  Useful when you  */
        /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
        /********************************************************************/
 
View Full Code Here

            System.err.println("Usage: GetInfo <symbol> <datatype>");
            System.exit(1);
        }

        String  symbol  = args[0];
        Service service = ServiceFactory.newInstance().createService(null);
        Call    call    = service.createCall();

        call.setTargetEndpointAddress(opts.getURL());
        call.setOperationName(new QName("urn:cominfo", "getInfo"));
        call.addParameter("symbol", XMLType.XSD_STRING, ParameterMode.IN);
        call.addParameter("info", XMLType.XSD_STRING, ParameterMode.IN);
View Full Code Here

        super(name);
    }

    private TypeTest getProxyWithWSDL() {
        try {
            Service service = ServiceFactory.newInstance().createService(
                new URL("file", "", "test/wsdl/types/ComprehensiveTypes.wsdl"),
                new QName("urn:comprehensive-service.types.wsdl.test",
                        "TypeTestService"));
            return (TypeTest) service.getPort(
                new QName("", "TypeTest"), TypeTest.class);
        }
        catch (MalformedURLException mue) {
            throw new AssertionFailedError(
                    "MalformedURLException caught: " + mue);
View Full Code Here

        }
    } // getProxyWithWSDL

    private TypeTest getProxy() {
        try {
            Service service = ServiceFactory.newInstance().createService(null);
            Stub binding = (Stub) service.getPort(TypeTest.class);
            binding._setProperty(Call.ENDPOINT_ADDRESS_PROPERTY,
                    "http://localhost:8080/axis/services/TypeTest");
            return (TypeTest) binding;
           
        }
View Full Code Here

                // invocations, since the JAXRPC RI Generated Service impl
                // does not.  Configured service is potentially
                // a heavy-weight object so we lazily instantiate it to
                // take advantage of the likelihood that
                // GeneratedService service-refs won't be used for DII.
                Service configuredService =
                    wsUtil.createConfiguredService(serviceRef);
                wsUtil.configureHandlerChain(serviceRef, configuredService,
               configuredService.getPorts(), classLoader);
                configuredServiceDelegate = configuredService;
   
    addMessageSecurityHandler(configuredService);
            }
        }
View Full Code Here

            // invocations, since the JAXRPC RI Generated Service impl
            // does not.  Configured service is potentially
            // a heavy-weight object so we lazily instantiate it to
            // take advantage of the likelihood that
            // GeneratedService service-refs won't be used for DII.
            Service configuredService =
                    wsUtil.createConfiguredService(serviceRef);
            wsUtil.configureHandlerChain(serviceRef, configuredService,
                    configuredService.getPorts(), classLoader);
            configuredServiceDelegate = configuredService;

            addMessageSecurityHandler(configuredService);
        }
        return configuredServiceDelegate;
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.