Java Code Examples for javax.wsdl.Binding#setPortType()
The following examples show how to use
javax.wsdl.Binding#setPortType() .
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: WSDLDocCreator.java From jolie with GNU Lesser General Public License v2.1 | 6 votes |
private Binding createBindingSOAP( Definition def, PortType pt, String bindingName ) { Binding bind = def.getBinding( new QName( bindingName ) ); if( bind == null ) { bind = def.createBinding(); bind.setQName( new QName( tns, bindingName ) ); } bind.setPortType( pt ); bind.setUndefined( false ); try { SOAPBinding soapBinding = (SOAPBinding) extensionRegistry.createExtension( Binding.class, new QName( NameSpacesEnum.SOAP.getNameSpaceURI(), "binding" ) ); soapBinding.setTransportURI( NameSpacesEnum.SOAP_OVER_HTTP.getNameSpaceURI() ); soapBinding.setStyle( "document" ); bind.addExtensibilityElement( soapBinding ); } catch( WSDLException ex ) { System.err.println( ex.getMessage() ); } def.addBinding( bind ); return bind; }
Example 2
Source File: ServiceWSDLBuilder.java From cxf with Apache License 2.0 | 6 votes |
protected void buildBinding(Definition definition, Collection<BindingInfo> bindingInfos, Collection<PortType> portTypes) { Binding binding = null; for (BindingInfo bindingInfo : bindingInfos) { binding = definition.createBinding(); addDocumentation(binding, bindingInfo.getDocumentation()); binding.setUndefined(false); for (PortType portType : portTypes) { if (portType.getQName().equals(bindingInfo.getInterface().getName())) { binding.setPortType(portType); break; } } binding.setQName(bindingInfo.getName()); if (!bindingInfo.getName().getNamespaceURI().equals(definition.getTargetNamespace())) { addNamespace(bindingInfo.getName().getNamespaceURI(), definition); } buildBindingOperation(definition, binding, bindingInfo.getOperations()); addExtensibilityElements(definition, binding, getWSDL11Extensors(bindingInfo)); definition.addBinding(binding); } }
Example 3
Source File: PortTypeVisitor.java From cxf with Apache License 2.0 | 5 votes |
public Binding createBinding(String scopedPortTypeName) { StringBuilder bname = new StringBuilder(); bname.append(scopedPortTypeName).append("CORBABinding"); QName bqname = new QName(rootDefinition.getTargetNamespace(), bname.toString()); int count = 0; while (queryBinding(bqname)) { bname.append(count); bqname = new QName(rootDefinition.getTargetNamespace(), bname.toString()); } Binding binding = rootDefinition.createBinding(); binding.setPortType(portType); binding.setQName(bqname); try { BindingType bindingType = (BindingType) extReg.createExtension(Binding.class, CorbaConstants.NE_CORBA_BINDING); String pragmaPrefix = (this.getWsdlVisitor().getPragmaPrefix() != null && this.getWsdlVisitor().getPragmaPrefix().length() > 0) ? this.getWsdlVisitor().getPragmaPrefix() + "/" : ""; bindingType.setRepositoryID(CorbaConstants.REPO_STRING + pragmaPrefix + scopedPortTypeName.replace('.', '/') + CorbaConstants.IDL_VERSION); binding.addExtensibilityElement((ExtensibilityElement)bindingType); } catch (WSDLException ex) { throw new RuntimeException(ex); } binding.setUndefined(false); rootDefinition.addBinding(binding); return binding; }
Example 4
Source File: PartialWSDLProcessor.java From cxf with Apache License 2.0 | 5 votes |
public static Binding doAppendBinding(Definition wsdlDefinition, String name, PortType portType, ExtensionRegistry extReg) throws Exception { Binding binding = wsdlDefinition.createBinding(); binding.setQName(new QName(wsdlDefinition.getTargetNamespace(), name + bindingName)); binding.setUndefined(false); binding.setPortType(portType); setSoapBindingExtElement(wsdlDefinition, binding, extReg); addBindingOperation(wsdlDefinition, portType, binding, extReg); return binding; }