本文整理汇总了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;
}
示例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;
}
示例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";
}
示例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 );
}
示例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);
}
}