当前位置: 首页>>代码示例>>Java>>正文


Java Binding.getExtensibilityElements方法代码示例

本文整理汇总了Java中javax.wsdl.Binding.getExtensibilityElements方法的典型用法代码示例。如果您正苦于以下问题:Java Binding.getExtensibilityElements方法的具体用法?Java Binding.getExtensibilityElements怎么用?Java Binding.getExtensibilityElements使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.wsdl.Binding的用法示例。


在下文中一共展示了Binding.getExtensibilityElements方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getOperations

import javax.wsdl.Binding; //导入方法依赖的package包/类
/**
 * The method is here only for compatibility with other modules and will be removed as soon as other modules are updated.
 * 
 * @return a list of all SOAP operations found in the WSDL (including all imported definitions)
 * @deprecated
 */
@Deprecated
List<Operation> getOperations() {
    List<Operation> operations = new ArrayList<Operation>();
    
    Collection<Binding> bindings = definition.getAllBindings().values();
    for (Binding binding : bindings) {
        List<ExtensibilityElement> bindingExElements = binding.getExtensibilityElements();
        for (ExtensibilityElement bindingExElement : bindingExElements) {
            if (bindingExElement instanceof SOAPBinding ||
                bindingExElement instanceof SOAP12Binding) {
                List<BindingOperation> bindingOperations = binding.getBindingOperations();
                for (BindingOperation bindingOperation : bindingOperations) {
                    Operation operation = bindingOperation.getOperation();
                    if (operation != null) {
                        operations.add(operation);
                    }
                }
            }
        }
    }
    
    return operations;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:30,代码来源:WSDL11Parser.java

示例2: getBindingOperations

import javax.wsdl.Binding; //导入方法依赖的package包/类
private List<BindingOperation> getBindingOperations(String portName) {
    
    Port port = getPort(portName);
    if (port != null) {
        Binding binding = port.getBinding();
        if (binding != null) {
            List<ExtensibilityElement> bindingExElements = binding.getExtensibilityElements();
            for (ExtensibilityElement bindingExElement : bindingExElements) {
                if (bindingExElement instanceof SOAPBinding ||
                    bindingExElement instanceof SOAP12Binding) {
                    return binding.getBindingOperations();
                }
            }
        }
    }

    return Collections.EMPTY_LIST;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:19,代码来源:WSDL11Parser.java

示例3: getStyle

import javax.wsdl.Binding; //导入方法依赖的package包/类
private String getStyle(Binding binding) {
    String style = null;
    
    List<ExtensibilityElement> bindingExElements = binding.getExtensibilityElements();
    for (ExtensibilityElement bindingExElement : bindingExElements) {
        if (bindingExElement instanceof SOAPBinding) {
            SOAPBinding soapBinding = (SOAPBinding)bindingExElement;
            style = soapBinding.getStyle();
            break;
        } else if (bindingExElement instanceof SOAP12Binding) {
            SOAP12Binding soap12Binding = (SOAP12Binding)bindingExElement;
            style = soap12Binding.getStyle();
            break;
        }
    }
    
    return style != null ? style : "document";
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:19,代码来源:WSDL11Parser.java

示例4: convertPortType

import javax.wsdl.Binding; //导入方法依赖的package包/类
private void convertPortType( PortType portType, Binding binding )
	throws IOException
{
	String comment = "";
	if ( portType.getDocumentationElement() != null ) {
		comment = portType.getDocumentationElement().getNodeValue();
	}
	
	Style style = Style.DOCUMENT;
	for( ExtensibilityElement element : (List<ExtensibilityElement>)binding.getExtensibilityElements() ) {
		if ( element instanceof SOAPBinding ) {
			if ( "rpc".equals(((SOAPBinding)element).getStyle()) ) {
				style = Style.RPC;
			}
		} else if ( element instanceof HTTPBinding ) {
			style = Style.HTTP;
		}
	}
	Interface iface = new Interface( portType.getQName().getLocalPart(), comment );
	List< Operation > operations = portType.getOperations();
	for( Operation operation : operations ) {
		if ( operation.getOutput() == null ) {
			iface.addOneWayOperation( convertOperation( operation, style ) );
		} else {
			iface.addRequestResponseOperation( convertOperation( operation, style ) );
		}
	}
	interfaces.put( iface.name(), iface );
}
 
开发者ID:jolie,项目名称:jolie,代码行数:30,代码来源:WSDLConverter.java

示例5: testWSDLAccess

import javax.wsdl.Binding; //导入方法依赖的package包/类
@Test
@RunAsClient
public void testWSDLAccess() throws Exception
{
   URL wsdlURL = new URL(baseURL + "?wsdl");

   WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
   Definition wsdl = wsdlReader.readWSDL(wsdlURL.toString());

   String port = "SOAPEndpointPort";
   QName serviceQName = new QName("http://org.jboss.ws/jaxws/binding", "SOAPEndpointService");
   Binding wsdlBinding = wsdl.getService(serviceQName).getPort(port).getBinding();
   assertNotNull("Cannot find binding for port: " + port, wsdlBinding);

   String transport = null;
   @SuppressWarnings("unchecked")
   List<ExtensibilityElement> extList = wsdlBinding.getExtensibilityElements();
   for (ExtensibilityElement ext : extList)
   {
      if (ext instanceof SOAPBinding)
      {
         fail("Expected SOAP-1.2 binding");
      }
      else if (ext instanceof SOAP12Binding)
      {
         SOAP12Binding soapBinding = (SOAP12Binding)ext;
         transport = soapBinding.getTransportURI();
      }
   }
   if (isIntegrationCXF())
   {
      System.out.println("FIXME: [CXF-2531] Wrong \"transport\" attribute in soap12:binding");
   }
   else
   {
      assertEquals("Invalid transport uri", "http://schemas.xmlsoap.org/soap/http", transport);
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:39,代码来源:SOAPBindingTestCase.java


注:本文中的javax.wsdl.Binding.getExtensibilityElements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。