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


Java SOAP12Address类代码示例

本文整理汇总了Java中javax.wsdl.extensions.soap12.SOAP12Address的典型用法代码示例。如果您正苦于以下问题:Java SOAP12Address类的具体用法?Java SOAP12Address怎么用?Java SOAP12Address使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getBindingId

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the SOAP Binding Id for the specified {@link Port}.
 *
 * @param port The WSDL port.
 * @param mtomEnabled MTOM feature boolean
 * @return The SOAPBinding Id found on the port.
 */
public static String getBindingId(Port port, Boolean mtomEnabled) {
    String bindingId = null; 
    List<ExtensibilityElement> extElements = port.getExtensibilityElements();
    for (ExtensibilityElement extElement : extElements) {
        if (extElement instanceof SOAP12Address) {
            if (mtomEnabled) {
                bindingId = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING;
            } else {
                bindingId = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING;
            }
            break;
        } else {
            if (mtomEnabled) {
                bindingId = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_MTOM_BINDING;
            } else {
                bindingId = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING;
            }
            break;
        }
    }
    return bindingId;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:30,代码来源:WSDLUtil.java

示例2: getEPRfromWSDL

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the EPR of this service from the WSDL.
 *
 * @param wsdlDef     WSDL Definition
 * @param serviceName service name
 * @param portName    port name
 * @return XML representation of the EPR
 */
public static String getEPRfromWSDL(
        final Definition wsdlDef,
        final QName serviceName,
        final String portName) {
    Service serviceDef = wsdlDef.getService(serviceName);
    if (serviceDef != null) {
        Port portDef = serviceDef.getPort(portName);
        if (portDef != null) {
            for (Object extElmt : portDef.getExtensibilityElements()) {
                if (extElmt instanceof SOAPAddress) {
                    return ((SOAPAddress) extElmt).getLocationURI();
                } else if (extElmt instanceof HTTPAddress) {
                    return ((HTTPAddress) extElmt).getLocationURI();
                } else if (extElmt instanceof SOAP12Address) {
                    return ((SOAP12Address) extElmt).getLocationURI();
                }
            }
        }
    }
    return null;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:30,代码来源:AxisServiceUtils.java

示例3: getEndpointAddress

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the SOAP Binding Id for the specified {@link Port}.
 *
 * @param port The WSDL port.
 * @return The endpoint address.
 */
public static String getEndpointAddress(Port port) {
    String address = null; 
    List<ExtensibilityElement> extElements = port.getExtensibilityElements();
    for (ExtensibilityElement extElement : extElements) {
        if (extElement instanceof SOAPAddress) {
            address = ((SOAPAddress)extElement).getLocationURI();
            break;
        } else if (extElement instanceof SOAP12Address) {
            address = ((SOAP12Address)extElement).getLocationURI();
            break;
        }
    }
    return address;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:21,代码来源:WSDLUtil.java

示例4: getPortAddress

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
public static String getPortAddress(final Port port) {
    final Collection<?> extensibilityElements = port.getExtensibilityElements();
    SOAPAddress soapAddress = findExtensibilityElement(extensibilityElements, SOAPAddress.class);
    if (null != soapAddress) {
        return soapAddress.getLocationURI();
    }
    SOAP12Address soap12Address = findExtensibilityElement(extensibilityElements, SOAP12Address.class);
    if (null != soap12Address) {
        return soap12Address.getLocationURI();
    }
    return null;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:13,代码来源:WSDLUtils.java

示例5: getSOAPAddressFromElement

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
static String getSOAPAddressFromElement(ExtensibilityElement extElement) {
    String returnAddress = null;

    if (extElement != null) {
        if (SOAP_11_ADDRESS_ELEMENT.equals(extElement.getElementType())) {
            returnAddress = ((SOAPAddress)extElement).getLocationURI();
        } else if (SOAP_12_ADDRESS_ELEMENT.equals(extElement.getElementType())) {
            returnAddress = ((SOAP12Address)extElement).getLocationURI();
        }
    }

    return returnAddress;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:14,代码来源:EndpointDescriptionImpl.java

示例6: getSOAPAddress

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the SOAP address location for the specified port.
 *
 * @param p A WSDL Port instance.
 * @return The SOAP address URI.
 */
protected static String getSOAPAddress(Port p) {
    ExtensibilityElement e = findExtensibilityElement(p, SOAP_PORT_ADDRESS_NAME);
    if (e instanceof SOAP12Address) {
    	return ((SOAP12Address) e).getLocationURI();
    } else {
    	return ((SOAPAddress)e).getLocationURI();
    }
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:15,代码来源:WsdlUtils.java

示例7: getSOAPAddress

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the SOAP address location for the specified port.
 *
 * @param p A WSDL Port instance.
 * @return The SOAP address URI.
 */
protected static String getSOAPAddress(Port p) {
    ExtensibilityElement e = findExtensibilityElement(p, SOAP_PORT_ADDRESS_NAME);
    if (e instanceof SOAP12Address) {
    	return ((SOAP12Address) e).getLocationURI();
    } else if (e instanceof SOAPAddress) {
    	return ((SOAPAddress)e).getLocationURI();
    }

    return null;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:17,代码来源:WsdlUtils.java

示例8: getSOAPAddress

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the SOAP address location for the specified port.
 *
 * @param p
 *          A WSDL Port instance.
 * @return The SOAP address URI.
 */
protected static String getSOAPAddress( Port p ) {
  ExtensibilityElement e = findExtensibilityElement( p, SOAP_PORT_ADDRESS_NAME );
  if ( e instanceof SOAP12Address ) {
    return ( (SOAP12Address) e ).getLocationURI();
  } else if ( e instanceof SOAPAddress ) {
    return ( (SOAPAddress) e ).getLocationURI();
  }

  return null;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:WsdlUtils.java

示例9: populateComponent

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
private static ServiceInfo populateComponent(Service service) {
    ServiceInfo serviceInfo = new ServiceInfo();
    serviceInfo.setServiceName(service.getQName());
    Collection<Port> ports = service.getPorts().values();
    for (Port port : ports) {
        String soapLocation = null;
        SOAPAddress soapAddress = findExtensibilityElement(port.getExtensibilityElements(), SOAPAddress.class);
        if (null != soapAddress) {
            soapLocation = soapAddress.getLocationURI();
        } else {
            SOAP12Address soap12Address = findExtensibilityElement(port.getExtensibilityElements(), SOAP12Address.class);
            if (null != soap12Address) {
                soapLocation = soap12Address.getLocationURI();
            }
        }
        Binding binding = port.getBinding();
        for (BindingOperation operation : (Collection<BindingOperation>) binding.getBindingOperations()) {
            SOAPOperation soapOperation = findExtensibilityElement(operation.getExtensibilityElements(), SOAPOperation.class);

            if (null != soapOperation && OPERATION_TYPE_RPC.equalsIgnoreCase(soapOperation.getStyle())) {
                // TESB-6151 disable display of unsupported RPC type.
                serviceInfo.setHasRpcOperation(true);
                continue;
            }
            OperationInfo operationInfo = new OperationInfo(operation.getOperation());
            operationInfo.setPortName(port.getName());
            operationInfo.setNamespaceURI(binding.getPortType().getQName().getNamespaceURI());
            if (soapOperation != null) {
                operationInfo.setSoapActionURI(soapOperation.getSoapActionURI());
            } else {
                SOAP12Operation soap12Operation = findExtensibilityElement(operation.getExtensibilityElements(),
                        SOAP12Operation.class);
                if (soap12Operation != null) {
                    operationInfo.setSoapActionURI(soap12Operation.getSoapActionURI());
                }
            }

            operationInfo.setTargetURL(soapLocation);
            serviceInfo.addOperation(operationInfo);
        }
    }
    return serviceInfo;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:44,代码来源:ComponentBuilder.java

示例10: genEPRfromWSDL

import javax.wsdl.extensions.soap12.SOAP12Address; //导入依赖的package包/类
/**
 * Get the EPR of this service from the WSDL.
 *
 * @param wsdlDef     WSDL Definition
 * @param serviceName service name
 * @param portName    port name
 * @return XML representation of the EPR
 */
public static Element genEPRfromWSDL(
        final Definition wsdlDef,
        final QName serviceName,
        final String portName) {

    Service serviceDef = wsdlDef.getService(serviceName);
    if (serviceDef != null) {
        Port portDef = serviceDef.getPort(portName);
        if (portDef != null) {
            Document doc = DOMUtils.newDocument();
            Element service = doc.createElementNS(Namespaces.WSDL_11, "service");
            service.setAttribute("name", serviceDef.getQName().getLocalPart());
            service.setAttribute("targetNamespace", serviceDef.getQName().getNamespaceURI());
            Element port = doc.createElementNS(Namespaces.WSDL_11, "port");
            service.appendChild(port);
            port.setAttribute("name", portDef.getName());
            port.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:bindns",
                    portDef.getBinding().getQName().getNamespaceURI());
            port.setAttribute("bindns:binding", portDef.getName());
            for (Object extElmt : portDef.getExtensibilityElements()) {
                if (extElmt instanceof SOAPAddress) {
                    Element soapAddr = doc.createElementNS(Namespaces.SOAP_NS, "address");
                    port.appendChild(soapAddr);
                    soapAddr.setAttribute("location", ((SOAPAddress) extElmt).getLocationURI());
                } else if (extElmt instanceof HTTPAddress) {
                    Element httpAddr = doc.createElementNS(Namespaces.HTTP_NS, "address");
                    port.appendChild(httpAddr);
                    httpAddr.setAttribute("location", ((HTTPAddress) extElmt).getLocationURI());
                } else if (extElmt instanceof SOAP12Address) {
                    Element soap12Addr = doc.createElementNS(Namespaces.SOAP12_NS, "address");
                    port.appendChild(soap12Addr);
                    soap12Addr.setAttribute("location", ((SOAP12Address) extElmt).getLocationURI());
                } else {
                    port.appendChild(
                            doc.importNode(((UnknownExtensibilityElement) extElmt).getElement(),
                                    true));
                }
            }
            return service;
        }
    }
    return null;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:52,代码来源:BPELProcessProxy.java


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