Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Help with InvokeMethod_ParameterArray

$
0
0
Help with InvokeMethod_ParameterArray
Web Service Proxy Generator
Help with InvokeMethod_ParameterArray
May. 19, 2013
05:31 am
3SE0BU0YFShow this entire thread in new window
Gratar Image based on email address
From:Flavio
To:All
Trouble use InvokeMetod_ParameterArray...

Hi to all... I am new of this (very good) product.. I am testing it and I have a big problem... One of my Soap Call have 18 parameters. i have try to work around but always I receive an reeorr message telling me tha ole returned an error Method not found".... Thinking that is my poor knowledge the reason of thi error I have make a test.

I have a method with ony 7 parameters...
the proxy expose this method by this way

************************************************************************ * signP7M ****************************************FUNCTION signP7M(signatureCred as RemoteSignatureCredentials,content as ByteArray,contentInAttachments as Boolean,p7m as Boolean,digestType as String,X509certificate as ByteArray,flags as SignatureFlags) as ByteArrayLOCAL loException as Exception, lvResult as ByteArrayTHIS.lError = .F.this.cErrorMsg = "" lvResult = .F. TRY lvResult = this.oBridge.InvokeMethod(this.oService, "signP7M", signatureCred,CREATEBINARY(content),contentInAttachments,p7m,digestType,CREATEBINARY(X509certificate),flags)CATCHto loExceptionTHIS.GetErrorDetail(loException)ENDTRYRETURN lvResultENDFUNC* signP7M

and I can call correctly this method from my program with a function call like:

loService = CREATEOBJECT("RemoteSignatureServiceProxy","V2") cStrFileSign = loService.SignP7M(Loinst,cStrFile,.f.,.f.,"SHA256",xcert,loSignFlag)

The Method return a file signed by an HSM

So i Try to call the funcion with InvokeMethod_ParameterArray by this way

loArr1 = oBridge.CreateArray("System.Object") loArr1.Additem(loInst) loArr1.AddItem(cstrfile) loArr1.AddItem(.f.) loArr1.AddItem(.f.) loArr1.AddItem("SHA256") loArr1.AddItem(xcert) loArr1.AddItem(loSignFlag) InstSign=oBridge.CreateInstance("RemoteSign.RemoteSignatureService")cStrFileSign1=oBridge.InvokeMethod_ParameterArray(loInstSign, "SignP7M",loArr1)

And I have error method RemoteSign.Remotesignatureservice.signp7m not found ... I think that would be a my error so I create a new function derivated from old signP7m directly in proxy source

************************************************************************ * signP7M_Array ****************************************FUNCTION signP7M_Array(aParam as Westwind.WebConnection.ComArray) as ByteArrayLOCAL loException as Exception, lvResult as ByteArrayTHIS.lError = .F.this.cErrorMsg = "" lvResult = .F. TRY lvResult = this.oBridge.InvokeMethod_ParameterArray(this.oService, "signP7M", aParam)CATCHto loExceptionTHIS.GetErrorDetail(loException)ENDTRYRETURN lvResultENDFUNC

To be sure that all object are been instanted correctly

By this way I can call the method directly by this way

loArr1 = oBridge.CreateArray("System.Object") loArr1.Additem(loInst) loArr1.AddItem(cstrfile) loArr1.AddItem(.f.) loArr1.AddItem(.f.) loArr1.AddItem("SHA256") loArr1.AddItem(xcert) loArr1.AddItem(loSignFlag) loService = CREATEOBJECT("RemoteSignatureServiceProxy","V2") cStrToFile = loService.SignP7M_Array(loArr1)

and I unfortunately receive again method RemoteSign.Remotesignatureservice.signp7m not found

Please someone can help me to understand where is the ploblem?

Many thank for your help ant sorry for my poor english

Flavio


Viewing all articles
Browse latest Browse all 10393

Trending Articles