Package org.jboss.ws.metadata.wsdl

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


   protected void appendInterfaces(StringBuilder buffer, String namespace)
   {
      WSDLInterface[] intfs = wsdl.getInterfaces();
      for (int i = 0; i < intfs.length; i++)
      {
         WSDLInterface intf = intfs[i];
         if (!namespace.equals(intf.getName().getNamespaceURI()))
            continue;

         buffer.append("<portType name='" + intf.getName().getLocalPart() + "'");
         WSDLProperty policyProp = intf.getProperty(Constants.WSDL_PROPERTY_POLICYURIS);
         if (policyProp != null)
         {
            String prefix = wsdl.getPrefix(Constants.URI_WS_POLICY);
            buffer.append(" ");
            buffer.append(prefix);
View Full Code Here


      for (int i = 0; i < operations.length; i++)
      {
         WSDLBindingOperation operation = operations[i];
         QName interfaceName = operation.getWsdlBinding().getInterfaceName();

         WSDLInterface wsdlInterface = wsdl.getInterface(interfaceName);
         if (wsdlInterface == null)
            throw new WSException("WSDL Interface should not be null");
         WSDLInterfaceOperation interfaceOperation = wsdlInterface.getOperation(operation.getRef());

         buffer.append("<operation name='" + interfaceOperation.getName().getLocalPart() + "'>");
         String soapAction = (operation.getSOAPAction() != null ? operation.getSOAPAction() : "");
         appendUnknownExtensibilityElements(buffer, operation);
         buffer.append("<" + soapPrefix + ":operation soapAction=\"" + soapAction + "\"/>");
View Full Code Here

      String address = endpoint.getEndpointAddress();
      wsdlEndpoint.setAddress(address == null ? "REPLACE_WITH_ACTUAL_URL" : address);
      service.addEndpoint(wsdlEndpoint);

      QName interfaceQName = endpoint.getPortTypeName();
      WSDLInterface wsdlInterface = new WSDLInterface(wsdl, interfaceQName);
      wsdl.addInterface(wsdlInterface);

      // Add imports
      if (!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
      {
         WSDLImport wsdlImport = new WSDLImport(wsdl);
         wsdlImport.setLocation(interfaceQName.getLocalPart() + "_PortType");
         wsdlImport.setNamespace(interfaceQName.getNamespaceURI());
         wsdl.addImport(wsdlImport);
         wsdl.registerNamespaceURI(interfaceQName.getNamespaceURI(), null);
      }

      QName bindingQName = new QName(interfaceQName.getNamespaceURI(), interfaceQName.getLocalPart() + "Binding");
      WSDLBinding wsdlBinding = new WSDLBinding(wsdl, bindingQName);
      wsdlBinding.setInterfaceName(interfaceQName);
      wsdlBinding.setType(endpoint.getBindingId());
      wsdl.addBinding(wsdlBinding);
      wsdlEndpoint.setBinding(bindingQName);

      if (endpoint.getDocumentation() != null)
      {
         String prefix = wsdl.getPrefix(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS);
         if (prefix == null)
         {
            prefix = "jaxws";
            wsdl.registerNamespaceURI(Constants.URI_JAXWS_WSDL_CUSTOMIZATIONS, prefix);
         }
        
         Element javadocElement = DOMUtils.createElement(Constants.WSDL_ELEMENT_JAXWS_JAVADOC.getLocalPart(), prefix);
         javadocElement.setTextContent(endpoint.getDocumentation());
         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())
      {
         processOperation(wsdlInterface, wsdlBinding, operation);
View Full Code Here

   /** Inititialize the endpoint binding */
   protected void initEndpointBinding(WSDLEndpoint wsdlEndpoint, EndpointMetaData epMetaData)
   {
      WSDLDefinitions wsdlDefinitions = wsdlEndpoint.getWsdlService().getWsdlDefinitions();
      WSDLInterface wsdlInterface = wsdlEndpoint.getInterface();
      WSDLBinding wsdlBinding = wsdlDefinitions.getBindingByInterfaceName(wsdlInterface.getName());
      initEndpointBinding(wsdlBinding, epMetaData);
   }
View Full Code Here

      log.trace("processPortType: " + srcPortType.getQName());

      QName qname = srcPortType.getQName();
      if (destWsdl.getInterface(qname) == null)
      {
         WSDLInterface destInterface = new WSDLInterface(destWsdl, qname);

         // documentation
         Element documentationElement = srcPortType.getDocumentationElement();
         if (documentationElement != null && documentationElement.getTextContent() != null)
         {
            destInterface.setDocumentationElement(new WSDLDocumentation(documentationElement.getTextContent()));
         }

         destWsdl.addInterface(destInterface);

         processPortTypeOperations(srcWsdl, destInterface, srcPortType, destBinding);
View Full Code Here

   private void processBindingOperation(Definition srcWsdl, WSDLBinding destBinding, String bindingStyle, BindingOperation srcBindingOperation) throws WSDLException
   {
      String srcOperationName = srcBindingOperation.getName();
      log.trace("processBindingOperation: " + srcOperationName);

      WSDLInterface destInterface = destBinding.getInterface();
      String namespaceURI = destInterface.getName().getNamespaceURI();

      WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
      QName refQName = new QName(namespaceURI, srcOperationName);
      destBindingOperation.setRef(refQName);
      processUnknownExtensibilityElements(srcBindingOperation, destBindingOperation);
      destBinding.addOperation(destBindingOperation);

      String opName = srcOperationName;
      WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(opName);

      // Process soap:operation@soapAction, soap:operation@style
      List<ExtensibilityElement> extList = srcBindingOperation.getExtensibilityElements();
      for (ExtensibilityElement extElement : extList)
      {
View Full Code Here

      log.trace("processPortType: " + srcPortType.getQName());

      QName qname = srcPortType.getQName();
      if (destWsdl.getInterface(qname) == null)
      {
         WSDLInterface destInterface = new WSDLInterface(destWsdl, qname);

         //policy extensions
         QName policyURIsProp = (QName)srcPortType.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSP_POLICYURIS);
         if (policyURIsProp != null && !"".equalsIgnoreCase(policyURIsProp.getLocalPart()))
         {
            destInterface.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_POLICYURIS, policyURIsProp.getLocalPart()));
         }

         // eventing extensions
         QName eventSourceProp = (QName)srcPortType.getExtensionAttribute(Constants.WSDL_ATTRIBUTE_WSE_EVENTSOURCE);
         if (eventSourceProp != null && eventSourceProp.getLocalPart().equals(Boolean.TRUE.toString()))
         {
            destInterface.addProperty(new WSDLProperty(Constants.WSDL_PROPERTY_EVENTSOURCE, eventSourceProp.getLocalPart()));
         }

         destWsdl.addInterface(destInterface);

         processPortTypeOperations(srcWsdl, destInterface, srcPortType);
View Full Code Here

   private void processBindingOperation(Definition srcWsdl, WSDLBinding destBinding, String bindingStyle, BindingOperation srcBindingOperation) throws WSDLException
   {
      String srcOperationName = srcBindingOperation.getName();
      log.trace("processBindingOperation: " + srcOperationName);

      WSDLInterface destInterface = destBinding.getInterface();
      String namespaceURI = destInterface.getName().getNamespaceURI();

      WSDLBindingOperation destBindingOperation = new WSDLBindingOperation(destBinding);
      QName refQName = new QName(namespaceURI, srcOperationName);
      destBindingOperation.setRef(refQName);
      processUnknownExtensibilityElements(srcBindingOperation, destBindingOperation);
      destBinding.addOperation(destBindingOperation);

      String opName = srcOperationName;
      WSDLInterfaceOperation destIntfOperation = destInterface.getOperation(opName);

      // Process soap:operation@soapAction, soap:operation@style
      List<ExtensibilityElement> extList = srcBindingOperation.getExtensibilityElements();
      for (ExtensibilityElement extElement : extList)
      {
View Full Code Here

      String address = endpoint.getEndpointAddress();
      wsdlEndpoint.setAddress(address == null ? "REPLACE_WITH_ACTUAL_URL" : address);
      service.addEndpoint(wsdlEndpoint);

      QName interfaceQName = endpoint.getPortTypeName();
      WSDLInterface wsdlInterface = new WSDLInterface(wsdl, interfaceQName);
      wsdl.addInterface(wsdlInterface);

      // Add imports
      if (!interfaceQName.getNamespaceURI().equals(endpoint.getServiceMetaData().getServiceName().getNamespaceURI()))
      {
View Full Code Here

         WSDLEndpoint endpt = endpoints[j];
         QName binding = endpt.getBinding();
         WSDLBinding wsdlbind = wsdlDefinitions.getBinding(binding);
         String bindName = wsdlbind.getName().getLocalPart();
         QName portTypeName = wsdlbind.getInterfaceName();
         WSDLInterface wsdlintf = wsdlDefinitions.getInterface(portTypeName);
         String portName = wsdlintf.getName().getLocalPart();
         String javaPortName = utils.chopPortType(portName);
         if (wsdlDefinitions.getService(javaPortName) != null)
            javaPortName += "_PortType";

         ServiceEndpointInterfaceMapping seim = new ServiceEndpointInterfaceMapping(jwm);
View Full Code Here

TOP

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

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.