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]; } }
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]; } }
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; } }
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; } }
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)); }
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)); }
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)); }
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)); }
private String determineHttpMethod() { // 1. try whttp:method String method = getHttpMethod(); if(method != null) return method; // 2. try whttp:methodDefault Binding binding = (Binding) ((BindingOperation) getParent()).getParent(); HTTPBindingExtensions httpBindExts = (HTTPBindingExtensions) binding .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP); // no need to check for a null httpBindExts because Binding has REQUIRED // http extension properties String methodDef = httpBindExts.getHttpMethodDefault(); if (methodDef != null) return methodDef; // 3. try {safety} equals True InterfaceOperation intOper = ((BindingOperation) getParent()).getInterfaceOperation(); if (intOper != null) { InterfaceOperationExtensions intOperExts = (InterfaceOperationExtensions) intOper .getComponentExtensionContext(WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS); if (intOperExts != null && intOperExts.isSafe()) { return HTTPConstants.METHOD_GET; } } // 4. default to POST. return HTTPConstants.METHOD_POST; }
private String determineHttpMethod() { // 1. try whttp:method String method = getHttpMethod(); if(method != null) return method; // 2. try whttp:methodDefault Binding binding = (Binding) ((BindingOperation) getParent()).getParent(); HTTPBindingExtensions httpBindExts = (HTTPBindingExtensions) binding .getComponentExtensionContext(HTTPConstants.NS_URI_HTTP); // no need to check for a null httpBindExts because Binding has REQUIRED // http extension properties String methodDef = httpBindExts.getHttpMethodDefault(); if (methodDef != null) return methodDef; // 3. try {safety} equals True InterfaceOperation intOper = ((BindingOperation) getParent()).getInterfaceOperation(); if (intOper != null) { InterfaceOperationExtensions intOperExts = (InterfaceOperationExtensions) intOper .getComponentExtensionContext(WSDLExtensionConstants.NS_URI_WSDL_EXTENSIONS); if (intOperExts != null && intOperExts.isSafe()) { return HTTPConstants.METHOD_GET; } } // 4. default to POST. return HTTPConstants.METHOD_POST; }