Hello,
I buyed Web Service Proxy Generator and I always get this error "Type not loaded. Please load call LoadAssembly first". I read all the information you give to me and I can manage. Make enviroment is: Windows 10 VFP 9.0 Diretory of work: D:\VFP9Apps (set in FVP seach path, and system varible PATH)
Test program: DO msppesquisaprestacao120proxy
- Error occur after the following comand loProxy = CREATEOBJECT("MSPPesquisaPrestacao120Proxy","V4")
Debbuging the comand, the error occur in: IF !this.oBridge.Loadassembly(this.cAssemblyPath)
Can you help me? Thanks
Hmmm... I don't think this line:
IF !this.oBridge.Loadassembly(this.cAssemblyPath)
can produce the error you're reporting. The error is an assembly load error, meaning something is already trying to load a component. The code above doesn't do that - it just tries to load the assembly (dll) so that the component can be loaded from it when you call loBridge.CreateInstance()
.
You should check errors all the ay from the top starting with the call from LoadAssembly()
to see whether that's failing. It looks like you're testing for failure, but are you exiting at that point or continuing to run? What's the error if LoadAssembly()
fails?
Also make sure you're loading all the libraries (do MyProxy.prg
) (I think you do as the errors would be different).
+++ Rick ---
Hello,
Sorry to not answer sooner. Thank for the help! It was a problem of the Object name:
Now I have a bigger error: "ole idispatch exception code 0 from System.Web.Services Rejected by policy. (from client)"
I need to access the following web service site: https://wsgw-teste.min-saude.pt:8000/MSP/MSPPesquisaPrestacao/1.20?wsdl
I get the error after I do the following code:
DO msppesquisaprestacao120proxy loProxy = CREATEOBJECT("MSPPesquisaPrestacao120.MSPPesquisaPrestacao120","V4") oMSPPRequest = CREATEOBJECT("MSPPesquisaPrestacao120.MSPPesquisaProcessRequestType","V4") oMSPPResponse = CREATEOBJECT("MSPPesquisaPrestacao120.MSPPesquisaProcessResponseType","V4") loProxy.HttpLogin("8sgyMrTmGy", "A6K9OfJ1QS",.T.) ***** the following code line generate the error oMSPPResponse = loProxy.process(oMSPPRequest)
Could you help me? Thanks in advance
Pedro
Please repost this message with your code properly formatted... you can edit your post and use the Code toolbar to mark up your code.
+++ Rick ---
Hello, Sorry to not answer sooner. Thank for the help! It was a problem of the Object name: Now I have a bigger error: "OLE Idispatch exception code 0 from System.Web.Services Rejected by policy. (from client)"
I need to access the following web service site: https://wsgw-teste.min-saude.pt:8000/MSP/MSPPesquisaPrestacao/1.20?wsdl
I get the error after I do the following code:
DO msppesquisaprestacao120proxy
loProxy = CREATEOBJECT("MSPPesquisaPrestacao120.MSPPesquisaPrestacao120","V4")
oMSPPRequest = CREATEOBJECT("MSPPesquisaPrestacao120.MSPPesquisaProcessRequestType","V4")
oMSPPResponse = CREATEOBJECT("MSPPesquisaPrestacao120.MSPPesquisaProcessResponseType","V4")
loProxy.HttpLogin("8sgyMrTmGy", "A6K9OfJ1QS",.T.)
***** the following code line generate the error
oMSPPResponse = loProxy.process(oMSPPRequest)
Could you help me? Thanks in advance
Pedro