Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

QueryMultipleRowsAsXML question

Avatar

Level 4
If you have a form, where the fields are properly mapped to a schema, and you use the QueryForMultipleRowsAsXml service (with an xml variable that is OUTPUT), is the data from the xml variable dynamically merged with the form fields?
18 Replies

Avatar

Level 10
The xml generated by QueryForMultipleRowsAsXml would have to follow your schema if you want the data to merge with the field.



Jasmin

Avatar

Level 4
OK, I'm taking baby steps with this QueryMultipleAsXml thing...



I am receiving the error



Render processes is reader extended - rendering properly

Form displays properly



Clicking the invoke button to (try and) display records in the form causes this error:

2009-03-04 09:38:15,538 ERROR [com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker] An exception was thrown with name com.adobe.idp.dsc.DSCException message:No Credential or Context set while invoking service JdbcService and operation queryMultipleToXml and no fault routes were found to be configured.



The render service, the short lived query service, and the service to display the form all have security turned OFF.



When I use the "test" button inside the querymultiple service, rows are returned, so the data source is configured properly.



Thanks for any help you can provide,

Elaine

Avatar

Level 10
Did you also turn security off on the JDBC service and all other services within the render service (even setValue).



You could also use the Run As instead. That way you don't have to disable security on every single service within your render process.



Jasmin

Avatar

Former Community Member

Hi Jasmin,

I have two PCs, onewas installed with Acrobat Pro 8.2.1 and the other one with 9.3.1. I have a form with the web service and it works fine on the PC with 9.3.1 installed but not on the one with 8.2.1. Every time I run the form, I get the same error like Elaine had. I compared all the setting for the 2 PCs and could not find any thing different so I could not tell why it is not working on one PC but not the other. I even tested on other user PC with 8.2.1 install and get the same error. Do you have any idea about this issue? Can you help on this?


Thanks in advance,

Han Dao

Avatar

Former Community Member

Thanks for your quick reply, Jasmin. It does work for the web service that connect to the external dabase but not for the one from LC database. I even added "All principal" to it but it still just work for one with 9.3.1 not for the one with 8.2.1. Note that RE is also applied to the form.

Thanks,

Han Dao

Avatar

Level 10

"It does work for the web service that connect to the external database but not for the one from LC database"

I'm not sure I get that part.

Are you saying one web service work and the other one doesn't?

Sorry I'm just getting confused.

Jasmin

Avatar

Former Community Member

Jasmin, sorry for the confusion.

Let me explain a little bit more. My form actually has 2 web services that created in workbench ES. One is queried thru the external data source (not LiveCycle tables) and the other one is queried thru edcprincipaluserentity (LiveCycle table) which is still not working regardless of the disable of security. It just work on the PC that has Acrobat Professional 9.1.3 but not on the one has 8.2.1 note that both of PCs do have a newest version of Reader.

Thanks,

Han Dao

Avatar

Level 10

Ok, I'm getting there. Let me summarize.

So you have two web services that you created with LiveCycle Workbench. One of them queries an external database and the other on queries the Adobe internal database, right?

Now, you are trying to invoke these two web services from within a PDF in two different environments:

- First environment has Acrobat 9.1.3 and the latest version of Reader.

- Second environment has Acrobat 8.2.1 but also has the latest version of Reader.

In the first environment (9.1.3) both web services work.

In the second environment (8.2.1) , I don't think they work properly.

You have removed security and set the Run As-> System on both web services.

You've enabled record and playback on both web services to make sure they are being called and complete properly.


There is no error in the server.log file.

Let me know if this is accurate.

Jasmin

Avatar

Former Community Member

Yes, your summary is accurate.

The  2 errors below does show whenever the form runs on the second environment with Pro 8.2.1 and latest Reader.

"[3/19/10 13:54:08:975 CDT] 00000029 WorkflowDSCIn E com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker logFailedFaultRouting An exception was thrown with name com.adobe.idp.dsc.DSCException message:No Credential or Context set while invoking service SetValue and operation execute and no fault routes were found to be configured."

and

"[3/19/10 14:41:02:264 CDT] 00000052 WorkflowDSCIn E com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker logFailedFaultRouting An exception was thrown with name com.adobe.idp.dsc.DSCException message:No Credential or Context set while invoking service JdbcService and operation querySingle and no fault routes were found to be configured."

Thanks Jasmin.

Han Dao

Avatar

Level 10

Ok this is really strange!

As a test, can you explicitly remove the security on the SetValue and JDBC service in adminui?

Jasmin

Avatar

Former Community Member

Hi Jasmin,

Since that web service does have LDAP service include so I removed its security in the AdminUI as well and it works fine!

I talked to other friend at a different company and they surprised too that I have to remove the security for those services. I think it is just temporary to fix right now but later if we have a new web service that use one of those service with the security then the web service above will be broken again.

It is really strange and I am wonder if it is a bug or not. Here is our server environment is LC ES 8.2.1 with SP3, QF 3.06, 3.12, and 3.19 on Windows Server 2003.

If you have any update on fixing it, please post as well.


Thank you and Have a Nice Weekend!

Han Dao

Avatar

Level 10

I'm suprised too.

This is for this reason that we implemented the Run As functionality. This Run As should run all the different services under a specific account so you don't have to remove security.

Maybe check with support.

Jasmin

Avatar

Level 4
Here is the issue I am having. The schema has three nodes (let's say root, customers, customer). Inside the customer node is last,first,phone.<br /><br />So the schema looks like this:<br /><br /><?xml version="1.0" encoding="utf-8"?><br /><!-- Created with Liquid XML Studio 1.0.8.0 (http://www.liquid-technologies.com) --><br /><xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"><br /> <xs:element name="root"><br /> <xs:complexType><br /> <xs:sequence><br /> <xs:element name="customers"><br /> <xs:complexType><br /> <xs:sequence><br /> <xs:element maxOccurs="unbounded" name="customer"><br /> <xs:complexType><br /> <xs:sequence><br /> <xs:element name="lastName" /><br /> <xs:element name="firstName" /><br /> <xs:element name="phone" /><br /> </xs:sequence><br /> </xs:complexType><br /> </xs:element><br /> </xs:sequence><br /> </xs:complexType><br /> </xs:element><br /> </xs:sequence><br /> </xs:complexType><br /> </xs:element><br /></xs:schema><br /><br />The QueryForMultiple service only returns two nodes in the xml structure (customers, customer), because you can only specify the root and repeating element name. nd is stored in an xml output variable called "customerData".<br /><br />So the variable contains data that looks like this (note no "root" node).<br /><br /><customers><br /> <customer><br /> <lastName type="VARCHAR">SCHMITZ</lastName><br /> <firstName type="VARCHAR">AMAL</firstName><br /> <phone type="VARCHAR">123456789</phone><br /> </customer><br /> <customer><br /> <lastName type="VARCHAR">DOGGY</lastName><br /> <firstName type="VARCHAR">BUDDY</firstName><br /> <phone type="VARCHAR">222222222</phone><br /> </customer><br /></customers><br /><br />I've walked through record/playback and the variable holds the xml properly.<br /><br />How to get the data to map back to a dynamic table that has a repeatable row with fields last, first, phone?

Avatar

Level 10
So if I understand properly, you're just missing the extra Root node.



What you could do is just create that extra node using xPath and set its content to the value returned by QueryForMultiple. For example



/process_data/myNewXML/Root = /process_data/xmlFromDB



In this case the Root node would be create in the empty myNewXML and the content of xmlFromDB (which contains your xml) would be added under the Root node.



Am I understanding the problem correctly.



Let me know,



Jasmin

Avatar

Level 4
Thanks Jasmine, progress! Now when I record / playback, the xml variable looks exactly like my schema def. So the data in the xml variable is now:




Smith
Tom
1234567890


Smith
Tom
1234567890




This variable is set as output from the process. I activate the process and add the data connection wsdl url to my form, and the data connection looks like this:

CustomerInfoQueryTableDC
invoke Request
Message Body
invoke (note there are no inputs to the process)
invoke Response
Message Body
invokeResponse
customerData
document
element

I have a table on the form that is bound to "customers" in the schema ($.customers) .
I have a repeating row in the table that is bound to "customer" in the schema ($.customer[*])
Each field in the repeating row, lastName, firstName, and phone, are bound to $.lastName, $.firstName, $.phone


What's my next step to get the data in the xml mapped to the form?
Thanks in advance,
Elaine