Web Connection
Fun (not) with wconnect_override.h
Gravatar is a globally recognized avatar based on your email address. Fun (not) with wconnect_override.h
  Richard Kaye
  All
  Oct 27, 2023 @ 06:54am

Things were going so swimmingly... 😃

Let me see if I can frame this clearly.

I now have 2 WWC apps which share some common code, so I've been refactoring the folder structures for better management/git, etc.

The main folder is c:\webconnectionprojects\rfc3. The relevant sub-folders under rfc3 are:

->classes (wwc framework used by both apps. location for wconnect/wcconect_override.h, with the intention of using same override for both apps)
->deploy (location for standard WWC app code)
->r3common (location for code used by both apps)
->rfc3apis\deploy (location for new, unreleased WWC REST app code)
->usersecuritymanager (wwUserSecurity subclass used by both apps)

Previously, I created my own subclass of wwsession so I could customize the wwsession table. I am using wconnect_override.h to point WWC_SQLSESSION and WWC_SESSION to my subclass prg.

#UNDEFINE WWC_SESSION 
#DEFINE WWC_SESSION 			rfcSession
#UNDEFINE WWC_SQLSESSION 
#DEFINE WWC_SQLSESSION 			rfcSessionSQL

After all this moving around, the rfc3 app works fine, which is good as that means I haven't broken anything for my production environment. But when I attempt to make a process request to the REST app I get this:

When I had a single app, this prg was located in the rfc3\deploy folder with the rest of my app code. I've tried locating the session subclass in the classes folder. I've tried placing it in the r3common folder. I've tried messing with pathing on the #INCLUDE statements. So far no joy. Any thoughts or suggestions you might have on what I'm doing wrong will be much appreciated. (I'm ready to turn this into a full-blown support call if that will get me unblocked faster.)

Thanks!

Gravatar is a globally recognized avatar based on your email address. re: Fun (not) with wconnect_override.h
  Richard Kaye
  Richard Kaye
  Oct 27, 2023 @ 11:18am

The solution was explicitly adding my wwsession subclass to the procedure list. But only in the REST app so I don't understand... At least I can get on with the more interesting bits now.

Gravatar is a globally recognized avatar based on your email address. re: Fun (not) with wconnect_override.h
  Rick Strahl
  Richard Kaye
  Oct 28, 2023 @ 08:53am

You always need to make sure that all PRG files are loaded via SET PROCEDURE TO. This will ensure the file gets pulled into the project and... it will load when you run DO MyAppMain.prg.

It might have worked in your other project if you explicitly added the PRG file to the project and ran the EXE, otherwise it shouldn't.

+++ Rick ---

© 1996-2025