javax.wsdl.extensions.http.HTTPBinding Java Examples

The following examples show how to use javax.wsdl.extensions.http.HTTPBinding. 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: ServiceProcessor.java    From cxf with Apache License 2.0 6 votes vote down vote up
private BindingType getBindingType(BindingInfo binding) {
    if (binding.getExtensors(ExtensibilityElement.class) == null) {
        return null;
    }
    for (ExtensibilityElement ext : binding.getExtensors(ExtensibilityElement.class)) {
        if (SOAPBindingUtil.isSOAPBinding(ext)) {
            bindingObj = SOAPBindingUtil.getSoapBinding(ext);
            return BindingType.SOAPBinding;
        }
        if (ext instanceof HTTPBinding) {
            bindingObj = ext;
            return BindingType.HTTPBinding;
        }
    }
    return BindingType.XMLBinding;
}
 
Example #2
Source File: WSDLConverter.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void convertPortType( PortType portType, Binding binding )
	throws IOException {
	String comment = "";
	if( portType.getDocumentationElement() != null ) {
		comment = portType.getDocumentationElement().getNodeValue();
	}

	Style style = Style.DOCUMENT;
	for( ExtensibilityElement element : (List< ExtensibilityElement >) binding.getExtensibilityElements() ) {
		if( element instanceof SOAPBinding ) {
			if( "rpc".equals( ((SOAPBinding) element).getStyle() ) ) {
				style = Style.RPC;
			}
		} else if( element instanceof HTTPBinding ) {
			style = Style.HTTP;
		}
	}
	Interface iface = new Interface( portType.getQName().getLocalPart(), comment );
	List< Operation > operations = portType.getOperations();
	for( Operation operation : operations ) {
		if( operation.getOutput() == null ) {
			iface.addOneWayOperation( convertOperation( operation, style ) );
		} else {
			iface.addRequestResponseOperation( convertOperation( operation, style ) );
		}
	}
	interfaces.put( iface.name(), iface );
}