Welcome to the Forums for DTS 4. The following shortcuts are available for new posts and replies.

[br] = line break/new paragraph    [b] [/b] = bold font   
[i] [/i] = italicized font [u] [/u] = underlined font 
[sub] [/sub] = subscript text 
 [strike] [/strike] = strikethrough
[sub] [/sup] = superscript text    

DTS Forums

How to use findConceptsWithSynonymMatching method
Last Post 24 Sep 2014 03:03 PM by jbowie. 1 Replies.
Printer Friendly
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
albagjimenezUser is Offline
New Member
New Member

24 Sep 2014 11:25 AM
    Hi, I'm testing the Apelon DTS WS.

    I'd like to get all the synonyms concepts from the "Body structure (body structure)" in SNOMED namespace.

    This is my code:


    * Sample code using a JAX-WS client.
    public class Example {
    public static void main(String[] args) {
    try {
    // Instantiate client
    DtsQueryDaoService service = new DtsQueryDaoService();
    System.out.println("Retrieving the port from the following service: " + service);
    DtsQueryDaoWS port = service.getDtsQueryDaoPort();
    // Set credentials for JAX-WS.
    Map<String, Object> requestContext = ((BindingProvider) port).getRequestContext();
    requestContext.put(BindingProvider.USERNAME_PROPERTY, "dtsadminuser");
    requestContext.put(BindingProvider.PASSWORD_PROPERTY, "dtsadmin");

    // String conceptCode = "C3"; // Medication in OpenCDS namespace
    //int namespaceId = 32769; // OpenCDS

    // Configure the service to read all property types
    TConceptAttributeSetDescriptor attributeSetDescriptor = new TConceptAttributeSetDescriptor();
    System.out.println("Invoking the findConceptsWithSynonymMatching operation on the port.");

    //Association Type
    TAssociationType associationType = new TAssociationType();
    associationType.setName("English Synonym");
    int namespaceId = 32770; //SNOMED CT

    //Search pattern
    String searchPattern = "Body structure (body structure)";

    TConceptSearchOptions options = new TConceptSearchOptions();

    List<TOntylogConcept> concepts = port.findConceptsWithSynonymMatching(associationType, searchPattern, options);
    for (TOntylogConcept concept : concepts) {
    // Print some concept info
    String conceptName = concept.getName();
    System.out.println("Concept Name: " + conceptName);
    // Print concept properties
    List<TProperty> props = concept.getProperties();
    for (TProperty prop : props) {
    System.out.println(prop.getPropertyType().getName() + ": "
    + prop.getValue());
    } catch (Exception ex) {

    But I'm getting this error:

    Retrieving the port from the following service:
    sep 24, 2014 6:19:15 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
    Información: Creating Service {}DtsQueryDaoService from WSDL: http://localhost:28080/soap/DtsQueryDaoWS?wsdl
    Invoking the findConceptsWithSynonymMatching operation on the port. Cannot find GID. DTS Object is missing ID or Namespace ID
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
    at com.sun.proxy.$Proxy40.findConceptsWithSynonymMatching(Unknown Source)
    at sspa.huvr.git.Example.main(
    Caused by: org.apache.cxf.binding.soap.SoapFault: Cannot find GID. DTS Object is missing ID or Namespace ID
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(
    at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
    at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(
    at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
    at org.apache.cxf.endpoint.ClientImpl.onMessage(
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
    at org.apache.cxf.transport.AbstractConduit.close(
    at org.apache.cxf.transport.http.HTTPConduit.close(
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(
    at org.apache.cxf.endpoint.ClientImpl.invoke(
    at org.apache.cxf.endpoint.ClientImpl.invoke(
    at org.apache.cxf.endpoint.ClientImpl.invoke(
    at org.apache.cxf.frontend.ClientProxy.invokeSync(
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
    ... 2 more

    What can I be doing wrong?

    Thanks in advance!
    jbowieUser is Offline
    Basic Member
    Basic Member

    24 Sep 2014 03:03 PM
    When passing an attribute type, like association type, into one of the methods, the object needs to be a validated object from the db. Use:

    associationType = port.findAssociationTypeByName(name, nsid);

    to fetch the correct type.
    Similar methods are available for other attribute types.
    You are not authorized to post a reply.


    We are a privately held international software and informatics company focusing on data standardization and interoperability. Apelon’s software and professional services help leading healthcare enterprises, HIT vendors and integrators, life sciences organizations and government agencies better manage standard terminologies and transition local data to these standards. Our solutions enable semantic interoperability, consistent data analysis, and standardized reporting of health information to improve the quality, comparability, and accessibility of clinical data.

    Latest Tweets

    Copyright 2024 by Apelon, Inc.