本文整理了Java中javax.wsdl.Binding.getBindingOperation()
方法的一些代码示例,展示了Binding.getBindingOperation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.getBindingOperation()
方法的具体详情如下:
包路径:javax.wsdl.Binding
类名称:Binding
方法名:getBindingOperation
[英]Get the specified operation binding. Note that operation names can be overloaded within a PortType. In case of overloading, the names of the input and output messages can be used to further refine the search.
The search criteria will be the operation name parameter and any non-null input or output message name parameters. To exclude the input or output message name from the search criteria, specify a null value for the input or output message name parameter. To search for operations with unnamed input or output messages (i.e. <input> or <output> elements with the 'name' attribute omitted), specify the string ":none
" for the input or output message name parameter.
Note: the use of a string value ":none
" rather than null to search for unnamed input or output messages is necessary to retain backward compatibility with earlier versions of the JWSDL API, which defined a null value to mean 'ignore this parameter'. The colon in ":none
" is to avoid name clashes with input or output message names, which must be of type NCName (i.e. they cannot contain colons).
[中]获取指定的操作绑定。请注意,操作名称可以在PortType中重载。在重载的情况下,可以使用输入和输出消息的名称进一步优化搜索。
搜索条件将是操作名称参数和任何非空的输入或输出消息名称参数。要从搜索条件中排除输入或输出消息名称,请为输入或输出消息名称参数指定空值。要搜索具有未命名输入或输出消息的操作(即省略了“name”属性的<input>或<output>元素),请为输入或输出消息名称参数指定字符串“[$0$]”。
注意:为了保持与JWSDL API早期版本的向后兼容性,必须使用字符串值“:none
”而不是null来搜索未命名的输入或输出消息,JWSDL API将null值定义为“忽略此参数”。“:none
”中的冒号是为了避免名称与输入或输出消息名称冲突,输入或输出消息名称必须为NCName类型(即它们不能包含冒号)。
代码示例来源:origin: pentaho/pentaho-kettle
BindingOperation bindingOperation = binding.getBindingOperation( operationName, null, null );
if ( bindingOperation == null ) {
throw new IllegalArgumentException( "Can not find operation: " + operationName );
代码示例来源:origin: pentaho/pentaho-kettle
BindingOperation bindingOperation = binding.getBindingOperation( operationName, null, null );
代码示例来源:origin: pentaho/pentaho-kettle
_soapAction = WsdlUtils.getSOAPAction( binding.getBindingOperation( op.getName(), null, null ) );
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel
public static BindingOperation getBindingOperation(
final BPELMessageContext bpelMessageContext, final String operationName) {
BindingOperation bOp = bpelMessageContext.getWsdlBindingForCurrentMessageFlow()
.getBindingOperation(operationName, null, null);
if (bOp == null) {
throw new NullPointerException("BindingOperation not found for operation "
+ operationName + ".");
}
return bOp;
}
代码示例来源:origin: stackoverflow.com
WSDLFactory factory = WSDLFactory.newInstance();
WSDLReader reader = factory.newWSDLReader();
Definition definition = reader.readWSDL("http://www.w3schools.com/webservices/tempconvert.asmx?wsdl");
Binding binding = definition.getBinding(new QName("http://tempuri.org/", "TempConvertSoap"));
BindingOperation operation = binding.getBindingOperation("CelsiusToFahrenheit", null, null);
List extensions = operation.getExtensibilityElements();
if (extensions != null) {
for (int i = 0; i < extensions.size(); i++) {
ExtensibilityElement extElement = (ExtensibilityElement) extensions.get(i);
// ....
if (extElement instanceof SOAPOperation) {
SOAPOperation soapOp = (SOAPOperation) extElement;
System.out.println(soapOp.getSoapActionURI());
}
// ....
}
}
代码示例来源:origin: org.ow2.orchestra/orchestra-utils
/**
* Retrieves a BindingOperation using a given operation name
*
* @param definition The WSDL definition
* @param operationName the given operation name
* @return The corresponding binding operation or <code>null</code>
*/
@SuppressWarnings("unchecked")
public static BindingOperation getBindingOperation(final Definition definition, final String operationName) {
final Map<QName, Service> services = definition.getAllServices();
for (QName qName : services.keySet()) {
final Service service = definition.getService(qName);
final Map<String, Port> ports = service.getPorts();
for (String key : ports.keySet()) {
final Port port = service.getPort(key);
final BindingOperation bindingOperation = port.getBinding().getBindingOperation(operationName, null, null);
if (bindingOperation != null)
return bindingOperation;
}
}
final Map<QName, Binding> bindings = definition.getAllBindings();
for (QName key : bindings.keySet()) {
final Binding binding = bindings.get(key);
final BindingOperation bindingOperation = binding.getBindingOperation(operationName, null, null);
if (bindingOperation != null)
return bindingOperation;
}
return null;
}
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel
public WSDLAwareMessage parseRequest() throws AxisFault {
/**
* I assume that local part of the Axis Operation's name is always equal to
* the operation name in the WSDL.
*/
BindingOperation bindingOp = wsdlBinding.getBindingOperation(
wsdlBinding.getPortType().getOperation(
inMessageCtx.getAxisOperation().getName().getLocalPart(),
null,
null).getName(),
null,
null);
if (bindingOp == null) {
throw new AxisFault("WSDL binding operation not found for service: " +
serviceName.getLocalPart() + " port: " + portName);
}
BindingInput bindingInput = bindingOp.getBindingInput();
if (bindingInput == null) {
throw new AxisFault("BindingInput not found for service: " +
serviceName.getLocalPart() + " port: " + portName);
}
return processMessageParts(bindingInput);
}
代码示例来源:origin: org.jboss.ws.native/jbossws-native-core
private BindingOperation getBindingOperation(Definition srcWsdl, PortType srcPortType, Operation srcOperation) throws WSDLException
{
Binding srcBinding = getPortTypeBindings(srcWsdl).get(srcPortType.getQName());
if (srcBinding == null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find binding for: " + srcPortType.getQName());
String srcOperationName = srcOperation.getName();
BindingOperation srcBindingOperation = srcBinding.getBindingOperation(srcOperationName, null, null);
if (srcBindingOperation == null)
throw new WSDLException(WSDLException.INVALID_WSDL, "Cannot find binding operation for: " + srcOperationName);
return srcBindingOperation;
}
代码示例来源:origin: org.apache.axis2/axis2-metadata
binding.getBindingOperation(getOperationName(), null, null);
if (bindingOp != null && bindingOp.getBindingInput() != null) {
if (log.isDebugEnabled()) {
代码示例来源:origin: apache/axis2-java
binding.getBindingOperation(getOperationName(), null, null);
if (bindingOp != null && bindingOp.getBindingInput() != null) {
if (log.isDebugEnabled()) {
代码示例来源:origin: org.apache.axis2/axis2-metadata
binding.getBindingOperation(getOperationName(), null, null);
if (bindingOp != null && bindingOp.getBindingOutput() != null) {
if (log.isDebugEnabled()) {
代码示例来源:origin: apache/axis2-java
binding.getBindingOperation(getOperationName(), null, null);
if (bindingOp != null && bindingOp.getBindingOutput() != null) {
if (log.isDebugEnabled()) {
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel
.getBindingOperation(partnerMessageContext.getOperationName(), null, null);
if (bop == null) {
return "";
代码示例来源:origin: org.jboss.fuse.wsdl2rest/wsdl2rest-impl
BindingOperation bop = binding.getBindingOperation(opName, null, null);
for (Object aux : bop.getExtensibilityElements()) {
if (aux instanceof SOAPOperation) {
代码示例来源:origin: org.apache.servicemix/servicemix-soap2
for (Iterator iter = wsdlPortType.getOperations().iterator(); iter.hasNext();) {
Operation wsdlOperation = (Operation) iter.next();
BindingOperation wsdlBindingOperation = wsdlBinding.getBindingOperation(wsdlOperation.getName(), null, null);
SOAPOperation wsdlSoapOperation = WSDLUtils.getExtension(wsdlBindingOperation, SOAPOperation.class);
Wsdl1SoapOperationImpl operation = new Wsdl1SoapOperationImpl();
代码示例来源:origin: org.apache.servicemix/servicemix-soap2
for (Iterator iter = wsdlPortType.getOperations().iterator(); iter.hasNext();) {
Operation wsdlOperation = (Operation) iter.next();
BindingOperation wsdlBindingOperation = wsdlBinding.getBindingOperation(wsdlOperation.getName(), null, null);
SOAP12Operation wsdlSoapOperation = WSDLUtils.getExtension(wsdlBindingOperation, SOAP12Operation.class);
Wsdl1SoapOperationImpl operation = new Wsdl1SoapOperationImpl();
代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel
/**
* Attempts to extract the SOAP Action is defined in the WSDL document.
*
* @param partnerMessageContext BPELMessageContext
* @return the SOAPAction value if one is specified, otherwise empty string
*/
public static String getSoapAction(BPELMessageContext partnerMessageContext) {
BindingOperation bop = partnerMessageContext.getWsdlBindingForCurrentMessageFlow().
getBindingOperation(partnerMessageContext.getOperationName(), null, null);
if (bop == null) {
return "";
}
if (partnerMessageContext.isSoap12()) {
for (SOAP12Operation soapOp : CollectionsX.filter(bop.getExtensibilityElements(),
SOAP12Operation.class)) {
return soapOp.getSoapActionURI();
}
} else {
for (SOAPOperation soapOp : CollectionsX.filter(bop.getExtensibilityElements(),
SOAPOperation.class)) {
return soapOp.getSoapActionURI();
}
}
return "";
}
代码示例来源:origin: org.ow2.orchestra/orchestra-axis
private String getOperationStyle(final Operation operation) {
final Input input = operation.getInput();
String inputName = null;
if (input != null) {
inputName = input.getName();
}
String outputName = null;
final Output output = operation.getOutput();
if (output != null) {
outputName = output.getName();
}
final BindingOperation bindingOperation = this.binding.getBindingOperation(
operation.getName(), inputName, outputName);
final ExtensibilityElement soapBinding = WSDeployer
.getSoapBindingFromBinding(this.binding);
String soapBindingStyle = WSDeployer.getSOAPStyle(soapBinding);
if (soapBindingStyle == null) {
soapBindingStyle = WSDeployer.DEFAULT_SOAP_BINDING_STYLE;
}
final ExtensibilityElement soapOperation = WSDeployer
.getSoapOperationFromBindingOperation(bindingOperation);
String operationStyle = soapBindingStyle;
if (soapOperation != null) {
final String operationStyle2 = WSDeployer.getSOAPStyle(soapOperation);
if (operationStyle2 != null) {
operationStyle = operationStyle2;
}
}
return operationStyle;
}
代码示例来源:origin: net.bpelunit/framework
fOperation= fBinding.getBindingOperation(operationName, null, null);
代码示例来源:origin: org.mule.modules/mule-module-ws
BindingOperation bindingOperation = binding.getBindingOperation(this.operation, null, null);
if (bindingOperation == null)
内容来源于网络,如有侵权,请联系作者删除!