Hi Kesavan, Can you try adding [1] before sending. More info can be found in [2]
[1] <property name="POST_TO_URI" scope="axis2" value="true"/> [2] https://docs.wso2.com/display/ESB481/HTTP+Transport+Properties Ref Thread : [Dev] SlideShare connector - HTTP/1.1 301 Moved Permanently On Mon, Dec 8, 2014 at 7:08 PM, Kesavan Yogarajah <[email protected]> wrote: > Hi all, > I am developing ESB connector for Teamwork API.I am getting 302 Moved > Temporarily response mostly when I invoke all the POST and PUT methods via > ESB.I hardly get the 200 OK response.But I am able to get the response when > I directly invoked the same end point via the rest client.What could be the > problem? > > Wire log for the request: > > [2014-12-08 19:02:57,467] DEBUG - wire >> "POST /services/tw_createCompany > HTTP/1.1[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Host: > kesavan-thinkpad-t530:8280[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Connection: keep-alive[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Content-Length: 281[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Cache-Control: no-cache[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Origin: > chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "User-Agent: Mozilla/5.0 (X11; > Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 > Safari/537.36[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Content-Type: > application/json[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Accept: */*[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Accept-Encoding: gzip, > deflate[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Accept-Language: > en-US,en;q=0.8[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "Cookie: CFID=113072806; > CFTOKEN=ef035020859c7050-5CDE20A6-EA74-B6AF-528A24F79B2C2F1F; > AWSELB=1763BD4F1469E3CA629D18218E25AE8AE909B624ED95F7A6BFE9949BBD6B042188EE23392E553A7E17BA9DFBB8CE724829F6103A42AC8D1AA7D30FDF205849B095DEF1785E; > JSESSIONID=383081ac384d22ff425d243318a96062725e; > GOKEY-C=B0DC7825DD33DDCD72ABB7A28B5AD8ADTS1418044413[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "[\r][\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> "{[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "apiUrl":" > https://kesan.teamwork.com",[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "clientId":"cod323ipad",[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "name": "GK Company",[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "addressOne": "Address Line > 1",[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "addressTwo": "Address Line > 2",[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "zip": "",[\n]" > [2014-12-08 19:02:57,468] DEBUG - wire >> " "city": "City",[\n]" > [2014-12-08 19:02:57,469] DEBUG - wire >> " "state": "State",[\n]" > [2014-12-08 19:02:57,469] DEBUG - wire >> " "countryCode": "IE",[\n]" > [2014-12-08 19:02:57,469] DEBUG - wire >> " "phone": "",[\n]" > [2014-12-08 19:02:57,469] DEBUG - wire >> " "fax": "",[\n]" > [2014-12-08 19:02:57,469] DEBUG - wire >> " "website": ""[\n]" > [2014-12-08 19:02:57,469] DEBUG - wire >> "}" > [2014-12-08 19:02:58,455] DEBUG - wire << "POST /companies.json > HTTP/1.1[\r][\n]" > [2014-12-08 19:02:58,455] DEBUG - wire << "Accept-Language: > en-US,en;q=0.8[\r][\n]" > [2014-12-08 19:02:58,455] DEBUG - wire << "Cookie: CFID=113072806; > CFTOKEN=ef035020859c7050-5CDE20A6-EA74-B6AF-528A24F79B2C2F1F; > AWSELB=1763BD4F1469E3CA629D18218E25AE8AE909B624ED95F7A6BFE9949BBD6B042188EE23392E553A7E17BA9DFBB8CE724829F6103A42AC8D1AA7D30FDF205849B095DEF1785E; > JSESSIONID=383081ac384d22ff425d243318a96062725e; > GOKEY-C=B0DC7825DD33DDCD72ABB7A28B5AD8ADTS1418044413[\r][\n]" > [2014-12-08 19:02:58,456] DEBUG - wire << "Authorization: Basic > Y29kMzIzaXBhZA==[\r][\n]" > [2014-12-08 19:02:58,456] DEBUG - wire << "Host: kesan.teamwork.com > [\r][\n]" > [2014-12-08 19:02:58,456] DEBUG - wire << "Accept-Encoding: gzip, > deflate[\r][\n]" > [2014-12-08 19:02:58,456] DEBUG - wire << "Origin: > chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm[\r][\n]" > [2014-12-08 19:02:58,456] DEBUG - wire << "Content-Type: > application/json[\r][\n]" > [2014-12-08 19:02:58,457] DEBUG - wire << "Accept: */*[\r][\n]" > [2014-12-08 19:02:58,457] DEBUG - wire << "Cache-Control: no-cache[\r][\n]" > [2014-12-08 19:02:58,457] DEBUG - wire << "Transfer-Encoding: > chunked[\r][\n]" > [2014-12-08 19:02:58,457] DEBUG - wire << "Connection: Keep-Alive[\r][\n]" > [2014-12-08 19:02:58,457] DEBUG - wire << "User-Agent: > Synapse-PT-HttpComponents-NIO[\r][\n]" > [2014-12-08 19:02:58,458] DEBUG - wire << "[\r][\n]" > [2014-12-08 19:02:58,458] DEBUG - wire << "226[\r][\n]" > [2014-12-08 19:02:58,458] DEBUG - wire << "{[\n]" > [2014-12-08 19:02:58,459] DEBUG - wire << " "company": > {[\n]" > [2014-12-08 19:02:58,459] DEBUG - wire << " > "name": "GK Company",[\n]" > [2014-12-08 19:02:58,459] DEBUG - wire << " > "address_one": "Address Line 1",[\n]" > [2014-12-08 19:02:58,459] DEBUG - wire << " > "address_two": "Address Line 2",[\n]" > [2014-12-08 19:02:58,459] DEBUG - wire << " > "zip": "",[\n]" > [2014-12-08 19:02:58,459] DEBUG - wire << " > "city": "City",[\n]" > [2014-12-08 19:02:58,460] DEBUG - wire << " > "state": "State",[\n]" > [2014-12-08 19:02:58,460] DEBUG - wire << " > "countrycode": "IE",[\n]" > [2014-12-08 19:02:58,460] DEBUG - wire << " > "phone": "",[\n]" > [2014-12-08 19:02:58,460] DEBUG - wire << " > "fax": "",[\n]" > [2014-12-08 19:02:58,460] DEBUG - wire << " > "website": ""[\n]" > [2014-12-08 19:02:58,461] DEBUG - wire << " > }[\n]" > [2014-12-08 19:02:58,461] DEBUG - wire << " }[\r][\n]" > [2014-12-08 19:02:58,461] DEBUG - wire << "0[\r][\n]" > [2014-12-08 19:02:58,461] DEBUG - wire << "[\r][\n]" > [2014-12-08 19:02:58,769] DEBUG - wire >> "HTTP/1.1 302 Moved > Temporarily[\r][\n]" > [2014-12-08 19:02:58,769] DEBUG - wire >> "Cache-Control: > no-cache,private, must-revalidate, max-stale=0, post-check=0, > pre-check=0[\r][\n]" > [2014-12-08 19:02:58,770] DEBUG - wire >> "Content-Type: text/html; > charset=UTF-8[\r][\n]" > [2014-12-08 19:02:58,770] DEBUG - wire >> "Date: Mon, 08 Dec 2014 13:32:58 > GMT[\r][\n]" > [2014-12-08 19:02:58,770] DEBUG - wire >> "ETag: ""[\r][\n]" > [2014-12-08 19:02:58,770] DEBUG - wire >> "Location: > http://kesan.teamwork.com/[\r][\n]" > [2014-12-08 19:02:58,770] DEBUG - wire >> "P3P: CP="Teamwork does not have > a P3P policy"[\r][\n]" > [2014-12-08 19:02:58,771] DEBUG - wire >> "Pragma: no-cache[\r][\n]" > [2014-12-08 19:02:58,771] DEBUG - wire >> "twserver: webserver2[\r][\n]" > [2014-12-08 19:02:58,771] DEBUG - wire >> "Content-Length: 0[\r][\n]" > [2014-12-08 19:02:58,771] DEBUG - wire >> "Connection: keep-alive[\r][\n]" > [2014-12-08 19:02:58,771] DEBUG - wire >> "[\r][\n]" > [2014-12-08 19:02:58,778] DEBUG - wire << "HTTP/1.1 302 Moved > Temporarily[\r][\n]" > [2014-12-08 19:02:58,778] DEBUG - wire << "Location: > http://kesan.teamwork.com/[\r][\n]" > [2014-12-08 19:02:58,778] DEBUG - wire << "Content-Type: text/html; > charset=UTF-8[\r][\n]" > [2014-12-08 19:02:58,779] DEBUG - wire << "Pragma: no-cache[\r][\n]" > [2014-12-08 19:02:58,779] DEBUG - wire << "Cache-Control: > no-cache,private, must-revalidate, max-stale=0, post-check=0, > pre-check=0[\r][\n]" > [2014-12-08 19:02:58,779] DEBUG - wire << "Date: Mon, 08 Dec 2014 13:32:58 > GMT[\r][\n]" > [2014-12-08 19:02:58,779] DEBUG - wire << "Server: > WSO2-PassThrough-HTTP[\r][\n]" > [2014-12-08 19:02:58,779] DEBUG - wire << "Transfer-Encoding: > chunked[\r][\n]" > [2014-12-08 19:02:58,780] DEBUG - wire << "Connection: keep-alive[\r][\n]" > [2014-12-08 19:02:58,780] DEBUG - wire << "[\r][\n]" > [2014-12-08 19:02:58,780] DEBUG - wire << "0[\r][\n]" > [2014-12-08 19:02:58,781] DEBUG - wire << "[\r][\n]" > > > > Kesavan Yogarajah > Associate Software Engineer > WSO2 Inc. > > Mob: +94 779758021 > -- Best Regards, Malaka Silva Senior Tech Lead M: +94 777 219 791 Tel : 94 11 214 5345 Fax :94 11 2145300 Skype : malaka.sampath.silva LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 Blog : http://mrmalakasilva.blogspot.com/ WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/ http://www.wso2.com/about/team/malaka-silva/ <http://wso2.com/about/team/malaka-silva/> Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
