How to cancel Sales Order in AX2009 using .Net webservice

I added reference of ‘SalesSalesOrderService’ AIF webservice in .Net, and now I want to cancel a SalesOrder Record in Dynamics AX 2009.

I tried by setting ‘Service.SalesStatus’ to ‘Cancelled’. It is compling fine, but not getting proper output in AX.
I know, we can cancel by setting ‘Deliver Remainder’ to Zero, but I am not able to do the same by .Net.

If you click Cancel quantity button in Update remaining quantity form, it simply changes values of RemainSalesPhysical and RemainInventPhysical fields and saves the line. (More business logic is then executed in SalesLineType class.)

I don’t see any reason why it shouldn’t work via AIF.