Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLService


    }

    private WSDLService generateService(
            WSDLComponentFactory wsdlComponentFactory, WSDLBinding binding,
            String ServiceName, String [] URL) {
        WSDLService service = wsdlComponentFactory.createService();
        service.setName(new QName(ServiceName));

        /*
           * Adding policies defined in services.xml
           */

        ArrayList policyElementList;
        PolicyInclude include;

        // Policies defined in Axis2.xml
        AxisDescription axisConfiguration = null;

        AxisDescription serviceGroup = axisService.getParent();
        if (serviceGroup != null) {
            axisConfiguration = serviceGroup.getParent();
        }

        if (axisConfiguration != null) {
            include = axisConfiguration.getPolicyInclude();
            policyElementList = include
                    .getPolicyElements(PolicyInclude.AXIS_POLICY);
            addPolicyAsExtElements(womDescription, policyElementList, service,
                    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


        ///////////////////(4)Copy the Services///////////////////////////////

        Iterator serviceIterator = wsdl4JDefinition.getServices().values()
                .iterator();
        WSDLService wsdlService;
        Service wsdl4jService;
        while (serviceIterator.hasNext()) {
            wsdlService = this.wsdlComponentFactory.createService();
            wsdl4jService = (Service) serviceIterator.next();
            this.populateServices(wsdlService, wsdl4jService);
View Full Code Here

     */
    private void writeService(WSDLDescription wsdlDescription) throws IOException, XMLStreamException {
        Map serviceMap = wsdlDescription.getServices();
        if (serviceMap != null && !serviceMap.isEmpty()) {
            Iterator serviceIterator = serviceMap.values().iterator();
            WSDLService service;
            while (serviceIterator.hasNext()) {
                service = (WSDLService) serviceIterator.next();
                writer.writeStartElement(defaultWSDLPrefix, "service", WSDL1_1_NAMESPACE_URI);
                writer.writeAttribute("name", service.getName().getLocalPart());
                handleExtensibiltyElements(service.getExtensibilityElements());
                //wrtie the porttypes
                Map endPointMap = service.getEndpoints();
                if (endPointMap != null && !endPointMap.isEmpty()) {
                    Iterator it = endPointMap.values().iterator();
                    while (it.hasNext()) {
                        writePort((WSDLEndpoint) it.next());
                    }
View Full Code Here

        if (description == null) {
            throw new AxisFault(
                    "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();
View Full Code Here

            return WSDLConstants.MEP_CONSTANT_IN_OUT;
        }
    }

    private WSDLService findService(QName serviceName) throws AxisFault {
        WSDLService service;

        if (serviceName == null) {
            Iterator services = description.getServices().values().iterator();

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

import java.util.List;

public class PolicyUtil {
    public static void populatePolicy(WSDLDescription description,
                                      AxisService axisService) {
        WSDLService wsdlService = description.getService(new QName(axisService
                .getName()));
        populatePolicy(description, wsdlService, axisService);
    }
View Full Code Here

                "document", "literal", "http://schemas.xmlsoap.org/soap/http",
                "http://www.org.apache.axis2");
        womDescription.addBinding(binding);

        //generating axisService
        WSDLService service = generateService(wsdlComponentFactory, binding,
                axisService.getName(), url);
        womDescription.addService(service);
        return womDescription;
    }
View Full Code Here

        return portType;
    }

    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

        Policy endPointPolicy = null;

        Iterator iterator = wsdlDescription.getServices().values().iterator();

        while (iterator.hasNext()) {
            WSDLService service = (WSDLService) iterator.next();
            if (service.getEndpoints().containsKey(epName)) {
                servicePolicy = getPolicyForService(service.getName());
                break;
            }
        }

        endPointPolicy = getEndPointPolicy(epName);
View Full Code Here

     * @param qname
     * @return
     */
    public Policy getServicePolicy(QName qname) throws IllegalArgumentException {

        WSDLService service = getDescription().getService(qname);

        if (service == null) {
            throw new IllegalArgumentException("no such service:" + qname);
        }

View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLService

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.