Show
Ignore:
Timestamp:
01/07/09 11:50:14 (3 years ago)
Author:
mtld
Message:

non-jvmroute session id and arbitrary context path support for JSON webservices

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pfixcore/projects/core/script/webservice_json.js

    r3897 r3970  
    107107pfx.ws.json.BaseStub.prototype.getURI=function() { 
    108108   if(this._uri==null) { 
    109       var session=window.location.href.match(/;jsessionid=[A-Z0-9]+\.[a-zA-Z0-9]+/); 
    110       this._uri=window.location.protocol+"//"+window.location.host+this._requestPath+"/"+this._service+session; 
     109      var session=window.location.href.match(/;jsessionid=[A-Z0-9]+(\.[a-zA-Z0-9]+)?/)[0]; 
     110      var reqpath=window.location.pathname; 
     111      var pcs=reqpath.split('/'); 
     112      pcs=pcs.slice(1,pcs.length-3); 
     113      reqpath=""; 
     114      for (var i=0;i<pcs.length;i++) reqpath+="/"+pcs[i]; 
     115      reqpath=reqpath+this._requestPath+"/"+this._service; 
     116      this._uri=window.location.protocol+"//"+window.location.host+reqpath+session; 
    111117   } 
    112118   return this._uri;