本文整理汇总了Java中javax.wsdl.extensions.soap12.SOAP12Operation类的典型用法代码示例。如果您正苦于以下问题:Java SOAP12Operation类的具体用法?Java SOAP12Operation怎么用?Java SOAP12Operation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SOAP12Operation类属于javax.wsdl.extensions.soap12包,在下文中一共展示了SOAP12Operation类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSoapAction
import javax.wsdl.extensions.soap12.SOAP12Operation; //导入依赖的package包/类
/**
* Get the soapAction value for a given operation.
*
* @param operation The WSDL BindingOperation.
* @return the soapAction value if it exists.
*/
public static String getSoapAction(final BindingOperation operation) {
String soapActionUri = "";
if (operation != null) {
List<ExtensibilityElement> extElements = operation.getExtensibilityElements();
for (ExtensibilityElement extElement : extElements) {
if (extElement instanceof SOAPOperation) {
soapActionUri = ((SOAPOperation) extElement).getSoapActionURI();
break;
} else if (extElement instanceof SOAP12Operation) {
SOAP12Operation soapOperation = ((SOAP12Operation) extElement);
Boolean soapActionRequired = soapOperation.getSoapActionRequired();
if ((soapActionRequired == null) || soapActionRequired) {
soapActionUri = soapOperation.getSoapActionURI();
}
break;
}
}
}
return soapActionUri;
}
示例2: getSOAPStyle
import javax.wsdl.extensions.soap12.SOAP12Operation; //导入依赖的package包/类
/**
* A util method that returns the SOAP style included in the binding
* operation
*
* @param bindingOp
*/
private String getSOAPStyle(BindingOperation bindingOp) {
List extensibilityElements = bindingOp.getExtensibilityElements();
for (int i = 0; i < extensibilityElements.size(); i++) {
Object extElement = extensibilityElements.get(i);
if (extElement instanceof SOAPOperation) {
return ((SOAPOperation) extElement).getStyle();
} else if (extElement instanceof SOAP12Operation) {
return ((SOAP12Operation) extElement).getStyle();
}
}
return null;
}
示例3: getSOAPAction
import javax.wsdl.extensions.soap12.SOAP12Operation; //导入依赖的package包/类
/**
* Get the Soap Action URI from the operation's soap:operation extensiblity element.
*
* @param operation A WSDL Operation.
* @return Soap action URI as string, null if not defined.
*/
protected static String getSOAPAction(BindingOperation operation) {
ExtensibilityElement e = findExtensibilityElement(operation, SOAP_OPERATION_ELEMENT_NAME);
if (e != null) {
if (e instanceof SOAP12Operation) {
return ((SOAP12Operation)e).getSoapActionURI();
} else {
return ((SOAPOperation) e).getSoapActionURI();
}
}
return null;
}
示例4: getSOAPAction
import javax.wsdl.extensions.soap12.SOAP12Operation; //导入依赖的package包/类
/**
* Get the Soap Action URI from the operation's soap:operation extensiblity element.
*
* @param operation
* A WSDL Operation.
* @return Soap action URI as string, null if not defined.
*/
protected static String getSOAPAction( BindingOperation operation ) {
ExtensibilityElement e = findExtensibilityElement( operation, SOAP_OPERATION_ELEMENT_NAME );
if ( e != null ) {
if ( e instanceof SOAP12Operation ) {
return ( (SOAP12Operation) e ).getSoapActionURI();
} else {
return ( (SOAPOperation) e ).getSoapActionURI();
}
}
return null;
}
示例5: populateComponent
import javax.wsdl.extensions.soap12.SOAP12Operation; //导入依赖的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;
}