AnsweredAssumed Answered

Querying custom Association using Web Service

Question asked by mrt on Apr 28, 2008
I'm having problems folliwing an association between two custom types, using the Web Services API and would appreciate some assistance.

I have a custom type typeA with an associations to another custom type typeB.

    
 
<type name="hgn:typeA">
  …    
  <associations>        
    <association name="hgn:myAssociation">
    ….
      <source>
         <mandatory>false</mandatory>
         <many>true</many>
      </source>
      <target>
        <class>hgn:typeB</class>
         <mandatory>false</mandatory>
          <many>true</many>
      </target>
    </association>
      ….
  </associations>
</type>

After some source code perusal and Googling I came up with this code:


Association association = new Association("hgn:myAssociation", "source");
QueryResult result = WebServiceFactory.getRepositoryService().queryAssociated(referenceToTypeA, association);

This executes fine but always returns a an empty result set. What am I missing? Grateful for pointers.

Outcomes