Refine search
private void extractWsdlEprs(EndpointInfo endpoint) { //parse the EPR in wsdl List<ExtensibilityElement> portExtensors = endpoint.getExtensors(ExtensibilityElement.class); if (portExtensors != null) { Iterator<ExtensibilityElement> extensionElements = portExtensors.iterator(); QName wsaEpr = new QName(Names.WSA_NAMESPACE_NAME, "EndpointReference"); while (extensionElements.hasNext()) { ExtensibilityElement ext = extensionElements.next(); if (ext instanceof UnknownExtensibilityElement && wsaEpr.equals(ext.getElementType())) { DOMSource domSource = new DOMSource(((UnknownExtensibilityElement)ext).getElement()); W3CEndpointReference w3cEPR = new W3CEndpointReference(domSource); EndpointReferenceType ref = ProviderImpl.convertToInternal(w3cEPR); endpoint.getTarget().setMetadata(ref.getMetadata()); endpoint.getTarget().setReferenceParameters(ref.getReferenceParameters()); endpoint.getTarget().getOtherAttributes().putAll(ref.getOtherAttributes()); } } } }
if (ee.getElementType() == null) ee.setElementType(elementType);
private boolean addressingRequired(List<ExtensibilityElement> exts) { boolean found = false; if (exts != null) { Iterator<ExtensibilityElement> extensionElements = exts.iterator(); while (extensionElements.hasNext() && !found) { ExtensibilityElement ext = extensionElements.next(); if (JAXWSAConstants.WSAW_USINGADDRESSING_QNAME.equals(ext.getElementType()) && ext.getRequired() != null) { return ext.getRequired(); } } } return false; }
private boolean hasUsingAddressing(List<ExtensibilityElement> exts) { boolean found = false; if (exts != null) { Iterator<ExtensibilityElement> extensionElements = exts.iterator(); while (extensionElements.hasNext() && !found) { ExtensibilityElement ext = extensionElements.next(); found = JAXWSAConstants.WSAW_USINGADDRESSING_QNAME.equals(ext.getElementType()); } } return found; } private boolean addressingRequired(List<ExtensibilityElement> exts) {
if (body.getRequired() != null && body.getRequired().booleanValue() == true) return; namespace = ctx.getBinding().getQName().getNamespaceURI(); new QName( namespace, bop .getMessage() .getQName() .getLocalPart());
public void visit(ExtensibilityElement obj, Object parent, WSDLTraversalContext ctx) { // If a child element of wsdl:types is from a namespace other than // "http://www.w3.org/2001/XMLSchema" if (parent instanceof Types) { //if (!obj.getElementType().getNamespaceURI().equals( // WSIConstants.NS_URI_XSD)) //{ // Add element name to error list // errorList.add(obj.getElementType()); //} } // or any other ext element coming from a namespace other than // "http://schemas.xmlsoap.org/wsdl/soap/" else if (!obj.getElementType().getNamespaceURI().equals(WSIConstants.NS_URI_WSDL_SOAP) && !obj.getElementType().getNamespaceURI().equals(WSIConstants.NS_URI_WSDL)) { // Add element name to error list errorList.add(obj.getElementType()); } }
if (header.getRequired() != null && header.getRequired().booleanValue() == true) return; if (partQName == null) throw new IllegalArgumentException( "Part type can not be null." + mesPart.getElementName().toString()); String local = partQName.getLocalPart(); String ns = partQName.getNamespaceURI();
/** * Find all of the extensibility elements with the specified name. * * @param extensibleElement * WSDL type which extends ElementExtensible. * @param elementType * Name of the extensibility element to find. * @return List of ExtensibilityElements, may be empty. */ @SuppressWarnings( "unchecked" ) protected static List<ExtensibilityElement> findExtensibilityElements( ElementExtensible extensibleElement, String elementType ) { List<ExtensibilityElement> elements = new ArrayList<ExtensibilityElement>(); List<ExtensibilityElement> extensibilityElements = extensibleElement.getExtensibilityElements(); if ( extensibilityElements != null ) { for ( ExtensibilityElement element : extensibilityElements ) { if ( element.getElementType().getLocalPart().equalsIgnoreCase( elementType ) ) { elements.add( element ); } } } return elements; }
instanceof Schema) if (!extElement.getElementType().equals(WSITag.ELEM_XSD_SCHEMA)) extElement.getElementType().toString() + " can not be a child of the wsdl:types element.");
QName elementType = ext.getElementType(); ExtensionSerializer extSer = extReg.querySerializer(MIMEPart.class, elementType);
boolean wsdl_required = e.getRequired() != null && e.getRequired(); boolean wsdl_attribute = reqd!=null && reqd.equalsIgnoreCase("true"); log.debug("Found a required element: " + e.getElementType()); log.debug("Found a NOT required element: " + e.getElementType()); unusedExtensions.add(e.getElementType());
public ExtensibilityElement unmarshall(Class parent, QName qname, Element element, Definition wsdl, ExtensionRegistry registry) throws WSDLException { try { Unmarshaller u = context.createUnmarshaller(); Object o = u.unmarshal(element); if (o instanceof JAXBElement<?>) { JAXBElement<?> el = (JAXBElement<?>)o; o = el.getValue(); } ExtensibilityElement el = o instanceof ExtensibilityElement ? (ExtensibilityElement)o : null; if (null != el) { el.setElementType(qname); } return el; } catch (Exception ex) { throw new WSDLException(WSDLException.PARSER_ERROR, "Error reading element " + qname, ex); } }
private void checkRespectBindingFeature(List<ExtensibilityElement> bindingExtensors) { if (bindingExtensors != null) { Iterator<ExtensibilityElement> extensionElements = bindingExtensors.iterator(); while (extensionElements.hasNext()) { ExtensibilityElement ext = extensionElements.next(); if (ext instanceof UnknownExtensibilityElement && Boolean.TRUE.equals(ext.getRequired()) && this.wsFeatures != null) { for (WebServiceFeature feature : this.wsFeatures) { if (feature instanceof RespectBindingFeature && feature.isEnabled()) { org.apache.cxf.common.i18n.Message message = new org.apache.cxf.common.i18n.Message("UNKONWN_REQUIRED_WSDL_BINDING", LOG); LOG.severe(message.toString()); throw new WebServiceException(message.toString()); } } } } } }
Object getUsingAddressing(List<ExtensibilityElement> exts) { Object ua = null; if (exts != null) { for (ExtensibilityElement ext : exts) { if (Names.WSAW_USING_ADDRESSING_QNAME.equals(ext.getElementType())) { ua = ext; } } } return ua; }
public void visit(ExtensibilityElement obj, Object parent, WSDLTraversalContext ctx) { // If a child element of wsdl:types is from a namespace other than // "http://www.w3.org/2001/XMLSchema" if (parent instanceof Types) { //if (!obj.getElementType().getNamespaceURI().equals( // WSIConstants.NS_URI_XSD)) //{ // Add element name to error list // errorList.add(obj.getElementType()); //} } // or any other ext element coming from a namespace other than // "http://schemas.xmlsoap.org/wsdl/soap/" else if (!obj.getElementType().getNamespaceURI().equals(WSIConstants.NS_URI_WSDL_SOAP) && !obj.getElementType().getNamespaceURI().equals(WSIConstants.NS_URI_WSDL)) { // Add element name to error list errorList.add(obj.getElementType()); } }
/** * Find the specified extensibility element, if more than one with the specified name exists in the list, return the * first one found. * * @param extensibleElement * WSDL type which extends ElementExtensible. * @param elementType * Name of the extensiblity element to find. * @return ExtensibilityElement The ExtensiblityElement, if not found return null. */ @SuppressWarnings( "unchecked" ) protected static ExtensibilityElement findExtensibilityElement( ElementExtensible extensibleElement, String elementType ) { List<ExtensibilityElement> extensibilityElements = extensibleElement.getExtensibilityElements(); if ( extensibilityElements != null ) { for ( ExtensibilityElement element : extensibilityElements ) { if ( element.getElementType().getLocalPart().equalsIgnoreCase( elementType ) ) { return element; } } } return null; }
instanceof UnknownExtensibilityElement) if (!extElement.getElementType().equals(WSITag.ELEM_XSD_SCHEMA)) extElement.getElementType().toString() + " can not be a child of the wsdl:types element.");
QName elementType = ext.getElementType(); ExtensionRegistry extReg = def.getExtensionRegistry();
boolean wsdl_required = e.getRequired() != null && e.getRequired(); boolean wsdl_attribute = reqd!=null && reqd.equalsIgnoreCase("true"); log.debug("Found a required element: " + e.getElementType()); log.debug("Found a NOT required element: " + e.getElementType()); unusedExtensions.add(e.getElementType());
el.setElementType(qname);