Hi guys,
can you please guide me in testing of "netTcp" aif web service. I have created AIF inbound wsdl port.
we will pass data in xml to this aif web service, which will creates data in AX.
Scenario:
Input: data in xml
Action/output/response: This will creates data in AX. Gives no response.
Find below screenshot for reference.
Hi Martin,
In request properties, i have 4,5 functions, I didn't find where to pass all the values which you could see in xml screenshot of previous reply.
can you please help here.
Find screenshot below.
Your XML document contains a node called IDSInventTransferTable. And your screenshots shows a property of exactly the same name. So far so good, isn't it?
Your screenshot also shows you the type - AxdIDSInventTransferTable. Create an instance of this class, populate it with values and set it to the property. It's no magic here, just the usual object oriented programming.
For example:
AxdIDSInventTranferTable transferTable = new AxdIDSInventTranferTable(); transferTable.SenderId = 964; request.IDSInventTranferTable = transferTable;
Now I am able to test and data created in AX, but real and Date type values are not taking what we passed from visual studio, getting default values. working for other types such as string..etc
Can you help here, not sure why values are not taking and getting default values 0.
Find the screenshot for reference.
Thank you..
Debug the document service in AX to see if it receives correct values from outside. Maybe it does but then it doesn't process them as you expect.
By the way, there should be no need to use Convert class to assign a decimal value. Doesn't bufferReceiptLine.LineRowNumber = 10 work for you? If you prefer, you don't have to parse strings to datetime either. You can use new DateTime(2020, 11, 2), for instance.
I need one favour here, One table header may contains multiple lines like salestable and salesLine.
could you please help a bit, how we could write code in c# in this case.
Attaching screenshots for the reference.
Your service doesn't seem to be related to either SalesTable or SalesLine. You have a AxdIDSInventTransferTable, which contains an array of MessageTable object. Each MessageTable objects then contains an array of BufferReceiptTable objects, and each of them contains and array of BufferReceiptLine objects.
Do you mean that you don't know how to use arrays? You can learn basics here.
Here is a concrete example:
// Declare an array var arrayOfLines = new AxdEntity_BufferReceiptLine[2]; // Set the first line arrayOfLines[0] = new AxdEntity_BufferReceiptLine() { ItemId = "Item1"; }; // Set the second line arrayOfLines[1] = new AxdEntity_BufferReceiptLine() { ItemId = "Item2"; }; // Assign the array of lines to the header bufferReceiptTable.BufferReceiptLine = arrayOfLines;
Thanks so and highly appreciate your inputs.