cancel
Showing results for 
Search instead for 
Did you mean: 

MII transaction call using HTTP GET/POST from a web application

Former Member
0 Kudos

Hi all,

and a happy new year to all!

We would like to call a XMII transaction using HTTP GET/POST in a custom web application, so that the user doesn't notice that a XMII transaction is called in the background. The XMII transaction makes a SQL query (via UDS/OLEDB) and returns some data. We're on MII 12.0.1 Build(75).

When we call this transaction in the browser

(http://devsapnw:50000/XMII/Runner?Transaction=XA-PP/XA_SQL_PP_1&OutputParameter=XA_OUTPUT_XML&Content-Type=text/xml&j_user=<theuser>&j_password=<thepassword>), everything is fine. We see the XML result document.

When we try to call this transaction in our web application, the transaction starts and ends, but unfortunately the Success parameter of the SQL Query returns 0 (Zero). It seems that the SQL Query action block in the transaction cannot be executed - maybe a security issue. We write some files to the harddisk for error and debugging purposes in the transaction, this works well. We checked the data security and system security settings in the XMII menue and in the transaction/templates itselfs, but everything seems to be OK.

Does anybody know what we have missed?

Thanks in advance and best wishes!!

JF

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

How are you authenticating with the MII server from within your web application? You either need to obtain and pass a cookie/ticket or pass credentials in the URL line.

Are you certain that the transaction actually runs? If so, you probably are OK in terms of authentication, unless the roles assigned to the SQL data server are not configured properly for the user ID you're using from within your web application.

Former Member
0 Kudos

Hello there,

and many thanks for your answers!!!!

Maybe it is really an issue or a bug in the MII version we use, because the authentication works (credentials in the URL, please see my initial post).

The transactions starts. We have two file I/O action blocks in the transaction (at the begin and at the end of the transaction) to write so log data, this works perfectly.

Basically the transaction looks like this:


TRANSACTION: "XA_SQL_PP_1"

+---------------------+
| file I/O sequence 1 |
|                     |
+---------------------+
           |
           |
+---------------------+
| SQL query sequ. 1   |
|                     |           
+---------------------+      
           |
           |      
+---------------------+   
| file I/O sequence 2 |
|                     |
+---------------------+ 

We can call this transaction in the workbench and in the browser (with the URL mentioned in my initial post).

http://devsapnw:50000/XMII/Runner?Transaction=XA-PP/XA_SQL_PP_1&
OutputParameter=XA_OUTPUT_XML&Content-Type=text/xml&j_user=
**theuser**&j_password=**thepassword**

The SQL query itself uses an OLD DB connection to a remote SQL database host. This works. We see the results in the workbench and in the browser (using the URL above).

We try to update to the newest MII version. This will take some time. Let's see whether this will solve our problems.

Best wishes,

JF

Former Member
0 Kudos

Hi, Jochen.

I was referring to how your web application authenticates with MII. From within the workbench or a browser (as long as you had already logged in), the URL will work because the necessary authentication to the MII back-end will have already happened. However, I'm not clear as to how your web application is passing MII credentials (j_user and j_password are not the MII credentials).

Rick

Answers (1)

Answers (1)

jcgood25
Active Contributor
0 Kudos

12.0.2 was the actual GA release version, so I would highly recommend updating to the newest SP06 (keep in mind that your NetWeaver instance will also need to be patched up to at least SP14). Refer to the notes and guides for details, since you will also need to remove the O/S dependant JCO libraries.

Regards,

Jeremy