Package org.jboss.ws.metadata.wsdl

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


         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

            //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

            //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

      {
         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

         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

         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

         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

   }
  
   private void processNotUnderstoodExtesibilityElement(UnknownExtensibilityElement extElement, Extendable dest)
   {
      Element element = (Element)extElement.getElement().cloneNode(true);
      WSDLExtensibilityElement notUnderstoodElement = new WSDLExtensibilityElement("notUnderstoodExtensibilityElement", element);
      notUnderstoodElement.setRequired("true".equalsIgnoreCase(element.getAttributeNS(Constants.NS_WSDL11, "required")));
      dest.addNotUnderstoodExtElement(notUnderstoodElement);
   }
View Full Code Here

            //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

TOP

Related Classes of org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement

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.