Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLEndpoint


                                 Service wsdl4jService) {
        wsdlService.setName(wsdl4jService.getQName());
        Iterator wsdl4jportsIterator =
                wsdl4jService.getPorts().values().iterator();
        wsdlService.setServiceInterface(this.getBoundInterface(wsdlService));
        WSDLEndpoint wsdlEndpoint;
        Port wsdl4jPort;
        while (wsdl4jportsIterator.hasNext()) {
            wsdlEndpoint = this.wsdlComponentFactory.createEndpoint();
            wsdl4jPort = (Port) wsdl4jportsIterator.next();
            this.populatePorts(wsdlEndpoint,
View Full Code Here


    public WSDLService generateService(WSDLComponentFactory wsdlComponentFactory,
                                       WSDLDescription womDescription,
                                       WSDLBinding binding, String ServiceName) {
        WSDLService service = wsdlComponentFactory.createService();
        service.setName(new QName(ServiceName));
        WSDLEndpoint endpoints = wsdlComponentFactory.createEndpoint();
        endpoints.setBinding(binding);
        endpoints.setName(new QName(ServiceName + "PortType"));
        SOAPAddressImpl address = new SOAPAddressImpl();
        address.setLocationURI("http://127.0.0.1:8080:/axis2/services/" + ServiceName);
        endpoints.addExtensibilityElement(address);
        service.setEndpoint(endpoints);
        return service;
    }
View Full Code Here

    public WSDLService generateService(WSDLComponentFactory wsdlComponentFactory,
                                       WSDLDescription womDescription,
                                       WSDLBinding binding, String ServiceName) {
        WSDLService service = wsdlComponentFactory.createService();
        service.setName(new QName(ServiceName));
        WSDLEndpoint endpoints = wsdlComponentFactory.createEndpoint();
        endpoints.setBinding(binding);
        endpoints.setName(new QName(ServiceName + PORT_NAME_SUFFIX));
        SOAPAddressImpl address = new SOAPAddressImpl();
        address.setLocationURI("http://127.0.0.1:8080/axis2/services/" + ServiceName)// ???
        endpoints.addExtensibilityElement(address);
        service.setEndpoint(endpoints);
        return service;
    }
View Full Code Here

    public AxisService buildAxisService(QName servicename, String endpointname, Options clientOptions) throws AxisFault {
        WSDLService service = findService(servicename);
        AxisService serviceDesc = new AxisService();

        //TODO we just pick first end point
        WSDLEndpoint endpoint = findEndpoint(null, service);

        Iterator elements = endpoint.getExtensibilityElements().iterator();

        while (elements.hasNext()) {
            Object obj = elements.next();
            if (obj instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) obj;
                clientOptions.setTo(new EndpointReference(soapAddress.getLocationURI()));
            }
        }

        WSDLBinding binding = endpoint.getBinding();

        // let us configure the complete AxisService out of this, not the
        // current the Operation only
        Iterator bindings = binding.getBindingOperations().values().iterator();
View Full Code Here

    }


    private WSDLEndpoint findEndpoint(QName endpointname, WSDLService service)
            throws AxisFault {
        WSDLEndpoint endpoint;

        if (endpointname == null) {
            Iterator endpoints = service.getEndpoints().values().iterator();

            if (endpoints.hasNext()) {
View Full Code Here

    Iterator wsdlEndpoints = wsdlService.getEndpoints().values().iterator();
    if (!wsdlEndpoints.hasNext()) {
      throw new WSDLProcessingException("should at least one endpoints");
    }

    WSDLEndpoint wsdlEndpoint = (WSDLEndpoint) wsdlEndpoints.next();
    populatePolicy(description, wsdlEndpoint, axisService);
  }
View Full Code Here

                    include);
        }

        for (int i = 0; i < URL.length; i++) {
            String epr = URL[i];
            WSDLEndpoint endpoints = wsdlComponentFactory.createEndpoint();
            endpoints.setBinding(binding);
            endpoints.setName(new QName(ServiceName + "PortType" + i));
            SOAPAddressImpl address = new SOAPAddressImpl();
            address.setLocationURI(epr);
            endpoints.addExtensibilityElement(address);
            service.setEndpoint(endpoints);
        }
        return service;
    }
View Full Code Here

                                 Service wsdl4jService) {
        wsdlService.setName(wsdl4jService.getQName());
        Iterator wsdl4jportsIterator =
                wsdl4jService.getPorts().values().iterator();
        wsdlService.setServiceInterface(this.getBoundInterface(wsdlService));
        WSDLEndpoint wsdlEndpoint;
        Port wsdl4jPort;
        while (wsdl4jportsIterator.hasNext()) {
            wsdlEndpoint = this.wsdlComponentFactory.createEndpoint();
            wsdl4jPort = (Port) wsdl4jportsIterator.next();
            this.populatePorts(wsdlEndpoint,
View Full Code Here

    private WSDLService generateService(WSDLComponentFactory wsdlComponentFactory,
                                        WSDLBinding binding, String ServiceName, String URL) {
        WSDLService service = wsdlComponentFactory.createService();
        service.setName(new QName(ServiceName));
        WSDLEndpoint endpoints = wsdlComponentFactory.createEndpoint();
        endpoints.setBinding(binding);
        endpoints.setName(new QName(ServiceName + "PortType"));
        SOAPAddressImpl address = new SOAPAddressImpl();
        address.setLocationURI(URL);
        endpoints.addExtensibilityElement(address);
        service.setEndpoint(endpoints);
        return service;
    }
View Full Code Here

                    "You need to call public void defineDescription(URL wsdlurl before this method)");
        }

        WSDLService service = findService(servicename);
        AxisService serviceDesc = new AxisService();
        WSDLEndpoint endpoint = findEndpoint(endpointname, service);
        EndpointReference toepr = null;
        Options op = new Options();
        Iterator elements = endpoint.getExtensibilityElements().iterator();

        while (elements.hasNext()) {
            Object obj = elements.next();

            if (obj instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) obj;

                toepr = new EndpointReference(soapAddress.getLocationURI());
            }
        }

        if (toepr != null) {
            op.setTo(toepr);
        } else {
            throw new AxisFault("To Address not found");
        }

        WSDLBinding binding = endpoint.getBinding();

        // let us configure the complete AxisService out of this, not the current the Operation only
        Iterator bindings = binding.getBindingOperations().values().iterator();

        while (bindings.hasNext()) {
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLEndpoint

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.