Referencing Document Elements from Adapter Service

I am relatively new to webMethods, started playing with it about a month ago. I have a test situation setup with 2 integration servers and a broker server.

Integration server A has a service that is watching a table in a DB for inserts, on insert some information is published to my broker and than Integration Server B is suppose to take that information and drop it into another database.

Everything seems to be working except I can’t figure out how the Adapter Service that will be doing the insert on Server B is suppose to reference the elements in the document. If I set the expression column to put in static data everything works fine. On IS B I keep getting the error message

[ADA.1.316] Cannot execute the SQL statement “INSERT INTO TESTMK.dbo.TestTable(keyVal, Value) VALUES (%AddNewMachine.Docs:NewMachineNotificationPublishDocument/agentGuidStr%, %AddNewMachine.Docs:NewMachineNotificationPublishDocument/displayName%)”. "

%AddNewMachine.Docs:NewMachineNotificationPublishDocument/agentGuidStr%, % is my attempt to reference the strings in the document.

Thanks in advance for your help :slight_smile:

If you are publishing the data from IS-1 to IS-2 then make a common document on both the packages thats nothing but the signature of the table. Once you get the payload from broker, you can map the payload this document and use it for insert adapter. You will have all the fields in that.

Cheers
Guna

I created a document on IS1, synced it to the broker, and then on IS2 created a new document (called Sub) and pulled the definition from the Broker.

I then create a new Flow service on IS2. And place the Input Adapter in that service. I set the Input of the flow service to be the document and then under pipeline map the fields from the document to the service in.

This is where I am getting stuck. I have tried just using a document reference in the pipeline instead of providing the Input Document but same issue.

[ADA.1.316] Cannot execute the SQL statement “INSERT INTO TESTMK.dbo.TestTable(keyVal, Value) VALUES (?, ?)”. "

I suppose you created a trigger on server-B and subscribed to the publishable document you created as explained above and invoking the service you mentioned. If not, pls do that.

In the service input, take the reference of the document you created and the name of the input should be fully qualified name of the document. So copy the document and then paste it while naming the input. Now map the values to the adapter service with this new document.

Use savePipeline and restorePipeline services of WmPublic to debug your implementation.

Cheers
Guna