本文整理了Java中javax.wsdl.Binding.getPortType()
方法的一些代码示例,展示了Binding.getPortType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getPortType()
方法的具体详情如下:
包路径:javax.wsdl.Binding
类名称:Binding
方法名:getPortType
[英]Get the port type this is a binding for.
[中]获取此绑定的端口类型。
代码示例来源: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
PortType portType = binding.getPortType();
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
Definition def = wsdlManager.getDefinition(wsdlDocumentLocation);
interfaceName = def.getService(serviceName).getPort(portName.getLocalPart()).getBinding()
.getPortType().getQName();
} catch (Exception e) {
代码示例来源:origin: org.jboss.fuse.wsdl2rest/wsdl2rest-impl
private void processBinding(Definition def, Binding binding) {
QName qname = binding.getPortType().getQName();
log.info("\tBinding: {}", qname.getLocalPart());
processPortType(def, binding, binding.getPortType());
}
代码示例来源: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.objectweb.celtix/celtix-rt
public String getTargetNamespace() {
return binding.getPortType().getQName().getNamespaceURI();
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
protected void configurePort(Port port, Binding binding) throws WSDLException {
if ( wsBindingName != null ) {
port.setName(wsBindingName + getSOAPVersionString() + PORT_SUFFIX);
} else if (binding.getPortType() != null && binding.getPortType().getQName() != null) {
port.setName(binding.getPortType().getQName().getLocalPart() + PORT_SUFFIX);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
protected void configurePort(Port port, Binding binding) throws WSDLException {
if ( wsBindingName != null ) {
port.setName(wsBindingName + getSOAPVersionString() + PORT_SUFFIX);
} else if (binding.getPortType() != null && binding.getPortType().getQName() != null) {
port.setName(binding.getPortType().getQName().getLocalPart() + PORT_SUFFIX);
}
}
代码示例来源:origin: apache/cxf
private Binding findBinding(PortType intf) {
Object[] bindings = rootDefinition.getBindings().values().toArray();
for (int i = 0; i < bindings.length; i++) {
Binding binding = (Binding) bindings[i];
if (binding.getPortType().getQName().equals(intf.getQName())) {
return binding;
}
}
throw new RuntimeException("[InterfaceVisitor] Couldn't find binding for porttype "
+ intf.getQName());
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public void visit(Binding binding, Object parent, WSDLTraversalContext ctx)
{
if (binding != null)
{
PortType pType = binding.getPortType();
if (pType != null)
{
checkNamespace(pType.getQName(), ctx);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi
public void visit(Binding binding, Object parent, WSDLTraversalContext ctx)
{
if (binding != null)
{
PortType pType = binding.getPortType();
if (pType != null)
{
checkNamespace(pType.getQName(), ctx);
}
}
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
public List<Port> getWSDLPortsUsingPortType(QName portTypeQN) {
ArrayList<Port> portList = new ArrayList<Port>();
if (!DescriptionUtils.isEmpty(portTypeQN)) {
Map wsdlPortMap = getWSDLPorts();
if (wsdlPortMap != null && !wsdlPortMap.isEmpty()) {
for (Object mapElement : wsdlPortMap.values()) {
Port wsdlPort = (Port)mapElement;
PortType wsdlPortType = wsdlPort.getBinding().getPortType();
QName wsdlPortTypeQN = wsdlPortType.getQName();
if (portTypeQN.equals(wsdlPortTypeQN)) {
portList.add(wsdlPort);
}
}
}
}
return portList;
}
代码示例来源:origin: org.switchyard.components/switchyard-component-soap
/**
* Get the {@link Operation} instance for the specified SOAP operation name.
* @param port The WSDL port.
* @param operationName The SOAP Body element name.
* @return The Operation instance, or null if the operation was not found on the port.
*/
public static Operation getOperationByName(Port port, String operationName) {
Operation operation = null;
List<Operation> operationList = port.getBinding().getPortType().getOperations();
for (Operation op : operationList) {
if (op.getName().equals(operationName)) {
operation = op;
break;
}
}
return operation;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
private PortType getPortType(WebServiceBinding model) {
PortType portType = null;
if (model.getPort() != null) {
portType = model.getPort().getBinding().getPortType();
} else if (model.getEndpoint() != null) {
portType = model.getPort().getBinding().getPortType();
} else if (model.getBinding() != null) {
portType = model.getBinding().getPortType();
} else if (model.getService() != null) {
// FIXME: How to find the compatible port?
Map ports = model.getService().getPorts();
if (!ports.isEmpty()) {
Port port = (Port)ports.values().iterator().next();
portType = port.getBinding().getPortType();
}
}
return portType;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public Service createService(Definition definition, Binding binding, String serviceName) {
try {
Service service = definition.createService();
configureService(definition, service, binding.getPortType(), serviceName);
definition.addService(service);
return service;
} catch (WSDLException e) {
throw new WSDLGenerationException(e);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
public Service createService(Definition definition, Binding binding, String serviceName) {
try {
Service service = definition.createService();
configureService(definition, service, binding.getPortType(), serviceName);
definition.addService(service);
return service;
} catch (WSDLException e) {
throw new WSDLGenerationException(e);
}
}
代码示例来源: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);
}
代码示例来源:origin: de.tudarmstadt.ukp.dkpro.core/de.tudarmstadt.ukp.dkpro.core.io.wsdl-asl
private void processPort(JCasBuilder casBuilder, Port port, Selector selector)
{
if (!selector.port.equals(lastPort)) {
// Add Service name to textualServiceRepresentation
// This is used in the new version of the reader
casBuilder.add("Port:", StopWord.class);
casBuilder.add(" ");
casBuilder.add(port.getName(), Field.class).setName(FIELD_PORT_NAME);
casBuilder.add("\n");
processDocumentation(casBuilder, port.getDocumentationElement(), "",
"Port Documentation", FIELD_PORT_DOCUMENTATION);
lastPort = selector.port;
}
processOperation(casBuilder, port.getBinding().getPortType().getOperation(
selector.operation, selector.input, selector.output));
}
内容来源于网络,如有侵权,请联系作者删除!