Cannot update a record in Tamino using SagHttpGateway?

Hi, currently I’m doing a sample demo using Mediator for a customer in Singapore. I’m using the SagHttpGateway component to update a particular record in Tamino. It seems that this particular component gives me an error. My incoming payload consist of an xml document with the ino:id specified, but I can’t seem to update the record.

If I remove the SagHttpGateway, then the whole sequence runs fine… Below is my sequence.

=========================================






































===============================================

Tamino returns two different HTTP response codes for PUT requests:
201 - new object created
204 - existing object replaced

The “problem” with using PUT with the HTTPGateway in Mediator is that anything but HTTP repsonse 200 is treated as an error.
With Mediator version 7.2.1.5, you now have the option of trapping the HTTP response code without having Mediator throw an error.
To do this, you need to set the following property for the HTTPGateway:

xbd.http.acceptError = “yes”

But this now means that your Mediator sequence must handle all possible HTTP errors (e.g. if you misspell the Tamino database name, you will get HTTP 502 response code).
You can easily do this using a switch or if statement immediately after the HTTPGateway.

Keep in mind that Mediator version 7.3 will give us several new Tamino components, which should make using HTTPGateway to access Tamino unnecessary.

regards,
- arp

Hi arp. Thxs for the tip. Now I have a much better understanding on why my sequence not working as I expected.

Yep, now the record is updated correctly, though it will throw an error, like wat u said. Thus any components after the saghttpgateway in the sequence will not work. So, to solve my problem, I add the remaining components, ie
========================




=================================
in the sequence where the on_error will call. Now it works fine.

If you use the acceptError property for the SagHTTPGateway, your sequence WILL continue to execute as normal no matter what response is received by the SagHTTPGateway. No on_error sequence will be invoked.
Instead you need to rely on your sequence to evaluate the xbd.http.responseCode property produced by the SagHTTPGateway and decide how to proceed.
If the SagHTTPGateway did not receive anything due to an error, the payload given to the SagHTTPGateway will be returned as the current payload. If the payload given to the SagHTTPGateway is not XML (e.g. multipart payload), then Mediator will throw an error at the component following the SagHTTPGateway, as your current payload will not be well-formed XML.

regards,
- arp

Currently, the version of mediator that I had is 7.2.1, and there seems to be no “xbd.http.acceptError” property. Thus hadda continue the remainder of my sequence( after the httpgateway ) in the on_error sequence. Is there a patch to v7.2.1.5 from v7.2.1?? May I know where to get this patch?

you’ll need to contact your local office. 7.2.1.5 is a new installation, not a patch.

The public website seems to have an up to date version for download (7.2.1.8). This public version is only a limited trial(30 days).