Response code from HTTP gateway and posting to Tamino

I’m trying to store an XML document in Tamino by using the HTTP gateway but it doesn’t seem to work. I’ve tried leaving out the ?_process as well but get the same result.

My sequence does not give an error although the response code from the gateway is 400. Surely this can’t be right. My question is, how do I make Mediator give an error or how do I look for the response code in my sequence and act accordingly.

Here are my log entries
2003-03-13 10:32:42,269 Thread-10 INFO xbd - SagHttpGateway - modify: … enter …
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - HTTP Method: PUT
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - key: xbd.original.message.id
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - key: XBR_AggregatorProxy
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - key: xbridge.replyto.sink
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - key: xbd.sequence.stack
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - key: xbd.aggregator.document.id
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - key: xbd.http.target.url
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - destination: http://localhost/tamino/Vodacom/PICAAC?_process
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - contextURL: http://localhost:8080/mediator/test/data/VodacomSequence.xml
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - URL: http://localhost/tamino/Vodacom/PICAAC?_process
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - HttpURLConnection …
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - Ready to set Request Header
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - httpSend: … start …
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - httpSend: content-type: text/xml
2003-03-13 10:32:42,279 Thread-10 DEBUG xbd - SagHttpGateway - httpSend: content-length: 3470
2003-03-13 10:32:42,299 Thread-10 DEBUG xbd - SagHttpGateway - httpSend: ResponseCode: 400
2003-03-13 10:32:42,299 Thread-10 DEBUG xbd - SagHttpGateway - httpSend: … done …
2003-03-13 10:32:42,299 Thread-10 DEBUG xbd - SagHttpGateway - modify: … done …

If you simply wish to store XML documents into Tamino (i.e. not updating them) I would suggest using the SagTaminoLogger with xbd.taminoLogger.logPayload =“true” and xbd.taminoLogger.logProperties =“false”. The SagTaminoLogger takes the current payload and stores it.

An alternative is to use HTTP with xbd.http.method = “PUT” and simply ‘post’ the payload (the xml) but the issue there is that it is not possible to detect errors other than HTTP general errors. At least the SagTaminoLogger performs error checking.

If you need to do anything more sophisticated including updating then I would suggest putting together a simple servlet and calling it using the SagHttpGateway.

One final approach I have not explorered is to utilize the Tamino SOAP API.

Hope this helps.

Stuart Fyffe-Collins
Software AG (UK) Ltd.