本文整理了Java中javax.wsdl.Port.getExtensibilityElements()
方法的一些代码示例,展示了Port.getExtensibilityElements()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Port.getExtensibilityElements()
方法的具体详情如下:
包路径:javax.wsdl.Port
类名称:Port
方法名:getExtensibilityElements
暂无
代码示例来源:origin: wsdl4j/wsdl4j
List extElements = port.getExtensibilityElements();
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
extensions = CastUtils.cast(port.getExtensibilityElements());
if (!extensions.isEmpty()) {
ExtensibilityElement e = extensions.get(0);
代码示例来源:origin: org.codehaus.xfire/xfire-core
public static SOAPAddress getSOAPAddress(Port port)
{
SOAPAddress soapAddress = null;
List extensibilityElements = port.getExtensibilityElements();
for (int i = 0; i < extensibilityElements.size(); i++)
{
Object element = extensibilityElements.get(i);
if (element instanceof SOAPAddress)
{
soapAddress = (SOAPAddress) element;
}
}
return soapAddress;
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
public Object getObject(String name) {
if (null == port) {
return null;
}
if ((serverType && "httpServer".equals(name)) || (!serverType && "httpClient".equals(name))) {
List<?> list = port.getExtensibilityElements();
for (Object ep : list) {
ExtensibilityElement ext = (ExtensibilityElement)ep;
if ((serverType && ext instanceof HTTPServerPolicy)
|| (!serverType && ext instanceof HTTPClientPolicy)) {
return ext;
}
}
}
return null;
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
public List<Port> getWSDLPortsUsingSOAPAddress(List<Port> wsdlPorts) {
ArrayList<Port> portsUsingAddress = new ArrayList<Port>();
if (wsdlPorts != null && !wsdlPorts.isEmpty()) {
for (Port checkPort : wsdlPorts) {
List extensibilityElementList = checkPort.getExtensibilityElements();
for (Object checkElement : extensibilityElementList) {
if (EndpointDescriptionImpl
.isSOAPAddressElement((ExtensibilityElement)checkElement)) {
portsUsingAddress.add(checkPort);
}
}
}
}
return portsUsingAddress;
}
代码示例来源:origin: org.apache.servicemix/servicemix-soap2
public static Binding<?> createBinding(javax.wsdl.Port wsdlPort) {
List elements = wsdlPort.getExtensibilityElements();
for (Iterator iter = elements.iterator(); iter.hasNext();) {
ExtensibilityElement element = (ExtensibilityElement) iter.next();
if (element instanceof SOAPAddress) {
return Wsdl1Soap11BindingFactory.createWsdl1SoapBinding(wsdlPort);
} else if (element instanceof SOAP12Address) {
return Wsdl1Soap12BindingFactory.createWsdl1SoapBinding(wsdlPort);
}
}
return null;
}
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel
private String getServiceLocation() {
for (Object extElement : getPortDefinition().getExtensibilityElements()) {
if (extElement instanceof HTTPAddress) {
return ((HTTPAddress) extElement).getLocationURI();
}
}
throw new NullPointerException("Service Location is null. Cannot find HTTP Address from WSDL definition");
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2
public static String getPortAddress(Port port) {
List<?> es = port.getExtensibilityElements();
if (es != null && es.size() > 0) {
Object ext = es.get(0);
if (ext instanceof SOAPAddress) {
return ((SOAPAddress)ext).getLocationURI();
}
if (ext instanceof SOAP12Address) {
return ((SOAP12Address)ext).getLocationURI();
}
}
return null;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws
public static String getPortAddress(Port port) {
Object ext = port.getExtensibilityElements().get(0);
if (ext instanceof SOAPAddress) {
return ((SOAPAddress)ext).getLocationURI();
}
if (ext instanceof SOAP12Address) {
return ((SOAP12Address)ext).getLocationURI();
}
return null;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public static String getPortAddress(Port port) {
Object ext = port.getExtensibilityElements().get(0);
if (ext instanceof SOAPAddress) {
return ((SOAPAddress)ext).getLocationURI();
}
if (ext instanceof SOAP12Address) {
return ((SOAP12Address)ext).getLocationURI();
}
return null;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2
public static void setPortAddress(Port port, String locationURI) {
Object ext = port.getExtensibilityElements().get(0);
if (ext instanceof SOAPAddress) {
((SOAPAddress)ext).setLocationURI(locationURI);
}
if (ext instanceof SOAP12Address) {
((SOAP12Address)ext).setLocationURI(locationURI);
}
}
代码示例来源:origin: apache/cxf
protected void setSoapAddressLocationOn(Port port, String url) {
List<?> extensions = port.getExtensibilityElements();
for (Object extension : extensions) {
if (extension instanceof SOAP12Address) {
((SOAP12Address)extension).setLocationURI(url);
} else if (extension instanceof SOAPAddress) {
((SOAPAddress)extension).setLocationURI(url);
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-simple
protected void setSoapAddressLocationOn(Port port, String url) {
List<?> extensions = port.getExtensibilityElements();
for (Object extension : extensions) {
if (extension instanceof SOAP12Address) {
((SOAP12Address)extension).setLocationURI(url);
} else if (extension instanceof SOAPAddress) {
((SOAPAddress)extension).setLocationURI(url);
}
}
}
代码示例来源:origin: org.mule.modules/mule-module-cxf
private void setSoapAddressLocationOn(Port port, String url) {
List<?> extensions = port.getExtensibilityElements();
for (Object extension : extensions) {
if (extension instanceof SOAP12Address) {
((SOAP12Address)extension).setLocationURI(url);
} else if (extension instanceof SOAPAddress) {
((SOAPAddress)extension).setLocationURI(url);
}
}
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
private String getBindingIdFromWSDL() {
Port port = null;
try {
port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), reference);
} catch (WSDLException we) {
return null;
}
return ((ExtensibilityElement)port.getExtensibilityElements().get(0)).
getElementType().getNamespaceURI();
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
private Object getAddress() {
List<?> list = port.getExtensibilityElements();
for (Object ep : list) {
ExtensibilityElement ext = (ExtensibilityElement)ep;
if (ext instanceof SOAPAddress) {
return ((SOAPAddress)ext).getLocationURI();
}
if (ext instanceof AddressType) {
return ((AddressType)ext).getLocation();
}
}
return null;
}
代码示例来源:origin: net.bpelunit/framework
/**
* Returns the SOAP Target URL for this operation.
*
* @return
* @throws SpecificationException
*/
public String getTargetURL() throws SpecificationException {
List<?> extensibilityElements= fPort.getExtensibilityElements();
for (Object supposedSOAPAddress : extensibilityElements) {
if (supposedSOAPAddress instanceof SOAPAddress) {
SOAPAddress adr= (SOAPAddress) supposedSOAPAddress;
return adr.getLocationURI();
}
}
throw new SpecificationException("I could not find a target URL for operation " + this);
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-jaxws-builder
private URL getAddressLocation(Port port) throws DeploymentException {
SOAPAddress soapAddress =
(SOAPAddress) getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
URL location = null;
if (soapAddress != null) {
String locationURIString = soapAddress.getLocationURI();
location = getURL(locationURIString);
}
return location;
}
代码示例来源:origin: org.objectweb.celtix/celtix-api
protected ServerTransport createTransport(EndpointReferenceType ref) throws WSDLException, IOException {
try {
Port port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), ref);
List<?> exts = port.getExtensibilityElements();
if (exts.size() > 0) {
ExtensibilityElement el = (ExtensibilityElement)exts.get(0);
TransportFactory tf =
bus.getTransportFactoryManager().
getTransportFactory(el.getElementType().getNamespaceURI());
return tf.createServerTransport(ref);
}
} catch (BusException ex) {
LOG.severe("TRANSPORT_FACTORY_RETRIEVAL_FAILURE_MSG");
}
return null;
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
public Object getObject(String name) {
if (!"rmAssertion".equals(name)) {
return null;
}
Element policyElem = getPolicy(port.getBinding().getExtensibilityElements(), null);
if (null == policyElem) {
policyElem = getPolicy(port.getExtensibilityElements(), null);
}
if (null != policyElem) {
return getRMAssertion(policyElem);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!