Quantcast
Channel: Iulian Cordobin's Groups Activities
Viewing all articles
Browse latest Browse all 1084

Read records from AIF Service

$
0
0

Hi,

I am unable to read records of the AIF document service. Below is the schema and the code to read from AIF:

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:tns="schemas.microsoft.com/.../ARR_Profile" xmlns:st="schemas.microsoft.com/.../sharedtypes" elementFormDefault="qualified" targetNamespace="schemas.microsoft.com/.../ARR_Profile" xmlns:xs="www.w3.org/.../XMLSchema">
  <xs:import schemaLocation="SharedTypes.xsd" namespace="schemas.microsoft.com/.../sharedtypes" />
  <xs:element name="ARR_Profile" type="tns:AxdARR_Profile" />
  <xs:complexType name="Axd_Profile">
    <xs:sequence>
      <xs:element minOccurs="0" name="DocPurpose" nillable="true" type="st:AxdEnum_XMLDocPurpose" />
      <xs:element minOccurs="0" name="SenderId" nillable="true" type="st:AxdExtType_DataAreaId" />
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Profile" type="tns:AxdEntity_Profile" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AxdEntity_Profile">
    <xs:sequence>
      <xs:element minOccurs="0" name="_DocumentHash" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="RecId" nillable="true" type="st:AxdExtType_RecId" />
      <xs:element minOccurs="0" name="RecVersion" nillable="true" type="st:AxdExtType_RecVersion" />
      <xs:element minOccurs="1" name="Active" type="st:AxdEnum_NoYes" />
      <xs:element minOccurs="1" name="BrokerId" type="xs:string" />
      <xs:element minOccurs="1" name="plate" type="xs:string" />
      <xs:element minOccurs="1" name="MembershipNumber" type="xs:string" />
      <xs:element minOccurs="1" name="ProfileOrigin" type="st:AxdEnum_ProfileOrigin" />
      <xs:element minOccurs="1" name="Owner" type="xs:string" />
      <xs:element minOccurs="1" name="RegistrationNumber" type="xs:string" />
      <xs:element minOccurs="1" name="Date" type="xs:date" />
    </xs:sequence>
    <xs:attribute fixed="entity" name="class" use="required" />
    <xs:attribute name="action" type="st:AxdEnum_AxdEntityAction" />
  </xs:complexType>
</xs:schema>

The C# code used to communicate with AIF is as follows:

Axd_Profile profiles;             

            EntityKey[] readKeys = new EntityKey[1];
            readKeys[0] = new EntityKey();
            readKeys[0].KeyData = new KeyField[1];
            readKeys[0].KeyData[0] = new KeyField() { Field = "MembershipNumber", Value = memberId };          

            profiles = proxy.read(context, readKeys);

            return profiles.AMA_Profile;


This approach fails and AIF complains that the "Wrong field ID in the key data container in entity key". The field exists in the table and I have an index on that field as well. Any ideas, why my "read" operation is not functioning. Let me know if you need more info.


Viewing all articles
Browse latest Browse all 1084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>