/** * Parse the extensibility elements in this document. */ public void parseExtensibilityElements() { for (int i = 0; i < extelements.size(); i++) { try { def.addExtensibilityElement(parseExtensibilityElement(Definition.class, (Element)extelements.get(i), def)); } catch(WSDLException e) {} } }
protected void addExtensibilityElements(Definition def, ElementExtensible elementExtensible, List<ExtensibilityElement> extensibilityElements) { if (extensibilityElements != null) { for (ExtensibilityElement element : extensibilityElements) { if (element instanceof UnknownExtensibilityElement) { UnknownExtensibilityElement uee = (UnknownExtensibilityElement)element; String pfx = uee.getElement().getPrefix(); addNamespace(pfx, element.getElementType().getNamespaceURI(), def); } else { QName qn = element.getElementType(); addNamespace(qn.getNamespaceURI(), def); } elementExtensible.addExtensibilityElement(element); } } }
protected void addExtensibilityElements(Definition def, ElementExtensible elementExtensible, List<ExtensibilityElement> extensibilityElements) { if (extensibilityElements != null) { for (ExtensibilityElement element : extensibilityElements) { if (element instanceof UnknownExtensibilityElement) { UnknownExtensibilityElement uee = (UnknownExtensibilityElement)element; String pfx = uee.getElement().getPrefix(); addNamespace(pfx, element.getElementType().getNamespaceURI(), def); } else { QName qn = element.getElementType(); addNamespace(qn.getNamespaceURI(), def); } elementExtensible.addExtensibilityElement(element); } } }
protected void addExtensibilityElements(Definition def, ElementExtensible elementExtensible, List<ExtensibilityElement> extensibilityElements) { if (extensibilityElements != null) { for (ExtensibilityElement element : extensibilityElements) { if (element instanceof UnknownExtensibilityElement) { UnknownExtensibilityElement uee = (UnknownExtensibilityElement)element; String pfx = uee.getElement().getPrefix(); addNamespace(pfx, element.getElementType().getNamespaceURI(), def); } else { QName qn = element.getElementType(); addNamespace(qn.getNamespaceURI(), def); } elementExtensible.addExtensibilityElement(element); } } }
public void generatePortContent(Port port) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(port.getEExtensibilityElements()); removeExtensebilityElements(port.getEExtensibilityElements(), removeList); SOAPAddress soapAddress = SOAPFactory.eINSTANCE.createSOAPAddress(); soapAddress.setLocationURI(addressLocation); port.addExtensibilityElement(soapAddress); }
public void generatePortContent(Port port) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(port.getEExtensibilityElements()); removeExtensebilityElements(port.getEExtensibilityElements(), removeList); HTTPAddress httpAddress = HTTPFactory.eINSTANCE.createHTTPAddress(); httpAddress.setLocationURI(addressLocation); port.addExtensibilityElement(httpAddress); }
public void generateBindingContent(Binding binding, PortType portType) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(binding.getEExtensibilityElements()); removeExtensebilityElements(binding.getEExtensibilityElements(), removeList); HTTPBinding httpBinding = HTTPFactory.eINSTANCE.createHTTPBinding(); httpBinding.setVerb(getVerbOption(binding) == VERB_POST ? "POST" : "GET"); binding.addExtensibilityElement(httpBinding); }
public void generateBindingOperationContent(BindingOperation bindingOperation, Operation operation) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(bindingOperation.getEExtensibilityElements()); removeExtensebilityElements(bindingOperation.getEExtensibilityElements(), removeList); HTTPOperation httpOperation = HTTPFactory.eINSTANCE.createHTTPOperation(); httpOperation.setLocationURI("/" + operation.getName()); bindingOperation.addExtensibilityElement(httpOperation); }
public void generateBindingInputContent(BindingInput bindingInput, Input input) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(bindingInput.getEExtensibilityElements()); // hack: we're being sneaky here. Set the 'verb' options now. int option = getVerbOption(bindingInput); removeExtensebilityElements(bindingInput.getEExtensibilityElements(), removeList); if (option == VERB_POST) { // TODO: Is there an equivalent HTTP Model Object for this?.... Element element = createElement(bindingInput.getElement(), "mime", "content"); element.setAttribute("type", "application/x-www-form-urlencoded"); } else { HTTPUrlEncoded urlEncoded = HTTPFactory.eINSTANCE.createHTTPUrlEncoded(); bindingInput.addExtensibilityElement(urlEncoded); } }
public void generateBindingOperationContent(BindingOperation bindingOperation, Operation operation) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(bindingOperation.getEExtensibilityElements()); removeExtensebilityElements(bindingOperation.getEExtensibilityElements(), removeList); SOAPOperation soapOperation = SOAPFactory.eINSTANCE.createSOAPOperation(); String soapActionValue = getNamespace(bindingOperation); if (!soapActionValue.endsWith("/")) { soapActionValue += "/"; } soapActionValue += operation.getName(); soapOperation.setSoapActionURI(soapActionValue); bindingOperation.addExtensibilityElement(soapOperation); }
public void generateBindingContent(Binding binding, PortType portType) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(binding.getEExtensibilityElements()); removeExtensebilityElements(binding.getEExtensibilityElements(), removeList); SOAPFactory soapFactory = SOAPFactory.eINSTANCE; SOAPBinding soapBinding = soapFactory.createSOAPBinding(); soapBinding.setStyle((getStyleOption(binding) == STYLE_DOCUMENT) ? "document" : "rpc"); soapBinding.setTransportURI("http://schemas.xmlsoap.org/soap/http"); binding.addExtensibilityElement(soapBinding); }
public void generateBindingFaultContent(BindingFault bindingFault, Fault fault) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(bindingFault.getEExtensibilityElements()); removeExtensebilityElements(bindingFault.getEExtensibilityElements(), removeList); SOAPFactory soapFactory = SOAPFactory.eINSTANCE; SOAPFault soapFault = soapFactory.createSOAPFault(); soapFault.setUse((getUseOption(bindingFault) == USE_ENCODED) ? "encoded" : "literal"); soapFault.setName(fault.getName()); // soapFault.setNamespaceURI(getNamespace(bindingFault)); if (getUseOption(bindingFault) == USE_ENCODED && getStyleOption(bindingFault) == STYLE_RPC) { List encodingList = new BasicEList(); encodingList.add("http://schemas.xmlsoap.org/soap/encoding/"); soapFault.setEncodingStyles(encodingList); } bindingFault.addExtensibilityElement(soapFault); }
public void generateBindingInputContent(BindingInput bindingInput, Input input) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(bindingInput.getEExtensibilityElements()); removeExtensebilityElements(bindingInput.getEExtensibilityElements(), removeList); SOAPFactory soapFactory = SOAPFactory.eINSTANCE; SOAPBody soapBody = soapFactory.createSOAPBody(); soapBody.setUse((getUseOption(null) == USE_ENCODED) ? "encoded" : "literal"); if (getUseOption(bindingInput) == USE_ENCODED && getStyleOption(bindingInput) == STYLE_RPC) { List encodingList = new BasicEList(); encodingList.add("http://schemas.xmlsoap.org/soap/encoding/"); soapBody.setEncodingStyles(encodingList); soapBody.setNamespaceURI(getNamespace(bindingInput)); } else if (getUseOption(bindingInput) == USE_LITERAL && getStyleOption(bindingInput) == STYLE_RPC) { soapBody.setNamespaceURI(getNamespace(bindingInput)); } bindingInput.addExtensibilityElement(soapBody); }
public void generateBindingOutputContent(BindingOutput bindingOutput, Output output) { // We blow away any existing ExtensibilityElements/content before we generate it // Is it worth being smarter? Look for matching content first and create those which aren't found???? List removeList = new ArrayList(bindingOutput.getEExtensibilityElements()); removeExtensebilityElements(bindingOutput.getEExtensibilityElements(), removeList); SOAPFactory soapFactory = SOAPFactory.eINSTANCE; SOAPBody soapBody = soapFactory.createSOAPBody(); soapBody.setUse((getUseOption(bindingOutput) == USE_ENCODED) ? "encoded" : "literal"); if (getUseOption(bindingOutput) == USE_ENCODED && getStyleOption(bindingOutput) == STYLE_RPC) { List encodingList = new BasicEList(); encodingList.add("http://schemas.xmlsoap.org/soap/encoding/"); soapBody.setEncodingStyles(encodingList); soapBody.setNamespaceURI(getNamespace(bindingOutput)); } else if (getUseOption(bindingOutput) == USE_LITERAL && getStyleOption(bindingOutput) == STYLE_RPC) { soapBody.setNamespaceURI(getNamespace(bindingOutput)); } bindingOutput.addExtensibilityElement(soapBody); }
bindingFault.addExtensibilityElement(parseExtensibilityElement(BindingFault.class, tempEl, def));
bindingInput.addExtensibilityElement(parseExtensibilityElement(BindingInput.class, tempEl, def));
bindingOutput.addExtensibilityElement(parseExtensibilityElement(BindingOutput.class, tempEl, def));
service.addExtensibilityElement(parseExtensibilityElement(Service.class, tempEl, def));
msg.addExtensibilityElement(parseExtensibilityElement(Message.class, tempEl, def));
port.addExtensibilityElement(parseExtensibilityElement(Port.class, tempEl, def));