FoxPro Programming
Debugging WWProxy Program
Gravatar is a globally recognized avatar based on your email address. Debugging WWProxy Program
  VFPJCOOK
  All
  May 6, 2021 @ 07:20am

I am accessing a web service from my VFP9 app. I used the WW Proxy Generator to generate a proxy program that communicates with the service. This has been in use and works well for many years.

BUT, there has always been a bug where the service returns an error that my app does not detect. I am trying to fix this.

I am stepping thru my code (using debugger), and get to the line: loResponse=loProxy.FCSActRegPinLoad(loSvcReq)

The debugger shows loResponse as an Object but I can not expand that object so I can not see the elements of that object so I can not see what may be in there. The authors of the service tell me the error message/code may be in the elements of the response object.

Is there another way for me to see the elements of the loResponse object?

Adding a little more information about this issue:

Here is the code in my proxy program that makes the call to the service:

************************************************************************
*  FCSActRegPinLoad
****************************************
FUNCTION FCSActRegPinLoad(FCSActRegPinLoadSvcReq as FCSActRegPinLoadSvcReq) as FCSActRegPinLoadSvcRes
LOCAL loException as Exception, lvResult as FCSActRegPinLoadSvcRes

THIS.lError = .F.
this.cErrorMsg = ""

lvResult = .F.
TRY	
	lvResult = this.oBridge.InvokeMethod(this.oService, "FCSActRegPinLoad", FCSActRegPinLoadSvcReq)
	
CATCH to loException
	THIS.GetErrorDetail(loException)
ENDTRY

RETURN lvResult
ENDFUNC
*   FCSActRegPinLoad

So the code above returns lvResult which is FCSActRegPinLoadSvcRes

Looking in .NET Reflector at FCSActRegPinLoadSvcRes this is what I see:

So, I would think the object loReponse would have elements ErrCde, ErrMsg and MsgUUID but again, in the debugger I see loResponse is an object but can not expand it to see it's contents/elements. And I guess my question is how can I see them?

Adding to this message: I found a solution. Even though the debugger would not allow me to inspect the ErrCde and ErrMsg elements, I was able to see the values in LoResponse.ErrCde and loResponse.ErrMsg so I added code: If not empty(loResponse.ErrCde) or not empty(loResponse.ErrMsg); do an error message That fixes the issue.

Thanks, John

© 1996-2024