本文整理了Java中javax.wsdl.Port.getBinding()
方法的一些代码示例,展示了Port.getBinding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Port.getBinding()
方法的具体详情如下:
包路径:javax.wsdl.Port
类名称:Port
方法名:getBinding
[英]Get the binding this port refers to.
[中]获取此端口引用的绑定。
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Get the PortType name for the service which has been specified by serviceName and portName at construction time.
*
* @return QName of the PortType.
*/
public QName getPortTypeQName() {
Binding b = _port.getBinding();
return b.getPortType().getQName();
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Get a list of all operations defined in this WSDL.
*
* @return List of WsdlOperations.
*/
@SuppressWarnings( "unchecked" )
public List<WsdlOperation> getOperations() throws KettleStepException {
List<WsdlOperation> opList = new ArrayList<WsdlOperation>();
PortType pt = _port.getBinding().getPortType();
List<Operation> operations = pt.getOperations();
for ( Iterator<Operation> itr = operations.iterator(); itr.hasNext(); ) {
WsdlOperation operation = getOperation( itr.next().getName() );
if ( operation != null ) {
opList.add( operation );
}
}
return opList;
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Find the specified operation in the WSDL definition.
*
* @param operationName
* Name of operation to find.
* @return A WsdlOperation instance, null if operation can not be found in WSDL.
*/
public WsdlOperation getOperation( String operationName ) throws KettleStepException {
// is the operation in the cache?
if ( _operationCache.containsKey( operationName ) ) {
return _operationCache.get( operationName );
}
Binding b = _port.getBinding();
PortType pt = b.getPortType();
Operation op = pt.getOperation( operationName, null, null );
if ( op != null ) {
try {
WsdlOperation wop = new WsdlOperation( b, op, _wsdlTypes );
// cache the operation
_operationCache.put( operationName, wop );
return wop;
} catch ( KettleException kse ) {
LogChannel.GENERAL.logError( "Could not retrieve WSDL Operator for operation name: " + operationName );
throw new KettleStepException(
"Could not retrieve WSDL Operator for operation name: " + operationName, kse );
}
}
return null;
}
代码示例来源:origin: wsdl4j/wsdl4j
Binding binding = port.getBinding();
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
String bindingID = null;
List<? extends ExtensibilityElement> extensions
= CastUtils.cast(port.getBinding().getExtensibilityElements());
if (!extensions.isEmpty()) {
ExtensibilityElement e = extensions.get(0);
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
try {
Definition def = wsdlManager.getDefinition(wsdlDocumentLocation);
interfaceName = def.getService(serviceName).getPort(portName.getLocalPart()).getBinding()
.getPortType().getQName();
} catch (Exception e) {
代码示例来源:origin: org.wso2.bpel/ode-utils
/**
* @see #useHTTPBinding(javax.wsdl.Binding)
*/
public static boolean useHTTPBinding(Port port) {
return useHTTPBinding(port.getBinding());
}
代码示例来源:origin: org.apache.woden/woden-tool
private PortType getServicePortType(Port port)
{
Binding binding = port.getBinding();
PortType servicePortType = null;
if (binding != null)
{
servicePortType = binding.getPortType();
}
return servicePortType;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.axis.consumption.ui
public static String getPackageName(Port port, Map ns2pkgMap)
{
if (port != null)
return getPackageName(port.getBinding(), ns2pkgMap);
else
return "";
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.axis.consumption.ui
public static String getPackageNameForBindingImpl(Port port)
{
if (port != null)
{
Binding binding = port.getBinding();
// PortType portType = binding.getPortType();
QName bndQName = binding.getQName();
String namespace = bndQName.getNamespaceURI();
return namespaceURI2PackageName(namespace);
}
return "";
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
public void visit(Port port, Object parent, WSDLTraversalContext ctx)
{
if (port
.getBinding()
.getQName()
.getLocalPart()
.equals(ctx.getParameter(BINDING_PARAM).toString()))
{
((Vector) ctx.getParameter(PORTS_PARAM)).add(port);
}
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
public Binding getWSDLBinding() {
Binding wsdlBinding = null;
Port wsdlPort = getWSDLPort();
Definition wsdlDef = getWSDLDefinition();
if (wsdlPort != null && wsdlDef != null) {
wsdlBinding = wsdlPort.getBinding();
}
return wsdlBinding;
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public void visit(Port port, Object parent, WSDLTraversalContext ctx)
{
if (port != null)
{
Binding binding = port.getBinding();
if (binding != null)
{
checkNamespace(binding.getQName(), ctx);
}
}
}
代码示例来源:origin: org.ow2.orchestra/orchestra-axis
/**
* Create new java implementations for each binding of the given definition.
*
* @param def - the definition to analyse.
* @return a list of created classes
*/
private String updateImplementationFile(final Port port) {
final Binding binding = port.getBinding();
return new BindingFileWriter(this.servicesDir, binding, this.bpelProcess).write();
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
public void configure() throws Exception
{
begin(wservice, portType);
for (Iterator iterator1 = ports.iterator(); iterator1.hasNext();)
{
Port port = (Port) iterator1.next();
Binding binding = port.getBinding();
visit(binding);
visit(port);
}
end(wservice, portType);
}
代码示例来源:origin: org.wso2.bpel/ode-utils
/**
* @see #getBindingExtension(javax.wsdl.Binding)
*/
public static ExtensibilityElement getBindingExtension(Port port) {
Binding binding = port.getBinding();
if (binding == null) {
throw new IllegalArgumentException(msgs.msgBindingNotFound(port.getName()));
}
return getBindingExtension(binding);
}
代码示例来源:origin: apache/cxf
public static QName getServiceName(Binding binding, Definition wsdlDef) {
LOG.log(Level.FINE, "Getting service name for an object reference");
Collection<Service> services = CastUtils.cast(wsdlDef.getServices().values());
for (Service serv : services) {
Collection<Port> ports = CastUtils.cast(serv.getPorts().values());
for (Port pt : ports) {
if (pt.getBinding().equals(binding)) {
return serv.getQName();
}
}
}
return null;
}
代码示例来源:origin: apache/cxf
public static String getEndpointName(Binding binding, Definition wsdlDef) {
LOG.log(Level.FINE, "Getting endpoint name for an object reference");
Collection<Service> services = CastUtils.cast(wsdlDef.getServices().values());
for (Service serv : services) {
Collection<Port> ports = CastUtils.cast(serv.getPorts().values());
for (Port pt : ports) {
if (pt.getBinding().equals(binding)) {
return pt.getName();
}
}
}
return null;
}
代码示例来源:origin: org.objectweb.celtix/celtix-rt
private BindingOperation getBindingOperation(String operationName) throws WSDLException {
WSDLHelper helper = new WSDLHelper();
Port port = EndpointReferenceUtils.getPort(this.bus.getWSDLManager(), this.endpointRef);
return helper.getBindingOperation(port.getBinding(),
operationName);
}
代码示例来源:origin: org.fabric3/fabric3-binding-ws-metro
public ReferenceEndpointDefinition resolveReferenceEndpoint(WsdlElement wsdlElement, Definition wsdl) throws EndpointResolutionException {
QName serviceName = wsdlElement.getServiceName();
QName portName = wsdlElement.getPortName();
Port port = resolveAndValidatePort(serviceName, portName, wsdl);
URL url = getAddress(port);
QName portTypeName = port.getBinding().getPortType().getQName();
String serializedWsdl = serializeWsdl(wsdl);
return new ReferenceEndpointDefinition(serviceName, true, portName, portTypeName, url, serializedWsdl);
}
内容来源于网络,如有侵权,请联系作者删除!