I have a web services question using codeunits and XMLPorts as web services. I would like to be able use an XMLPort as a parameter for a codeunit web service, but I want the XMLPort to point to tables set a Temporary, so the data is not automatically inserted into the database when called. I would like to be able to read the data passed in to the XMLPort, then process it in the codeunit.
I have tried creating an XMLPort with Purchase Header and Purchase Lines, setting both records as Temporary=Yes. I have then create a codeunit, and created a method "SavePurchasOrder", with the XMLPort as the method parameter. When this is published, I am able to call the method as a web service, but I believe the XMLPort data, since it is Temporary, is out of scope when I try to access it in the codeunit.
I have even tried creating a function in the XMLPort called GetData, tried passing the temp table data through this, but it returns empty tables.
Is this possible to do, without writing the XMLPort data to a record and reading it in the codeunit?
Thanks!
0
Answers
and in the function, you need to loop the temptable in the globals of the XML-port and insert the records in the parameter-temptable of the function.
In the XML-port, when you have a record filled up, you need to INSERT it into a temptable in the globals of the XML-port.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!