Hi all,
I am getting 301 permanently moved error when I invoked the api endpoint
through esb. But
I am able to get the response when I directly invoked the same end point
via the rest client.

The cofig url :
https://www.eventbriteapi.com/v3/events/13981437857/discounts/?token=HSX6X635TURH32K5CLMV
<https://www.google.com/url?q=https%3A%2F%2Fwww.eventbriteapi.com%2Fv3%2Fevents%2F13981437857%2Fdiscounts%2F%3Ftoken%3DHSX6X635TURH32K5CLMV&sa=D&sntz=1&usg=AFQjCNFPMy3S6XxPzlrLkDs8vC4SmbuEsQ>

and the payload :
{
"discount.code": "133744467",
"discount.percent_off": "1"
}

I marked the end point to which the request is redirected. But the
redirected url is not working through the rest client also. It gives 500
internal server error.

Wire log for the error:

 [2014-12-08 14:49:51,508] DEBUG - wire >> "POST
/services/createEventDiscount HTTP/1.1[\r][\n]"

[2014-12-08 14:49:51,508] DEBUG - wire >> "Host:
elil-macbook-pro.local:8280[\r][\n]"

[2014-12-08 14:49:51,508] DEBUG - wire >> "Connection: keep-alive[\r][\n]"

[2014-12-08 14:49:51,508] DEBUG - wire >> "Content-Length: 71[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Cache-Control: no-cache[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "User-Agent: Mozilla/5.0
(Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/39.0.2171.71 Safari/537.36[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Content-Type:
application/json[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Accept: */*[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Accept-Encoding: gzip,
deflate[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Accept-Language:
en-US,en;q=0.8[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "Cookie: SERVERID=djc19[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "[\r][\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "{[\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "  "eventId":"13981437857",[\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "  "code":"133744467",[\n]"

[2014-12-08 14:49:51,509] DEBUG - wire >> "  "percentOff":"1"[\n]"

[2014-12-08 14:49:51,510] DEBUG - wire >> "}"

[2014-12-08 14:49:53,085] DEBUG - wire << "POST
https://www.eventbriteapi.com/v3/events/13981437857/discounts?token=HSX6X635TURH32K5CLMV
 HTTP/1.0[\r][\n]"

[2014-12-08 14:49:53,085] DEBUG - wire << "Accept-Language:
en-US,en;q=0.8[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Cookie: SERVERID=djc19[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Accept-Encoding: gzip,
deflate[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Origin:
chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Content-Type:
application/x-www-form-urlencoded[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Accept: */*[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Cache-Control: no-cache[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Content-Length: 46[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Host: www.eventbriteapi.com:80
[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "User-Agent:
Synapse-PT-HttpComponents-NIO[\r][\n]"

[2014-12-08 14:49:53,086] DEBUG - wire << "[\r][\n]"

[2014-12-08 14:49:53,087] DEBUG - wire <<
"discount.code=133744467&discount.percent_off=1"

[2014-12-08 14:49:54,097] DEBUG - wire >> "HTTP/1.1 301 MOVED PERMANENTLY
[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "Server: nginx[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "Date: Mon, 08 Dec 2014 09:17:18
GMT[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "Content-Type: text/html;
charset=utf-8[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "Connection: close[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "x-xss-protection: 1;
mode=block[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "x-content-type-options:
nosniff[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "Location:
https://www.eventbriteapi.com:80/v3/events/13981437857/discounts/?token=HSX6X635TURH32K5CLMV
[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "X-Frame-Options:
SAMEORIGIN[\r][\n]"

[2014-12-08 14:49:54,098] DEBUG - wire >> "P3P: CP="NOI ADM DEV PSAi COM
NAV OUR OTRo STP IND DEM"[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "X-UA-Compatible: IE=edge[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "Set-Cookie:
SS=AE3DLHQcZVStvxCOwJE-5xpdFqeP8lfgxw; Domain=.eventbriteapi.com:80
<http://eventbriteapi.com/>; httponly; Path=/; secure[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "Set-Cookie: mgref=typeins;
Domain=.eventbriteapi.com:80 <http://eventbriteapi.com/>; expires=Tue,
08-Dec-2015 09:17:17 GMT; httponly; Max-Age=31536000; Path=/[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "Set-Cookie: mgrefby=; Domain=.
eventbriteapi.com:80 <http://eventbriteapi.com/>; expires=Tue, 08-Dec-2015
09:17:17 GMT; httponly; Max-Age=31536000; Path=/[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "Set-Cookie:
SP=AGQgbbl_C3YTaVUC9tSbn-CtVKPP9-x5x4Tv2EUGDAmujG9qtuXuzWOimCM20fzpNnuBHGZpghhla-5OiEBPdZbLyd0OH7PfOFjisPfhqlZcnNlAXsEd-wH3ERHrG4GxXBV_U4L8fyBKpuqTL-EocxDoYjgBQhWKTmxHgWSZIcoc9gMNVs2IZ3N8p-fQRcJ5krlBs-fwo5IWWXuAYr-l-OFT3cAHbH9QlPOY0rXUK4kJWx3BE0VYj5c;
Domain=.eventbriteapi.com:80 <http://eventbriteapi.com/>; httponly;
Path=/[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "Set-Cookie: AN=; expires=Thu,
01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/[\r][\n]"

[2014-12-08 14:49:54,099] DEBUG - wire >> "[\r][\n]"

[2014-12-08 14:49:54,369] ERROR - RelayUtils Error while building
Passthrough stream

org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException:
ParseError at [row,col]:[1,1]

Message: Premature end of file.

What could be the reason for this issue.

Thank you,

-- 
*S.Elilmatha*
Associate  Software Engineer,

WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

Mobile 0779842221.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to