public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPOperation httpOperation = (HTTPOperation)extReg.createExtension(parentType, elementType); String locationURI = DOMUtils.getAttribute(el, Constants.ATTR_LOCATION); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (locationURI != null) { httpOperation.setLocationURI(locationURI); } if (requiredStr != null) { httpOperation.setRequired(new Boolean(requiredStr)); } return httpOperation; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPAddress httpAddress = (HTTPAddress)extReg.createExtension(parentType, elementType); String locationURI = DOMUtils.getAttribute(el, Constants.ATTR_LOCATION); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (locationURI != null) { httpAddress.setLocationURI(locationURI); } if (requiredStr != null) { httpAddress.setRequired(new Boolean(requiredStr)); } return httpAddress; } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPBinding httpBinding = (HTTPBinding)extension; if (httpBinding != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "binding", def); pw.print(" <" + tagName); DOMUtils.printAttribute(HTTPConstants.ATTR_VERB, httpBinding.getVerb(), pw); Boolean required = httpBinding.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
protected AbstractEndpoint createEndpoint(ExtensibilityElement portElement, ExtensibilityElement bindingElement, JbiEndpoint jbiEndpoint) { if (jbiEndpoint == null) { return null; } if (portElement instanceof HTTPAddress && bindingElement instanceof HTTPBinding) { if (!"POST".equals(((HTTPBinding) bindingElement).getVerb())) { throw new UnsupportedOperationException(((HTTPBinding) bindingElement).getVerb() + " not supported"); } HttpEndpoint endpoint = new HttpEndpoint(); endpoint.setSoap(false); endpoint.setRole(jbiEndpoint.getRole()); endpoint.setDefaultMep(jbiEndpoint.getDefaultMep()); endpoint.setDefaultOperation(jbiEndpoint.getDefaultOperation()); endpoint.setLocationURI(((HTTPAddress) portElement).getLocationURI()); return endpoint; } else if (portElement instanceof SOAPAddress && bindingElement instanceof SOAPBinding) { HttpEndpoint endpoint = new HttpEndpoint(); endpoint.setSoap(true); endpoint.setRole(jbiEndpoint.getRole()); endpoint.setDefaultMep(jbiEndpoint.getDefaultMep()); endpoint.setDefaultOperation(jbiEndpoint.getDefaultOperation()); endpoint.setLocationURI(((SOAPAddress) portElement).getLocationURI()); return endpoint; } else { return null; } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPAddress httpAddress = (HTTPAddress)extension; if (httpAddress != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "address", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, httpAddress.getLocationURI(), pw); Boolean required = httpAddress.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
private String getServiceLocation() { for (Object extElement : getPortDefinition().getExtensibilityElements()) { if (extElement instanceof HTTPAddress) { return ((HTTPAddress) extElement).getLocationURI(); } } throw new NullPointerException("Service Location is null. Cannot find HTTP Address from WSDL definition"); }
private String getVerb() { ExtensibilityElement extElement = WSDLAwareSOAPProcessor.getBindingExtension(httpBinding); if (extElement instanceof HTTPBinding) { return ((HTTPBinding) extElement).getVerb(); } throw new IllegalArgumentException("Current binding is not a HTTP Binding."); }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPOperation httpOperation = (HTTPOperation)extension; if (httpOperation != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "operation", def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_LOCATION, httpOperation.getLocationURI(), pw); Boolean required = httpOperation.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException { String address = getOption(args, ToolConstants.CFG_ADDRESS); ExtensibilityElement addr = registry.createExtension(Port.class, WSDLConstants.QNAME_XMLHTTP_BINDING_ADDRESS); if (addr instanceof AddressType) { ((AddressType)addr).setLocation(address); } if (addr instanceof HTTPAddress) { ((HTTPAddress)addr).setLocationURI(address); } return addr; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPBinding httpBinding = (HTTPBinding)extReg.createExtension(parentType, elementType); String verb = DOMUtils.getAttribute(el, HTTPConstants.ATTR_VERB); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (verb != null) { httpBinding.setVerb(verb); } if (requiredStr != null) { httpBinding.setRequired(new Boolean(requiredStr)); } return httpBinding; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPUrlReplacement httpUrlReplacement = (HTTPUrlReplacement)extReg.createExtension(parentType, elementType); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (requiredStr != null) { httpUrlReplacement.setRequired(new Boolean(requiredStr)); } return httpUrlReplacement; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPUrlEncoded httpUrlEncoded = (HTTPUrlEncoded)extReg.createExtension(parentType, elementType); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (requiredStr != null) { httpUrlEncoded.setRequired(new Boolean(requiredStr)); } return httpUrlEncoded; } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPUrlReplacement httpUrlReplacement = (HTTPUrlReplacement)extension; if (httpUrlReplacement != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "urlReplacement", def); pw.print(" <" + tagName); Boolean required = httpUrlReplacement.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
public void marshall(Class parentType, QName elementType, ExtensibilityElement extension, PrintWriter pw, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPUrlEncoded httpUrlEncoded = (HTTPUrlEncoded)extension; if (httpUrlEncoded != null) { String tagName = DOMUtils.getQualifiedValue(HTTPConstants.NS_URI_HTTP, "urlEncoded", def); pw.print(" <" + tagName); Boolean required = httpUrlEncoded.getRequired(); if (required != null) { DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED, required.toString(), def, pw); } pw.println("/>"); } }
address = ((SOAPAddress)e).getLocationURI(); } else if (e instanceof HTTPAddress) { address = ((HTTPAddress)e).getLocationURI();
/** * ODE extends the wsdl spec by allowing definition of the HTTP verb at the operation level. * <br/>The current implementation implementations allows you to have a {@literal <binding xmlns="http://schemas.xmlsoap.org/wsdl/http/"/>} element * at the port level <strong>and</strong> at the operation level. In such a case the operation's verb overrides the port's verb. * <br/> This method applies the later rule. * <br/> If defined the operation's verb is returned, else the port's verb. * * @param binding * @param bindingOperation * @return If defined the operation's verb is returned, else the port's verb. * @see #getOperationVerb(javax.wsdl.BindingOperation) */ public static String resolveVerb(Binding binding, BindingOperation bindingOperation) { final HTTPBinding httpBinding = (HTTPBinding) WsdlUtils.getBindingExtension(binding); String portVerb = httpBinding != null ? httpBinding.getVerb() : null; String operationVerb = WsdlUtils.getOperationVerb(bindingOperation); return operationVerb != null ? operationVerb : portVerb; }
public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException { String address = getOption(args, ToolConstants.CFG_ADDRESS); ExtensibilityElement addr = registry.createExtension(Port.class, WSDLConstants.QNAME_XMLHTTP_BINDING_ADDRESS); if (addr instanceof AddressType) { ((AddressType)addr).setLocation(address); } if (addr instanceof HTTPAddress) { ((HTTPAddress)addr).setLocationURI(address); } return addr; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPBinding httpBinding = (HTTPBinding)extReg.createExtension(parentType, elementType); String verb = DOMUtils.getAttribute(el, HTTPConstants.ATTR_VERB); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (verb != null) { httpBinding.setVerb(verb); } if (requiredStr != null) { httpBinding.setRequired(new Boolean(requiredStr)); } return httpBinding; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPUrlReplacement httpUrlReplacement = (HTTPUrlReplacement)extReg.createExtension(parentType, elementType); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (requiredStr != null) { httpUrlReplacement.setRequired(new Boolean(requiredStr)); } return httpUrlReplacement; } }
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Element el, Definition def, ExtensionRegistry extReg) throws WSDLException { HTTPUrlEncoded httpUrlEncoded = (HTTPUrlEncoded)extReg.createExtension(parentType, elementType); String requiredStr = DOMUtils.getAttributeNS(el, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED); if (requiredStr != null) { httpUrlEncoded.setRequired(new Boolean(requiredStr)); } return httpUrlEncoded; } }