javax.wsdl.extensions.soap12.SOAP12Operation Java Examples

The following examples show how to use javax.wsdl.extensions.soap12.SOAP12Operation. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WsdlUtils.java    From hop with Apache License 2.0 5 votes vote down vote up
/**
 * 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( (ElementExtensible) operation, SOAP_OPERATION_ELEMENT_NAME );
  if ( e != null ) {
    if ( e instanceof SOAP12Operation ) {
      return ( (SOAP12Operation) e ).getSoapActionURI();
    } else {
      return ( (SOAPOperation) e ).getSoapActionURI();
    }
  }
  return null;
}
 
Example #2
Source File: WsdlUtils.java    From pentaho-kettle with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #3
Source File: ComponentBuilder.java    From tesb-studio-se with Apache License 2.0 4 votes vote down vote up
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;
}
 
Example #4
Source File: SOAPBindingUtil.java    From cxf with Apache License 2.0 4 votes vote down vote up
public static boolean isSOAPOperation(Object obj) {
    return obj instanceof SOAPOperation || obj instanceof SOAP12Operation;
}
 
Example #5
Source File: SOAPBindingUtil.java    From cxf with Apache License 2.0 4 votes vote down vote up
public static boolean isSOAPOperation(Object obj) {
    return obj instanceof SOAPOperation || obj instanceof SOAP12Operation;
}