Package javax.xml.ws

Examples of javax.xml.ws.Service


        QName portName=new QName("http://www.jboss.org/bpel/examples/wsdl", "SecureHelloPort");
       
        URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_bpel_secure_serviceWS?wsdl");
       
        Service service = Service.create(wsdlURL, SERVICE_NAME);
        Dispatch<SOAPMessage> dispatcher = service.createDispatch(
            portName, SOAPMessage.class, Service.Mode.MESSAGE);
      
        MessageFactory factory = MessageFactory.newInstance();
       
        String str="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsdl=\"http://www.jboss.org/bpel/examples/wsdl\">"+
View Full Code Here


        bf.setDefaultBus(bus);
       
        QName portName=new QName("http://www.jboss.org/bpel/examples/wsdl", "SecureHelloPort");
       
       
        Service service = Service.create(wsdlURL, SERVICE_NAME);
        Dispatch<SOAPMessage> dispatcher = service.createDispatch(
            portName,
            SOAPMessage.class,
            Service.Mode.MESSAGE
        );
      
View Full Code Here

   if(null==dispatcher) {
     
      log.debug("Creating Dispatcher ("+this.id+") on " + wsdlUrl + ": "+serviceName);
      JAXWSInitializer initializer=initializeStack(portName);

      Service service = Service.create(this.wsdlUrl, serviceName);
     
      if (epr != null) {
          dispatcher = service.createDispatch(
                  epr,
                  SOAPMessage.class,
                  Service.Mode.MESSAGE,
                  new javax.xml.ws.soap.AddressingFeature()
              );
      } else {
          dispatcher = service.createDispatch(
                  portName,
                  SOAPMessage.class,
                  Service.Mode.MESSAGE
              );
      }
View Full Code Here

      dispatch = (Dispatch<T>) new BinaryDispatch(endpoint);
    } else {
      //TODO: cache service/port/dispatch instances?
      Bus bus = BusFactory.getThreadDefaultBus();
      BusFactory.setThreadDefaultBus(mcf.getBus());
      Service svc;
      try {
        svc = Service.create(svcQname);
      } finally {
        BusFactory.setThreadDefaultBus(bus);
      }
      if (LogManager.isMessageToBeRecorded(LogConstants.CTX_WS, MessageLevel.DETAIL)) {
        LogManager.logDetail(LogConstants.CTX_WS, "Creating a dispatch with endpoint", endpoint); //$NON-NLS-1$
      }
      svc.addPort(mcf.getPortQName(), binding, endpoint);
     
      dispatch = svc.createDispatch(mcf.getPortQName(), type, mode);
     
      if (mcf.getSecurityType() == WSManagedConnectionFactory.SecurityType.WSSecurity
          && mcf.getOutInterceptors() != null) {
        Client client = ((DispatchImpl)dispatch).getClient();
        Endpoint ep = client.getEndpoint();
View Full Code Here

            RouteTypeUtil.createRouteType("route_0",
                                           sourceSrv, sourcePort,
                                           destSrv, destPort);
        TestProvider tp = new TestProvider(def, rt);

        Service s = tp.createService(wsdlUrl, destSrv);
        assertNotNull("Service should not be null", s);
        assertEquals(destSrv, s.getServiceName());
        assertEquals(wsdlUrl, s.getWSDLDocumentLocation());
       
        Dispatch<StreamSource> d = tp.createDispatch(s, destPort);
        assertNotNull("Dispatch instance should be present", d);
       
        tp.init();
View Full Code Here

            if (null == dList) {
                dList = new ArrayList<Dispatch<StreamSource>>(dtList.size());
            }

            for (DestinationType dt : dtList) {
                Service dtService = createService(wsdlLocation, dt.getService());
                String portName;
               
                if (dt.isSetPort()) {
                    portName = dt.getPort();
                } else {
View Full Code Here

            if (null == proxyList) {
                proxyList = new ArrayList<Object>(dtList.size());
            }

            for (DestinationType dt : dtList) {
                Service dtService = createService(wsdlLocation, dt.getService());
                QName portName;
                if (dt.isSetPort()) {
                    portName = new QName(dt.getService().getNamespaceURI(), dt.getPort());
                } else {
                    javax.wsdl.Service destService =
                        wsdlModel.getService(dt.getService());
                    String name = ((Port)destService.getPorts().values().iterator()).getName();
                    portName = new QName(dt.getService().getNamespaceURI(), name);
                }
               
                Object proxy = dtService.getPort(portName, seiClass);
                if (null == proxy) {
                    LOG.log(Level.SEVERE,
                            "GETPORT_FAILURE",
                            new Object[] {dt.getService(), portName.toString()});
                    throw new WebServiceException(new Message("GETPORT_FAILURE",
View Full Code Here

            System.exit(0);
        }

        File wsdl = new File(args[0]);

        Service service = Service.create(wsdl.toURL(), serviceName);
        AddNumbers port = (AddNumbers)service.getPort(portName, AddNumbers.class);

        try {
            int number1 = 10;
            int number2 = 20;
View Full Code Here

                ex.printStackTrace();
            }
           
            URL wsdlURL = new URL(wsdlLocation);           
           
            Service service = Service.create(wsdlURL, serviceName);
            CallbackPortType port =  (CallbackPortType)service.getPort(portName, sei);

            System.out.println("Invoking on callback object");
            String resp = port.serverSayHi(System.getProperty("user.name"));
            System.out.println("Response from callback object: " + resp);
 
View Full Code Here

                ex.printStackTrace();
            }
           
            URL wsdlURL = (new File(wsdlLocation)).toURL();            
           
            Service service = Service.create(wsdlURL, serviceName);
            CallbackPortType port =  (CallbackPortType)service.getPort(portName, sei);

            port.serverSayHi("Sean");
 
            bus.shutdown(true);
           
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.