Examples of WSDLExtensibilityElement


Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

            //copy missing namespaces from the source element to our element
            Element element = (Element)srcElement.cloneNode(true);
            copyMissingNamespaceDeclarations(element, srcElement);
            if (element.getLocalName().equals("Policy"))
            {
               dest.addExtensibilityElement(new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICY, element));
            }
            else if (element.getLocalName().equals("PolicyReference"))
            {
               dest.addExtensibilityElement(new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICYREFERENCE, element));
            }

         }
      }
   }
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

      {
         PolicyWriter writer = PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
         writer.writePolicy(policy, outputStream);
         Element element = DOMUtils.parse(outputStream.toString(Constants.DEFAULT_XML_CHARSET));
         WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICY, element);
         wsdl.addExtensibilityElement(ext);
         //optional: to obtain a better looking wsdl, register ws-policy
         //prefix in wsdl:definitions if it is not defined there yet
         if (wsdl.getPrefix(element.getNamespaceURI())==null)
         {
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

         wsdl.registerNamespaceURI(policyRefQName.getNamespaceURI(), prefix);
      }
      Element element = DOMUtils.createElement(policyRefQName.getLocalPart(), prefix);
      element.setAttribute("URI", policy.getPolicyURI());
      //TODO!! we need to understand if the policy is local or not...
      WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICYREFERENCE, element);
      extendable.addExtensibilityElement(ext);
   }
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

         Element classElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_CLASS.getLocalPart(), prefix);
         classElement.setAttribute("name", interfaceQName.getLocalPart());
         classElement.appendChild(javadocElement);
         Element bindingsElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_BINDINGS.getLocalPart(), prefix);
         bindingsElement.appendChild(classElement);
         WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, bindingsElement);
         wsdlInterface.addExtensibilityElement(ext);
         wsdlInterface.setDocumentationElement(new WSDLDocumentation(endpoint.getDocumentation()));
      }
     
      for (OperationMetaData operation : endpoint.getOperations())
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

      {
         PolicyWriter writer = PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
         writer.writePolicy(policy, outputStream);
         Element element = DOMUtils.parse(outputStream.toString(Constants.DEFAULT_XML_CHARSET));
         WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICY, element);
         wsdl.addExtensibilityElement(ext);
         //optional: to obtain a better looking wsdl, register ws-policy
         //prefix in wsdl:definitions if it is not defined there yet
         if (wsdl.getPrefix(element.getNamespaceURI())==null)
         {
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

         wsdl.registerNamespaceURI(policyRefQName.getNamespaceURI(), prefix);
      }
      Element element = DOMUtils.createElement(policyRefQName.getLocalPart(), prefix);
      element.setAttribute("URI", policy.getPolicyURI());
      //TODO!! we need to understand if the policy is local or not...
      WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICYREFERENCE, element);
      extendable.addExtensibilityElement(ext);
   }
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

         Element methodElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_METHOD.getLocalPart(), prefix);
         methodElement.setAttribute("name", operation.getQName().getLocalPart());
         methodElement.appendChild(javadocElement);
         Element bindingsElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_BINDINGS.getLocalPart(), prefix);
         bindingsElement.appendChild(methodElement);
         WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, bindingsElement);
         interfaceOperation.addExtensibilityElement(ext);
         interfaceOperation.setDocumentationElement(new WSDLDocumentation(operation.getDocumentation()));
      }
     
      wsdlInterface.addOperation(interfaceOperation);
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

      //check equality
      for (WSDLExtensibilityElement el1 : pol1)
      {
         boolean done = false;
         Iterator it = pol2.iterator();
         WSDLExtensibilityElement el2 = null;
         while (it.hasNext() && !done)
         {
            el2 = (WSDLExtensibilityElement)it.next();
            done = (el1.isRequired() == el2.isRequired()) &&
               checkElementEquality(el1.getElement(), el2.getElement());
         }
         if (!done)
         {
            log.error("Failing policy validation on policy on: "+ext1+" and "+ext2);
            return false;
         }
         pol2.remove(el2);
      }
      //policy references
      List<WSDLExtensibilityElement> polRef1 = new ArrayList<WSDLExtensibilityElement>(
            ext1.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE));
      List<WSDLExtensibilityElement> polRef2 = new ArrayList<WSDLExtensibilityElement>(
            ext2.getExtensibilityElements(Constants.WSDL_ELEMENT_POLICYREFERENCE));
      //check whether lists are the same size
      if (polRef1.size() != polRef2.size())
         throw new JBossWSToolsException("Policy ref WSDLExtensibilityElement mismatch!");
      //check equality
      for (WSDLExtensibilityElement el1 : polRef1)
      {
         boolean done = false;
         Iterator it = polRef2.iterator();
         WSDLExtensibilityElement el2 = null;
         while (it.hasNext() && !done)
         {
            el2 = (WSDLExtensibilityElement)it.next();
            done = (el1.isRequired() == el2.isRequired()) &&
               checkElementEquality(el1.getElement(), el2.getElement());
         }
         if (!done)
         {
            log.error("Failing policy validation on policy ref on: "+ext1+" and "+ext2);
            return false;
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

            //copy missing namespaces from the source element to our element
            Element element = (Element)srcElement.cloneNode(true);
            copyMissingNamespaceDeclarations(element, srcElement);
            if (element.getLocalName().equals("Policy"))
            {
               dest.addExtensibilityElement(new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICY, element));
            }
            else if (element.getLocalName().equals("PolicyReference"))
            {
               dest.addExtensibilityElement(new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICYREFERENCE, element));
            }

         }
      }
   }
View Full Code Here

Examples of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

      {
         PolicyWriter writer = PolicyFactory.getPolicyWriter(PolicyFactory.StAX_POLICY_WRITER);
         ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
         writer.writePolicy(policy, outputStream);
         Element element = DOMUtils.parse(outputStream.toString(Constants.DEFAULT_XML_CHARSET));
         WSDLExtensibilityElement ext = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICY, element);
         wsdl.addExtensibilityElement(ext);
         //optional: to obtain a better looking wsdl, register ws-policy
         //prefix in wsdl:definitions if it is not defined there yet
         if (wsdl.getPrefix(element.getNamespaceURI())==null)
         {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.