/** * Validate the binding operations in the WSDL component model. * * @param bindingOperations The bindings operations in the WSDL component model. * @param desc The WSDL 2.0 description component. * @param errorReporter An error reporter to be used for reporting errors. * @throws WSDLException A WSDLException is thrown if a problem occurs while validating the binding operation components. */ protected void validateBindingOperations(BindingOperation[] bindingOperations, Description desc, ErrorReporter errorReporter) throws WSDLException { testAssertionBindingOperation1051(bindingOperations, errorReporter); int numBindingOperations = bindingOperations.length; for(int i = 0; i < numBindingOperations; i++) { BindingOperation bindingOperation = bindingOperations[i]; validateBindingMessageReferences(bindingOperation.getBindingMessageReferences(), desc, errorReporter); validateBindingFaultReferences(bindingOperation.getBindingFaultReferences(), desc, errorReporter); } }
public FragmentIdentifier getFragmentIdentifier() { //Find parent components. BindingOperation bindingOperationComp = (BindingOperation)getParent(); Binding bindingComp = (Binding)bindingOperationComp.getParent(); InterfaceOperation interfaceOperationComp = bindingOperationComp.getInterfaceOperation(); //Get needed properties. NCName binding = new NCName(bindingComp.getName().getLocalPart()); QName interfaceOperation = interfaceOperationComp.getName(); //Return a new Fragment Identifier. return new FragmentIdentifier(new BindingFaultReferencePart(binding, interfaceOperation, fMessageLabel, fRef)); }
private static String extractLocation(BindingOperation bOperation) { String location = null; if (bOperation != null) { XMLAttr attr = bOperation.toElement().getExtensionAttribute(HTTPConstants.Q_ATTR_LOCATION); if (attr != null) { location = attr.toExternalForm(); } } return location; } }
axisBindingOperation.setParent(axisBinding); axisBindingOperation.setName(axisOperation.getName()); addDocumentation(axisBindingOperation, bindingOperation.toElement()); SOAPBindingOperationExtensions soapBindingOperationExtensions; try { soapBindingOperationExtensions = ((SOAPBindingOperationExtensions) bindingOperation.getComponentExtensionContext( new URI(WSDL2Constants.URI_WSDL2_SOAP))); } catch (URISyntaxException e) { bindingOperation.getBindingMessageReferences(); for (int j = 0; j < bindingMessageReferences.length; j++) { BindingMessageReference bindingMessageReference = bindingMessageReferences[j]; bindingOperation.getBindingFaultReferences(); for (int j = 0; j < bindingFaultReferences.length; j++) { BindingFaultReference bindingFaultReference = bindingFaultReferences[j];
private static BindingOperation findBindingOperation(org.apache.woden.wsdl20.Binding binding, InterfaceOperation operation) { BindingOperation[] bindingOps = binding.getBindingOperations(); for (int i = 0; i < bindingOps.length; i++) { if (bindingOps[i].getInterfaceOperation() == operation) { return bindingOps[i]; } } return null; }
private static BindingMessageReference findBindingMessage(BindingOperation wsdlBindingOperation, InterfaceMessageReference iMsgRef) { BindingMessageReference[] bMsgRefs = wsdlBindingOperation.getBindingMessageReferences(); for (int i = 0; i < bMsgRefs.length; i++) { if (bMsgRefs[i].getInterfaceMessageReference() == iMsgRef) { return bMsgRefs[i]; } } return null; }
public HTTPHeader[] getHttpHeaders() { BindingOperation bindingOp = (BindingOperation) ((NestedComponent)getParent()).getParent(); Binding binding = (Binding) bindingOp.getParent(); SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP); String version = soapBindExt.getSoapVersion(); URI protocol = soapBindExt.getSoapUnderlyingProtocol(); if(protocol == null) { return new HTTPHeader[0]; } if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) || (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) ) { ExtensionElement[] extEls = ((WSDLElement)getParent()) .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER); int len = extEls.length; HTTPHeader[] httpHeaders = new HTTPHeader[len]; System.arraycopy(extEls, 0, httpHeaders, 0, len); return httpHeaders; } else { return new HTTPHeader[0]; } }
HTTPBindingOperationExtensions opExt = wsdlBindingOperation != null ? (HTTPBindingOperationExtensions) wsdlBindingOperation.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_HTTP) : null;
axisBindingOperation.setParent(axisBinding); axisBindingOperation.setName(axisOperation.getName()); addDocumentation(axisBindingOperation, bindingOperation.toElement()); SOAPBindingOperationExtensions soapBindingOperationExtensions; try { soapBindingOperationExtensions = ((SOAPBindingOperationExtensions) bindingOperation.getComponentExtensionContext( new URI(WSDL2Constants.URI_WSDL2_SOAP))); } catch (URISyntaxException e) { bindingOperation.getBindingMessageReferences(); for (int j = 0; j < bindingMessageReferences.length; j++) { BindingMessageReference bindingMessageReference = bindingMessageReferences[j]; bindingOperation.getBindingFaultReferences(); for (int j = 0; j < bindingFaultReferences.length; j++) { BindingFaultReference bindingFaultReference = bindingFaultReferences[j];
for(int i = 0; i < numBindingOperations; i++) InterfaceOperation interfaceOperation = bindingOperations[i].getInterfaceOperation(); if(interfaceOperation == null) continue;
public HTTPHeader[] getHttpHeaders() { BindingOperation bindingOp = (BindingOperation) ((NestedComponent)getParent()).getParent(); Binding binding = (Binding) bindingOp.getParent(); SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP); String version = soapBindExt.getSoapVersion(); URI protocol = soapBindExt.getSoapUnderlyingProtocol(); if(protocol == null) { return new HTTPHeader[0]; } if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) || (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) ) { ExtensionElement[] extEls = ((WSDLElement)getParent()) .getExtensionElementsOfType(HTTPConstants.Q_ELEM_HTTP_HEADER); int len = extEls.length; HTTPHeader[] httpHeaders = new HTTPHeader[len]; System.arraycopy(extEls, 0, httpHeaders, 0, len); return httpHeaders; } else { return new HTTPHeader[0]; } }
axisBindingOperation.setName(axisOperation.getName()); addDocumentation(axisBindingOperation, bindingOperation.toElement()); HTTPBindingOperationExtensions httpBindingOperationExtensions; try { httpBindingOperationExtensions = ((HTTPBindingOperationExtensions) bindingOperation.getComponentExtensionContext( new URI(WSDL2Constants.URI_WSDL2_HTTP))); } catch (URISyntaxException e) { bindingOperation.getBindingMessageReferences(); for (int j = 0; j < bindingMessageReferences.length; j++) { BindingMessageReference bindingMessageReference = bindingMessageReferences[j]; bindingOperation.getBindingFaultReferences(); for (int j = 0; j < bindingFaultReferences.length; j++) { BindingFaultReference bindingFaultReference = bindingFaultReferences[j];
public FragmentIdentifier getFragmentIdentifier() { //Find parent components. BindingOperation bindingOperationComp = (BindingOperation)getParent(); Binding bindingComp = (Binding)bindingOperationComp.getParent(); InterfaceOperation interfaceOperationComp = bindingOperationComp.getInterfaceOperation(); //Get needed properties. NCName binding = new NCName(bindingComp.getName().getLocalPart()); QName interfaceOperation = interfaceOperationComp.getName(); //Return a new Fragment Identifier. return new FragmentIdentifier(new BindingFaultReferencePart(binding, interfaceOperation, fMessageLabel, fRef)); }
/** * Validate the binding operations in the WSDL component model. * * @param bindingOperations The bindings operations in the WSDL component model. * @param desc The WSDL 2.0 description component. * @param errorReporter An error reporter to be used for reporting errors. * @throws WSDLException A WSDLException is thrown if a problem occurs while validating the binding operation components. */ protected void validateBindingOperations(BindingOperation[] bindingOperations, Description desc, ErrorReporter errorReporter) throws WSDLException { testAssertionBindingOperation1051(bindingOperations, errorReporter); int numBindingOperations = bindingOperations.length; for(int i = 0; i < numBindingOperations; i++) { BindingOperation bindingOperation = bindingOperations[i]; validateBindingMessageReferences(bindingOperation.getBindingMessageReferences(), desc, errorReporter); validateBindingFaultReferences(bindingOperation.getBindingFaultReferences(), desc, errorReporter); } }
for(int i = 0; i < numBindingOperations; i++) InterfaceOperation interfaceOperation = bindingOperations[i].getInterfaceOperation(); if(interfaceOperation == null) continue;
public String getHttpContentEncoding() { BindingOperation bindingOp = (BindingOperation) ((NestedComponent)getParent()).getParent(); Binding binding = (Binding) bindingOp.getParent(); SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP); String version = soapBindExt.getSoapVersion(); URI protocol = soapBindExt.getSoapUnderlyingProtocol(); if(protocol == null) { return null; } if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) || (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) ) { StringAttr contEncoding = (StringAttr) ((WSDLElement)getParent()) .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING); return contEncoding != null ? contEncoding.getString() : null; } else { return null; } }
axisBindingOperation.setName(axisOperation.getName()); addDocumentation(axisBindingOperation, bindingOperation.toElement()); HTTPBindingOperationExtensions httpBindingOperationExtensions; try { httpBindingOperationExtensions = ((HTTPBindingOperationExtensions) bindingOperation.getComponentExtensionContext( new URI(WSDL2Constants.URI_WSDL2_HTTP))); } catch (URISyntaxException e) { bindingOperation.getBindingMessageReferences(); for (int j = 0; j < bindingMessageReferences.length; j++) { BindingMessageReference bindingMessageReference = bindingMessageReferences[j]; bindingOperation.getBindingFaultReferences(); for (int j = 0; j < bindingFaultReferences.length; j++) { BindingFaultReference bindingFaultReference = bindingFaultReferences[j];
public FragmentIdentifier getFragmentIdentifier() { //Find parent components. BindingOperation bindingOperationComp = (BindingOperation)getParent(); Binding bindingComp = (Binding)bindingOperationComp.getParent(); InterfaceOperation interfaceOperationComp = bindingOperationComp.getInterfaceOperation(); //Get needed properties. NCName binding = new NCName(bindingComp.getName().getLocalPart()); QName interfaceOperation = interfaceOperationComp.getName(); //Return a new FragmentIdentifier. return new FragmentIdentifier(new BindingMessageReferencePart(binding, interfaceOperation, fMessageLabel)); }
for(int i = 0; i < numBindingOperations; i++) InterfaceOperation io = bindingOperations[i].getInterfaceOperation(); if(io != null) usedInterfaceOperationList.add(io);
public String getHttpContentEncoding() { BindingOperation bindingOp = (BindingOperation) ((NestedComponent)getParent()).getParent(); Binding binding = (Binding) bindingOp.getParent(); SOAPBindingExtensions soapBindExt = (SOAPBindingExtensions)binding .getComponentExtensionContext(SOAPConstants.NS_URI_SOAP); String version = soapBindExt.getSoapVersion(); URI protocol = soapBindExt.getSoapUnderlyingProtocol(); if(protocol == null) { return null; } if( (SOAPConstants.VERSION_1_2.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP12_HTTP)) || (SOAPConstants.VERSION_1_1.equals(version) && protocol.equals(SOAPConstants.PROTOCOL_URI_SOAP11_HTTP)) ) { StringAttr contEncoding = (StringAttr) ((WSDLElement)getParent()) .getExtensionAttribute(HTTPConstants.Q_ATTR_CONTENT_ENCODING); return contEncoding != null ? contEncoding.getString() : null; } else { return null; } }