Java Code Examples for javax.wsdl.extensions.soap.SOAPBinding#getStyle()
The following examples show how to use
javax.wsdl.extensions.soap.SOAPBinding#getStyle() .
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: JaxRpcServiceInfoBuilder.java From tomee with Apache License 2.0 | 5 votes |
private BindingStyle getStyle(Binding binding) throws OpenEJBException { SOAPBinding soapBinding = getExtensibilityElement(SOAPBinding.class, binding.getExtensibilityElements()); String styleString = soapBinding.getStyle(); BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput(); SOAPBody soapBody = getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements()); String useString = soapBody.getUse(); BindingStyle bindingStyle = BindingStyle.getBindingStyle(styleString, useString); return bindingStyle; }
Example 2
Source File: LightWeightMappingValidator.java From tomee with Apache License 2.0 | 5 votes |
@Override protected void visit(Binding binding) { SOAPBinding soapBinding = getSOAPBinding(binding); if (soapBinding == null || soapBinding.getStyle() == null || !soapBinding.getStyle().equals("rpc")) { context.addFailure(new ValidationFailure("The messaging style of the binding must be rpc: " + binding.getQName())); } }
Example 3
Source File: WSDLBasedServiceConfiguration.java From cxf with Apache License 2.0 | 4 votes |
public String getStyle() { SOAPBinding sb = bi.getExtensor(SOAPBinding.class); return (sb == null) ? null : sb.getStyle(); }
Example 4
Source File: HeavyweightOperationInfoBuilder.java From tomee with Apache License 2.0 | 4 votes |
public HeavyweightOperationInfoBuilder(BindingOperation bindingOperation, ServiceEndpointMethodMapping methodMapping, JavaWsdlMapping mapping, XmlSchemaInfo schemaInfo) throws OpenEJBException { Operation operation = bindingOperation.getOperation(); this.operationName = operation.getName(); this.operationStyle = JaxRpcOperationInfo.OperationStyle.valueOf(operation.getStyle().toString()); this.outputMessage = operation.getOutput() == null ? null : operation.getOutput().getMessage(); this.inputMessage = operation.getInput().getMessage(); // faults for (Object o : operation.getFaults().values()) { faults.add((Fault) o); } this.mapping = mapping; this.methodMapping = methodMapping; this.schemaInfo = schemaInfo; // index types - used to process build exception class constructor args for (JavaXmlTypeMapping javaXmlTypeMapping : mapping.getJavaXmlTypeMapping()) { String javaClassName = javaXmlTypeMapping.getJavaType(); if (javaXmlTypeMapping.getAnonymousTypeQname() != null) { String anonymousTypeQName = javaXmlTypeMapping.getAnonymousTypeQname(); anonymousTypes.put(anonymousTypeQName, javaClassName); } else if (javaXmlTypeMapping.getRootTypeQname() != null) { QName qname = javaXmlTypeMapping.getRootTypeQname(); publicTypes.put(qname, javaClassName); } } // BindingStyle if (methodMapping.getWrappedElement() != null) { bindingStyle = BindingStyle.DOCUMENT_LITERAL_WRAPPED; } else { BindingInput bindingInput = bindingOperation.getBindingInput(); SOAPOperation soapOperation = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPOperation.class, bindingOperation.getExtensibilityElements()); String styleString = soapOperation.getStyle(); if (styleString == null) { SOAPBinding soapBinding = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPBinding.class, bindingInput.getExtensibilityElements()); styleString = soapBinding.getStyle(); } SOAPBody soapBody = JaxRpcServiceInfoBuilder.getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements()); String useString = soapBody.getUse(); bindingStyle = BindingStyle.getBindingStyle(styleString, useString); } }