One Star

Can't return a tRESTResponse in required xml namespace format

I have 2 errors which relates to tRESTResponse_2 where I want to return a successful acknowledgment response to salesforce crm. the XML response must be in the form as shown below (centre image), but even if I import this file's schema into tXMLMap, as per lst  image, I get a 
"The XML response document I created doesn't like the namespace 
An error has occurred. See error log for more details.
Unknown java id type : 'soapenv'"
Which is not a runtime error, as the whole job works fine accept for the tRESTResponse_2 response which never gets returned, This job creates a number of csv log files which get populated as expected, but the tFileOutputXML_1 just creates following
<?xml version="1.0" encoding="ISO-8859-15"?>
<root>
</root>
And the return from the REST call is ' 404 Not Found'.
 
How do I create the response xml with the required namespacing and get the job to return the correct acknowledgement xml response instead of 404 error?
Can I place a 'tRESTClient' between the 'tRESTRequest' and it's corresponding tRESTResponse' or does this create a conflict?
Cheers,
Synfield
4 REPLIES
Employee

Re: Can't return a tRESTResponse in required xml namespace format

Hi
tRESTClient can be used in tRESTRequest jobs just fine. It is difficult to see where the problem related to tXMLMap producing XML is.
Can you try and isolate the problem by creating as simple a job as possible, where only a tREStRequest 2 line is executed ? Perhaps it can help - it might not be related to the use of TREST* components
Cheers, Sergey
One Star

Re: Can't return a tRESTResponse in required xml namespace format

Thanks Sergy, for your reply.
I've changed the workflow by placing the tRESTResponse part in the lst Job, as per attached screen shot, which works.
Could it be that the tRESTResponse must be in the same workflow subjob?
I fixed the namespacing error by referring to This forum post , which reckon's there's a bug in the schema import feature when importing namespacing, and although the import it works, it will give errors regarding the namespace prefix, this can be corrected by deleting each namespace in tXMLMap document type and typing each one in manually.


 
Employee

Re: Can't return a tRESTResponse in required xml namespace format

Hi, thanks for making it work. I'm not sure about any collocation requirements for tRESTResponse.
If your time allows: please consider creating two test jobs where the same expected invocation sequence works as in your last job but fails once tRESTResponse is not located in the same subjob and attach those to a TESB JIRA issue.
Perhaps there's a technical limitation requiring the collocation to make the data visible to tRESTResponse, but might be some bug lurking somewhere...
Cheers, Sergey
Employee

Re: Can't return a tRESTResponse in required xml namespace format

Out of interest: why did you not use the tSalesforce components and do the SOAP calls manually instead?
Thomas
Thomas Steinborn
VP Product Management