Bob,
The Java plug-in I am using was written for our application.
The rule in the process looks like this:
Parameter.results=EditJavaPlusinName(BO.AtrributeString)
The attributestring parameter has the formatted XML in it. We use another function of the plug-in called GetJavapluginName(DocumentString) which returns a list of documents and writes them to the DB.
In this string all the values are fixed and we don't need to insert any values in the XML so this works fine.
This issue I am having is I need to pass a values in the XML and I am not sure how to get it into the XML.
Here is what the XML Looks like:
<?xml version="1.0" encoding="UTF-8" ?>
<request>
<url>https://api-app.xtracta.com/v1/documents/update</url>
<companyid>123456</companyid>
<params>
<param name="api_key" value="123456789nbhguthfj"/>
<param name="document_id" value="435" />
<param name="api_download_status" value="archived" />
</params>
</request>
The value I need to put into the XML is the document_Id. this call will set this document to a status of "archived" so it will not be downloaded again.
I was hoping I could just add the Tag <<InvoiceHdr.DocumentId>> to the XML string and have AwareIM translate it for me, but the result is empty and I get this error
"Internal error. The root element is required in a well-formed document."
Even if I hard code the documentId I still get the error nothing is returned. I tried use Fiddler to test this but I get back a 401 error in Fiddler.
With the Tag in the XML it looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<request>
<url>https://api-app.xtracta.com/v1/documents/update</url>
<companyid>123456</companyid>
<params>
<param name="api_key" value="123456789nbhguthfj"/>
<param name="document_id" value="<<InvoiceHdr.DocumentId>>" />
<param name="api_download_status" value="archived" />
</params>
</request>
So again the rule looks like this and the string contains the formatted XML:
Parameter.results=EditJavaPlusinName(BO.AtrributeString)
If I try to build the string in the process before the Call and update an attribute string from LIRU I get syntax errors from Aware. You cannot use " double quote and have to replace them with `
if try to put quotes ' ' around the XML I get a syntax error from Aware....
Any Idea's???