Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLEndpoint


            throw new AxisFault(e);
        }
    }

    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

        if(soapAction == null || soapAction.equals("")){
            return null;
        }
        Iterator iterator = this.getEndpoints().keySet().iterator();
        if (iterator.hasNext()) {
            WSDLEndpoint endpoint = (WSDLEndpoint) this.getEndpoints().get(
                    iterator.next());
            return this.getOperationBySOAPAction(soapAction,
                    endpoint.getName());
        }

        return null;

View Full Code Here

        Policy policy = getPolicyFromComponent(service);
        return (policy == null) ? null : (Policy) policy.normalize();
    }

    public Policy getEndPointPolicy(QName qname) {
        WSDLEndpoint endpoint = getEndpoint(qname);
        if (endpoint == null) {
            throw new IllegalArgumentException("no such portType:" + qname);
        }

        ArrayList policies = new ArrayList();

        // wsdl:port
        Assertion epPolicy = getPolicyFromComponent(endpoint);
        if (epPolicy != null) {
            policies.add(getPolicyFromComponent(endpoint));
        }

        //wsdl:binding
        WSDLBinding wsdlBinding = endpoint.getBinding();
        Assertion wsdlBindingPolicy = getPolicyFromComponent(wsdlBinding);
        if (wsdlBindingPolicy != null) {
            policies.add(getPolicyFromComponent(wsdlBinding));
        }
View Full Code Here

        return getSinglePolicy(policies);
    }

    public Policy getOperationPolicy(QName eqame, QName oqname) {
        WSDLEndpoint endPoint = getEndpoint(eqame);
        ArrayList list = new ArrayList();

        //wsdl:binding/wsdl:operation
        WSDLBinding binding = endPoint.getBinding();
        WSDLBindingOperation bindingOperation = (WSDLBindingOperation) binding
                .getBindingOperations().get(oqname);

        Assertion bindingPolicy = getPolicyFromComponent(bindingOperation);
        if (bindingPolicy != null) {
View Full Code Here

        return getSinglePolicy(list);
    }

    public Policy getInputMeassagePolicy(QName eqname, QName oqname) {
        List policies = new ArrayList();
        WSDLEndpoint endPoint = getEndpoint(eqname);

        // wsdl:binding/wsdl:operation/wsdl:input
        WSDLBindingOperation wsdlBindingOperation = endPoint.getBinding()
                .getBindingOperation(oqname);
        WSDLBindingMessageReference bindingInput = wsdlBindingOperation
                .getInput();

        //List extensibilityAttributes =
View Full Code Here

        return getSinglePolicy(policies);
    }

    public Policy getOutputMeassagePolicy(QName endPointName, QName opName) {
        List policies = new ArrayList();
        WSDLEndpoint endPoint = getEndpoint(endPointName);

        // wsdl:binding/wsdl:operation/wsdl:output
        WSDLBindingOperation wsdlBindingOperation = endPoint.getBinding()
                .getBindingOperation(opName);
        WSDLBindingMessageReference bindingOutput = wsdlBindingOperation
                .getOutput();
        Policy bindingOutputPolicy = getSinglePolicy(getPoliciesAsExtensibleElements(bindingOutput));
        if (bindingOutputPolicy != null) {
View Full Code Here

        List extensibilityElements = service.getExtensibilityElements();
        registerPoliciesAsElements(extensibilityElements);

        Iterator iterator = service.getEndpoints().values().iterator();
        while (iterator.hasNext()) {
            WSDLEndpoint wsdlEndpoint = (WSDLEndpoint) iterator.next();
            extensibilityElements = wsdlEndpoint.getExtensibilityElements();
            registerPoliciesAsElements(extensibilityElements);
        }
    }
View Full Code Here

     *
     * @param doc
     * @param rootElement
     */
    protected void addEndpoint(Document doc, Element rootElement) throws Exception {
        WSDLEndpoint endpoint = infoHolder.getPort();

        Policy endpointPolicy = attachmentUtil.getPolicyForEndPoint(endpoint.getName());

        if (endpointPolicy != null) {
          String policyString = PolicyUtil.getPolicyAsString(endpointPolicy);
          addAttribute(doc, "policy", policyString, rootElement);
        }

        Element endpointElement = doc.createElement("endpoint");
        org.apache.wsdl.extensions.SOAPAddress address = null;
        Iterator iterator = endpoint.getExtensibilityElements().iterator();

        while (iterator.hasNext()) {
            WSDLExtensibilityElement element = (WSDLExtensibilityElement) iterator.next();

            if (ExtensionConstants.SOAP_11_ADDRESS.equals(element.getType())
View Full Code Here

    }

    if (wsdlService != null) {

      String port = configuration.getPortName();
      WSDLEndpoint wsdlEndpoint = null;

      if (port == null) {
        for (Iterator iterator = wsdlService.getEndpoints().values()
            .iterator(); iterator.hasNext();) {
          wsdlEndpoint = (WSDLEndpoint) iterator.next();
          port = wsdlEndpoint.getName().getLocalPart();
          configuration.setPortName(port);
          break;

        }
      } else {
        wsdlEndpoint = wsdlService.getEndpoint(new QName(port));
      }
      if (wsdlEndpoint == null) {
        System.err.println("no wsdl:port found for the service");
        return;
      }

      WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
      wsdlInterface = wsdlBinding.getBoundInterface();

      for (Iterator iterator = wsdlInterface.getOperations().values()
          .iterator(); iterator.hasNext();) {
        WSDLOperation wsdlOperation = (WSDLOperation) iterator.next();
        Policy policy = util.getPolicyForOperation(wsdlEndpoint.getName(),
            wsdlOperation.getName());

        if (policy != null) {
          processPolicies(document, rootElement, policy,
              wsdlEndpoint, wsdlOperation);
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.