cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML Query Connection Refused

Former Member
0 Likes
275

Hello everybody,

I have a strange problem with a XML Queries. I use it them a transaction to start/restart Jobs using the Illuminator Service. The configured URLs are


/XMII/Illuminator?service=Scheduler&mode=Enable&ID=[Param.1]&Content-Type=text/xml
/XMII/Illuminator?service=Scheduler&mode=Disable&ID=[Param.1]&Content-Type=text/xml

When I call the transaction from the workbench everything is fine. When I schedule this transaction as a job the XML queries make problems:

[1cbffa30-de35-11de-89e6-db130a0240b4][ERROR]: ACTION FAILED: End Action StartJobXMQ : (XML Query) Jazzey/SAPMII/Jobs/checkJobs

[Fatal Error] :-1:-1: Premature end of file.

Error Processing XMLQuery Connection refused

Any idea what I can do?

Kind Regards,

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Likes

While you are in the WB, MII and the TRX know who you are because of the user session, and the ability to run the XMLQuery template is cascaded as your specific user permissioning. When a scheduled job is run there is essentially no user, so in the specific case of the XMLQuery you may need to append IllumLoginName / IllumLoginPassword credentials to the URL (not knowing the specific details of what the URL contains of course).

Former Member
0 Likes

Jeremy,

thank you for your quick reply.

I've added the parameters to the url in the xml Query and now it works, but I'm not happy providing this information directly in the Query template. In the scheduler, there are input fields "user" and "password", is there a possibility to enter the login credentials there and map it into the XML Query?

Regards,

Matthias

jcgood25
Active Contributor
0 Likes

You can try but if I'm not mistaken the scheduler fields are more like 'Run As' settings, and the XML query is a bit different from other query template actions because the http qualifications.

You could add the credentials as inputs into your TRX and from the scheduled job pass them in (not great either).

Former Member
0 Likes

In situations like these I just create a dummy sap server config and store the user and pass there. In your blt you can use a jco action to get the stored user/pass and pass them on. This makes it easy to maintain the user/pass without having to edit the blt.

Former Member
0 Likes

Hi Christian,

I've implemented your trick using a dummy JCO Server. I use a SAP JCO Action Block and map the Server Name on Param.1, the user name on Param.2, the password on Param.3 and the JobID on Param.4 of the following URL in the XML Query:


[Param.1]/XMII/Illuminator?service=Scheduler&mode=Enable&ID=[Param.4]&Content-Type=text/xml&IlluminLoginName=[Param.2]&IlluminLoginPassword=[Param.3]

Again, running in the workbench everything works fine, but running as Job I get the following error:

Error Processing XMLQuery The markup in the document following the root element must be well-formed.

I do not get this error when I run the transaction in the workbench...

Any suggestions?

Regards,

Matthias

Former Member
0 Likes

What version are you on? If its 12.0+ I think you may need to use j_user and j_password.

jcgood25
Active Contributor
0 Likes

Try encoding the forward slash in your content type with %2F, but based upon the error message I assume you are getting the NW login screen as the html redirect because the pass through credentials are not working correctly. Try your full URL syntax (obviously with the Param.x substitutions already done) in a non-authenticated browser and see what you get. This should emulate the XMLQuery runtime execution when called through the scheduler.

Former Member
0 Likes

It works : )

I hat to use j_user and j_password for passing the login details.

Cheers,

Matthias

Answers (0)