>>>>local cBitMap, cBitMap1 >>>>cBitMap1=FILETOSTR(STORE.cpicdir-"\product\"-alltrim(positems.mainimage)) >>>>cBitMap=STRCONV(cBitMap1,13) >>>> >>>>dimension picfile(3,2)AS ARRAY >>>>store "name" to picfile(1,1) >>>>store "aatestpicture.png" to picfile(1,2) >>>>store "content" to picfile(2,1) >>>>store cBitMap to picfile(2,2) >>>>store "mime" to picfile(3,1) >>>>store "image/png" to picfile(3,2) >>>> >>>>dimension typefile(1) >>>>store "small_image" to typefile >>>> >>>>dimension picarray(5,2)AS ARRAY >>>>store "file" to picarray(1,1) >>>>store picfile to picarray(1,2) >>>>store "label" to picarray(2,1) >>>>store "this is my test image" to picarray(2,2) >>>>store "position" to picarray(3,1) >>>>store 2 to picarray(3,2) >>>>store "types" to picarray(4,1) >>>>store typefile to picarray(4,2) >>>>store "exclude" to picarray(5,1) >>>>store 0 to picarray(5,2) >>>> >>>>dimension oArray(1,2) AS ARRAY >>>>store positems.cupcnumber to oArray(1,1) >>>>store picarray to oArray(1,2) >>>> >>>> >>>>LOCAL loMage_Api_Model_Server_HandlerPort AS "XML Web Service" >>>>* LOCAL loMage_Api_Model_Server_HandlerPort AS "MSSOAP.SoapClient30" >>>>* Do not remove or alter following line. It is used to support IntelliSense for your XML Web service. >>>>*__VFPWSDef__: loMage_Api_Model_Server_HandlerPort = http://www.fantasyfestival.com/api/soap/?wsdl , MagentoService , Mage_Api_Model_Server_HandlerPort >>>>LOCAL loException, lcErrorMsg, loWSHandler >>>>TRY >>>> loWSHandler = NEWOBJECT("WSHandler",IIF(VERSION(2)=0,"",HOME()+"FFC\")+"_ws3client.vcx") >>>> loMage_Api_Model_Server_HandlerPort = loWSHandler.SetupClient("http://www.fantasyfestival.com/api/soap/?wsdl", "MagentoService", "Mage_Api_Model_Server_HandlerPort") >>>>* Call your XML Web service here. ex: leResult = loMage_Api_Model_Server_HandlerPort.SomeMethod() >>>> sessionid = loMage_Api_Model_Server_HandlerPort.login("fanfest", "sk1ppy") >>>> leResult2 = loMage_Api_Model_Server_HandlerPort.CALL(sessionid, "product_media.create", oArray) >>>> >>>>CATCH TO loException >>>> lcErrorMsg="Error: "+TRANSFORM(loException.ERRORNO)+" - "+loException.MESSAGE >>>> DO CASE >>>> CASE VARTYPE(loMage_Api_Model_Server_HandlerPort)#"O" >>>>* Handle SOAP error connecting to web service >>>> CASE !EMPTY(loMage_Api_Model_Server_HandlerPort.FaultCode) >>>>* Handle SOAP error calling method >>>> lcErrorMsg=lcErrorMsg+CHR(13)+loMage_Api_Model_Server_HandlerPort.DETAIL >>>> OTHERWISE >>>>* Handle other error >>>> ENDCASE >>>>* Use for debugging purposes >>>> MESSAGEBOX(lcErrorMsg) >>>>FINALLY >>>>ENDTRY >>>>>>>>