.getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class); if (def == null) { def = bus.getExtension(WSDLManager.class).getDefinition(wsdlLocation);
public Set<String> getWSDLIds(Message message, String base, String ctxUri, EndpointInfo endpointInfo) { Map<String, String> params = new HashMap<>(); params.put("wsdl", ""); getDocument(message, base, params, ctxUri, endpointInfo); Map<String, Definition> mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(WSDLS_KEY)); return mp.keySet(); } public Map<String, String> getSchemaLocations(Message message,
public Set<String> getWSDLIds(Message message, String base, String ctxUri, EndpointInfo endpointInfo) { Map<String, String> params = new HashMap<>(); params.put("wsdl", ""); getDocument(message, base, params, ctxUri, endpointInfo); Map<String, Definition> mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(WSDLS_KEY)); return mp.keySet(); } public Map<String, String> getSchemaLocations(Message message,
public static Schema getSchema(ServiceInfo serviceInfo, Bus b) { if (serviceInfo == null) { return null; } Schema schema = serviceInfo.getProperty(Schema.class.getName(), Schema.class); if (schema == null && !serviceInfo.hasProperty(Schema.class.getName() + ".CHECKED")) { try { synchronized (serviceInfo) { return createSchema(serviceInfo, b); } } finally { serviceInfo.setProperty(Schema.class.getName() + ".CHECKED", Boolean.TRUE); } } return schema; }
public static Schema getSchema(ServiceInfo serviceInfo, Bus b) { if (serviceInfo == null) { return null; } Schema schema = serviceInfo.getProperty(Schema.class.getName(), Schema.class); if (schema == null && !serviceInfo.hasProperty(Schema.class.getName() + ".CHECKED")) { try { synchronized (serviceInfo) { return createSchema(serviceInfo, b); } } finally { serviceInfo.setProperty(Schema.class.getName() + ".CHECKED", Boolean.TRUE); } } return schema; }
public static Schema getSchema(ServiceInfo serviceInfo, Bus b) { if (serviceInfo == null) { return null; } Schema schema = serviceInfo.getProperty(Schema.class.getName(), Schema.class); if (schema == null && !serviceInfo.hasProperty(Schema.class.getName() + ".CHECKED")) { try { synchronized (serviceInfo) { return createSchema(serviceInfo, b); } } finally { serviceInfo.setProperty(Schema.class.getName() + ".CHECKED", Boolean.TRUE); } } return schema; }
public Map<String, String> getSchemaLocations(Message message, String base, String ctxUri, EndpointInfo endpointInfo) { Map<String, String> params = new HashMap<>(); params.put("wsdl", ""); getDocument(message, base, params, ctxUri, endpointInfo); Map<String, SchemaReference> mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(SCHEMAS_KEY)); Map<String, String> schemas = new HashMap<>(); for (Map.Entry<String, SchemaReference> ent : mp.entrySet()) { params.clear(); params.put("xsd", ent.getKey()); Document doc = getDocument(message, base, params, ctxUri, endpointInfo); schemas.put(doc.getDocumentElement().getAttribute("targetNamespace"), buildUrl(base, ctxUri, "xsd=" + ent.getKey())); } return schemas; }
public static Schema getSchema(ServiceInfo serviceInfo, Bus b) { if (serviceInfo == null) { return null; } Schema schema = serviceInfo.getProperty(Schema.class.getName(), Schema.class); if (schema == null && !serviceInfo.hasProperty(Schema.class.getName() + ".CHECKED")) { try { synchronized (serviceInfo) { return createSchema(serviceInfo, b); } } finally { serviceInfo.setProperty(Schema.class.getName() + ".CHECKED", Boolean.TRUE); } } return schema; }
public Map<String, String> getSchemaLocations(Message message, String base, String ctxUri, EndpointInfo endpointInfo) { Map<String, String> params = new HashMap<>(); params.put("wsdl", ""); getDocument(message, base, params, ctxUri, endpointInfo); Map<String, SchemaReference> mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(SCHEMAS_KEY)); Map<String, String> schemas = new HashMap<>(); for (Map.Entry<String, SchemaReference> ent : mp.entrySet()) { params.clear(); params.put("xsd", ent.getKey()); Document doc = getDocument(message, base, params, ctxUri, endpointInfo); schemas.put(doc.getDocumentElement().getAttribute("targetNamespace"), buildUrl(base, ctxUri, "xsd=" + ent.getKey())); } return schemas; }
/** * Retrieve the map of known wsdl Definition objects for this endpoint. * * @param endpointInfo information for a web service 'port' inside of a service * @return Map<String, Definition> */ protected Map<String, Definition> getWSDLKeyDefinition(EndpointInfo endpointInfo) { Map<String, Definition> mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(WSDLS_KEY)); if (mp == null) { endpointInfo.getService().setProperty(WSDLS_KEY, new ConcurrentHashMap<String, Definition>(8, 0.75f, 4)); mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService().getProperty(WSDLS_KEY)); } return mp; }
/** * Retrieve the map of known xsd SchemaReference objects for this endpoint. * * @param endpointInfo information for a web service 'port' inside of a service * @return Map<String, SchemaReference> */ protected Map<String, SchemaReference> getSchemaKeySchemaReference(EndpointInfo endpointInfo) { Map<String, SchemaReference> smp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(SCHEMAS_KEY)); if (smp == null) { endpointInfo.getService().setProperty(SCHEMAS_KEY, new ConcurrentHashMap<String, SchemaReference>(8, 0.75f, 4)); smp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(SCHEMAS_KEY)); } return smp; }
/** * Retrieve the map of known xsd SchemaReference objects for this endpoint. * * @param endpointInfo information for a web service 'port' inside of a service * @return Map<String, SchemaReference> */ protected Map<String, SchemaReference> getSchemaKeySchemaReference(EndpointInfo endpointInfo) { Map<String, SchemaReference> smp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(SCHEMAS_KEY)); if (smp == null) { endpointInfo.getService().setProperty(SCHEMAS_KEY, new ConcurrentHashMap<String, SchemaReference>(8, 0.75f, 4)); smp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(SCHEMAS_KEY)); } return smp; }
/** * Retrieve the map of known wsdl Definition objects for this endpoint. * * @param endpointInfo information for a web service 'port' inside of a service * @return Map<String, Definition> */ protected Map<String, Definition> getWSDLKeyDefinition(EndpointInfo endpointInfo) { Map<String, Definition> mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService() .getProperty(WSDLS_KEY)); if (mp == null) { endpointInfo.getService().setProperty(WSDLS_KEY, new ConcurrentHashMap<String, Definition>(8, 0.75f, 4)); mp = CastUtils.cast((Map<?, ?>)endpointInfo.getService().getProperty(WSDLS_KEY)); } return mp; }
public static CorbaTypeMap get(ServiceInfo service) { if (service != null) { synchronized (service) { CorbaTypeMap map = service.getProperty(KEY, CorbaTypeMap.class); if (map == null) { List<TypeMappingType> corbaTypes = service.getDescription() .getExtensors(TypeMappingType.class); if (corbaTypes != null) { map = CorbaUtils.createCorbaTypeMap(corbaTypes); service.setProperty(KEY, map); } } return map; } } return null; } }
@Override protected Definition getDefinition(EndpointInfo endpointInfo) throws WSDLException { WSDLManager wsdlManager = bus.getExtension(WSDLManager.class); if (wsdlManager != null) { String wsdlLocation = endpointInfo.getService().getProperty(CxfConstants.WSDL_LOCATION, String.class); if(wsdlLocation != null) { return loadDefinition(wsdlManager, wsdlLocation); } } return new ServiceWSDLBuilder(bus, endpointInfo.getService()).build(); }
objRefProducers.add(new CorbaAddressEventProducer(address)); Definition wsdlDef = (Definition)serviceInfo.getProperty(WSDLServiceBuilder.WSDL_DEFINITION);
protected void addMessageFromBinding(ExtensibilityElement ext, BindingOperationInfo bop, boolean isInput) { SoapHeader header = SOAPBindingUtil.getSoapHeader(ext); ServiceInfo serviceInfo = bop.getBinding().getService(); if (header != null && header.getMessage() == null) { throw new RuntimeException("Problem with WSDL: soap:header element" + " for operation " + bop.getName() + " under binding " + bop.getBinding().getName() + " does not contain a valid message attribute."); } if (header != null && serviceInfo.getMessage(header.getMessage()) == null) { Definition def = (Definition)serviceInfo.getProperty(WSDLServiceBuilder.WSDL_DEFINITION); SchemaCollection schemas = serviceInfo.getXmlSchemaCollection(); if (def != null && schemas != null) { QName qn = header.getMessage(); javax.wsdl.Message msg = findMessage(qn, def); if (msg != null) { addOutOfBandParts(bop, msg, schemas, isInput, header.getPart()); serviceInfo.refresh(); } else { throw new RuntimeException("Problem with WSDL: soap:header element" + " for operation " + bop.getName() + " is referring to an undefined wsdl:message element: " + qn); } } } } private javax.wsdl.Message findMessage(QName qn, Definition def) {
protected void addMessageFromBinding(ExtensibilityElement ext, BindingOperationInfo bop, boolean isInput) { SoapHeader header = SOAPBindingUtil.getSoapHeader(ext); ServiceInfo serviceInfo = bop.getBinding().getService(); if (header != null && header.getMessage() == null) { throw new RuntimeException("Problem with WSDL: soap:header element" + " for operation " + bop.getName() + " under binding " + bop.getBinding().getName() + " does not contain a valid message attribute."); } if (header != null && serviceInfo.getMessage(header.getMessage()) == null) { Definition def = (Definition)serviceInfo.getProperty(WSDLServiceBuilder.WSDL_DEFINITION); SchemaCollection schemas = serviceInfo.getXmlSchemaCollection(); if (def != null && schemas != null) { QName qn = header.getMessage(); javax.wsdl.Message msg = findMessage(qn, def); if (msg != null) { addOutOfBandParts(bop, msg, schemas, isInput, header.getPart()); serviceInfo.refresh(); } else { throw new RuntimeException("Problem with WSDL: soap:header element" + " for operation " + bop.getName() + " is referring to an undefined wsdl:message element: " + qn); } } } } private javax.wsdl.Message findMessage(QName qn, Definition def) {
Definition definition = null; try { definition = services.get(0).getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class); } catch (ClassCastException e) {
Definition definition = null; try { definition = services.get(0).getProperty(WSDLServiceBuilder.WSDL_DEFINITION, Definition.class); } catch (ClassCastException e) {