Error while Updating customer using AIF file system adapter

In my current scenario, I have used CustCustomerService.Read operation in my Inbound port and able to read successfully. I am getting the output file in AIF / Out folder with all information of customer.

Now for update, I have created a new inbound port for updating the customer and added CustCustomerservice.Update to update the customer. I am using the same XML file which I got from AIF/out folder(during read) and changed some field’s values. I am also using new (In and Out folders for update service which are differ from Read service).

As soon as I am trying to update the customer, it says - “The request failed with the following error: value cannot be null. Parameter name entityKeyList”.

I am not sure for which field it is giving error.

Here is my XML file which I am sending with data to update the customer.

<?xml version="1.0" encoding="UTF-8"?>

-

-

schemas.microsoft.com/…/update&lt;/Action>

-

-

-

-

-

-

AccountNum

US-003

-

Original

usmf

2017-03-13T23:04:57Z

AsOf

-

<_DocumentHash>e271c1293e6a5f72d42667935f74ee86</_DocumentHash>

US-003

Always

<Affiliated_RU>No</Affiliated_RU>

No

0.5%D30

<CompanyType_MX>Blank</CompanyType_MX>

None

Accept

No

None

350000.00000000000000000000

Good

USD

No

No

<CustFinalUser_BR>No</CustFinalUser_BR>

10

<CustWhtContributionType_BR>Other</CustWhtContributionType_BR>

{1799D377-DBFB-40CB-87BF-26C95AFF0FF0}

-

-

-

BusinessUnit

002

10

FOB

No

<EntryCertificateRequired_W>No</EntryCertificateRequired_W>

<ExportSales_PL>No</ExportSales_PL>

No

None

<FiscalDocType_PL>Invoice</FiscalDocType_PL>

No

<ForeignResident_RU>No</ForeignResident_RU>

<GenerateIncomingFiscalDocument_BR>No</GenerateIncomingFiscalDocument_BR>

None

None

None

None

None

None

<ICMSContributor_BR>No</ICMSContributor_BR>

No

No

No

Yes

24

<InventProfileType_RU>NotSpecified</InventProfileType_RU>

2

InvoiceAccount

<InvoicePostingType_RU>Standard</InvoicePostingType_RU>

No

<IssueOwnEntryCertificate_W>No</IssueOwnEntryCertificate_W>

2100

No

<MandatoryVatDate_PL>No</MandatoryVatDate_PL>

Forest Wholesales

No

<PackageDepositExcempt_PL>No</PackageDepositExcempt_PL>

000000842

CHECK

Net45

No

02

22565421562

No

No

No

Production

10

01

04

10

<ServiceCodeOnDlvAddress_BR>No</ServiceCodeOnDlvAddress_BR>

No

No

02

10

<Suframa_BR>No</Suframa_BR>

<SuframaPISCOFINS_BR>No</SuframaPISCOFINS_BR>

{00000000-0000-0000-0000-000000000000}

CA

<TaxWithholdCalculate_IN>No</TaxWithholdCalculate_IN>

<TaxWithholdCalculate_TH>No</TaxWithholdCalculate_TH>

<UnitedVATInvoice_LT>No</UnitedVATInvoice_LT>

Normal

No

WebEntered

-

en-us

Forest Wholesales

Forest Wholesales

000000842

000001209

22565425093

22565425696

-

<_RecId_LogisticsPostalAddress>22565424302</_RecId_LogisticsPostalAddress>

123 White Road Los Angeles,CA 90004 USA

Los Angeles

USA

LOS ANGELE

Yes

US

Yes

No

No

22565427242

Forest Wholesales

000000842

22565426608

22565424302

22565426608

Business;Delivery;Invoice;Other

CA

123 White Road

2009-01-03T12:48:25Z

2154-12-31T23:59:59Z

90004

-

22565425093

No

Yes

No

Yes

No

22565427245

000001212

Forest Wholesales Phone

123-555-0159

000000842

22565426611

22565425093

Business

Phone

2637

2154-12-31T23:59:59Z

None

-

Forest Wholesales

22565424046

2009-01-03T12:50:06Z

2154-12-31T23:59:59Z

But In my CustCustomerService.Update, below is the XSD which I generated -

<?xml version="1.0" encoding="utf-16"?>

<xs:schema xmlns:tns=“schemas.microsoft.com/…/Customer” xmlns:st=“schemas.microsoft.com/…/sharedtypes” elementFormDefault=“qualified” targetNamespace=“schemas.microsoft.com/…/Customer” xmlns:xs=“www.w3.org/…/XMLSchema”>
<xs:import schemaLocation=“SharedTypes.xsd” namespace=“schemas.microsoft.com/…/sharedtypes” />
<xs:element name=“Customer” type=“tns:AxdCustomer” />
<xs:complexType name=“AxdCustomer”>
xs:sequence
<xs:element minOccurs=“0” maxOccurs=“unbounded” name=“CustTable” type=“tns:AxdEntity_CustTable” />
</xs:sequence>
</xs:complexType>
<xs:complexType name=“AxdEntity_CustTable”>
xs:sequence
<xs:element minOccurs=“1” name=“CustGroup” type=“st:AxdExtType_CustGroupId” />
<xs:element minOccurs=“0” name=“DefaultDimension” nillable=“true” type=“st:AxdType_DimensionAttributeValueSet” />
</xs:sequence>
<xs:attribute fixed=“entity” name=“class” use=“required” />
<xs:attribute name=“action” type=“st:AxdEnum_AxdEntityAction” />
</xs:complexType>
</xs:schema>

How can I validate the schema ?

And another question is - How to convert XSD into XML file ?

Regards

Mukti

Can anyone please help me on this ?