! WebServices remoteXerver Demo ! @m90dest:ws/WS_rxDemo@ Destination File getCustomerAddress: ! Get XML Document xmlDocument=%remX.RequestArray'Get(1) ! Initialize Response findSuccessful=0 xmlResponse = new("remx/struct") xmlResponse'addMember("findSuccessful",new("remx/integer",findSuccessful)) ! Initialize Session coSession=%sys_ss coSession'SetCompany("ABC", 1) ! Find Customer coCustomer = NEW("AR_Customer_SVC",coSession) temp$ = xmlDocument'getMember("customerNumber")'value$ coCustomer'SetKeyValue("ARDivisionNo$",MID(temp$,1,2)) coCustomer'SetKeyValue("CustomerNo$",MID(temp$,3)) IF coCustomer'Find() { findSuccessful=1 coCustomer'GetValue("CustomerName$",cCustomerName$) coCustomer'GetValue("AddressLine1$",cAddressLine1$) coCustomer'GetValue("AddressLine2$",cAddressLine2$) coCustomer'GetValue("AddressLine3$",cAddressLine3$) coCustomer'GetValue("City$",cCity$) coCustomer'GetValue("State$",cState$) coCustomer'GetValue("ZipCode$",cZipCode$) xmlResponse'addMember("CustomerName",new("remx/string",cCustomerName$)) xmlResponse'addMember("AddressLine1",new("remx/string",cAddressLine1$)) xmlResponse'addMember("AddressLine2",new("remx/string",cAddressLine2$)) xmlResponse'addMember("AddressLine3",new("remx/string",cAddressLine3$)) xmlResponse'addMember("City",new("remx/string",cCity$)) xmlResponse'addMember("State",new("remx/string",cState$)) xmlResponse'addMember("ZipCode",new("remx/string",cZipCode$)) } drop object coCustomer coCustomer=0 exitLogin: xmlResponse'setMember("findSuccessful",new("remx/integer",findSuccessful)) %remX.resultArray = new("remx/array") %remX.resultArray'add(xmlResponse) EXIT