after migrating restfull application 1 machine machine able acess type methods unable access post type methods. using tomcat 6.0.36.please on this. please find code using.
import javax.ws.rs.*; import javax.ws.rs.core.mediatype; import org.jboss.resteasy.annotations.responseobject; import org.json.jsonobject; import com.clients.mobileapiclient; @path("/mobileappfnolapi") public class mobileappfnolapi { @get @path("/getclaims") public jsonobject getclaims( @queryparam("input") string input) { string getclaims = null; jsonobject jsonobject = null; system.out.println("inside getclaims()"+input); mobileapiclient mobileapiclient = new mobileapiclient(); try { getclaims = mobileapiclient.callpersonalapi().getclaims(input); system.out.println(getclaims); jsonobject = new jsonobject(getclaims); } catch (exception e) { // todo auto-generated catch block e.printstacktrace(); } return jsonobject; } @get @path("/getclaimstatus") public jsonobject getclaimstatus( @queryparam("input") string input) { system.out.println("inside getclaimstatus()"+input); string claimstatus = null; jsonobject jsonobject = null; // write business logic , return output mobileapiclient mobileapiclient = new mobileapiclient(); try { claimstatus = mobileapiclient.callpersonalapi().getclaimstatus(input); jsonobject = new jsonobject(claimstatus); system.out.println(claimstatus); } catch (exception e) { // todo auto-generated catch block e.printstacktrace(); } return jsonobject; } @post @path("/saveportalclaim/{xmlinput}") public jsonobject saveportalclaim (@pathparam("xmlinput") string xmlinput) { string saveclaimstatus = null; jsonobject jsonobject = null; system.out.println("inside saveportalclaim() "+xmlinput); mobileapiclient mobileapiclient = new mobileapiclient(); try { saveclaimstatus = mobileapiclient.callpersonalapi().saveportalclaim(xmlinput); jsonobject = new jsonobject(saveclaimstatus); system.out.println(saveclaimstatus); } catch (exception e) { // todo auto-generated catch block e.printstacktrace(); } // write business logic , return output return jsonobject; } @get @path("/doespolicyexists") public jsonobject doespolicyexists(@queryparam("policynumber") string policynumber,@queryparam("password") string password) { system.out.println("inside doespolicyexists()"+policynumber); system.out.println("inside doespolicyexists()"+password); //string policynumber = null jsonobject jsonobject = null; // write business logic , return output mobileapiclient mobileapiclient = new mobileapiclient(); try { system.out.println("startinggggggggggggggggggggggggggggggggggggggggg"); string policyresult = mobileapiclient.callpersonalapi().doespolicyexists(policynumber, password); system.out.println("policyresult--------------------------->"+policyresult); jsonobject = new jsonobject(policyresult); } catch (exception e) { // todo auto-generated catch block e.printstacktrace(); } return jsonobject; }}
it that, on 1 machine have got http verb post enabled not on machine not working.
worth checking tomcat web server configuration between machines.
Comments
Post a Comment