Unofficial Content
  • This documentation is valid for:

This article describes how to maintain in your web application the general '/gxobject' entry point for compatibility reasons.

The way for sending blob data as input to a Rest procedure is documented at Sending blob data as input to the procedure. That method has been removed and replaced given Security improvements in upload mechanisms in  GeneXus 17 upgrade 4.

There is a workaround to keep compatibility with that behavior which is documented in this article.

Warning: Applying this workaround implies important security risks. Updating to the new mechanism included in GeneXus 17 upgrade 4 is recommended.

CASE 1: Your application has a web backend

Import this xpz. It contains a Web Panel with a File Upload control. That Web Panel provides the same functionality as the old /gxobject service, but on a different URL (= gxobjectwebpanel.link() + "/gxobject" instead of just "/gxobject"). Because of that, unless you can change the callers, a rule rewrite must be added. That rule is included for .NET and .NET CORE in the web.config files of that xpz. In the case of JAVA that rewrite rule must be manually added to web.xml with the following lines:

<servlet>
    <servlet-name>GXObjectUploadServices</servlet-name>
    <servlet-class>com.kbname.gxobjectwebpanel</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>GXObjectUploadServices</servlet-name>
    <url-pattern>/gxobject</url-pattern>
</servlet-mapping>

Where com.kbname must be replaced by the value of the Java package name property "(*)

CASE 2: Your application does not have a web backend, it is a Native Mobile application.

Import this xpz. It contains a rest procedure with an image as a parameter. It provides the same functionality as the old gxobject service, but on a different URL (= rest/gxobjectrest/gxobject instead of just /gxobject).

Because of that, unless you can change the callers, a rewrite rule must be added. That rule is included for .NET and .NET Core in the web.config files of that xpz. In the case of JAVA, that rewrite rule must be manually added to the rewrite.config file to redirect /gxobject pattern URL to rest/gxobjectrest/gxobject

(*)

In the case of JAVA there is another workaround that does not require importing the xpz, just add the following lines to web.xml:

 

<servlet>
    <servlet-name>GXObjectUploadServices</servlet-name>
    <servlet-class>com.genexus.webpanels.GXObjectUploadServices</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>GXObjectUploadServices</servlet-name>
    <url-pattern>/gxobject</url-pattern>
</servlet-mapping>

 

A disadvantage of this one is that it is not possible to configure GAM security aspects to the GXObjectUploadServices service.

 

 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant