Remote access to JChemWebService

User 9419fb0fd8

16-01-2012 08:10:09

I have a JChemWebService(port 8180) installed and it's working perfectly.


Now i am trying to use the examples  with another tomcat server in the same machine(port 8080) but it just dont work.


After tracing the program(js_examples/relational/*.*), I found that it hanged with "xhr.send(content);" around line 221 in SOAP.js. It occured when it request a remote target url ike "http://localhost:8180/axis2/services/ConnectionWS?wsdl"


Do you have any suggestion or solution?


Thx a lot.

User c1ce6b3d19

16-01-2012 23:18:20

I want to confirm the environment setup when the problem occurs.  


The JChem Web Services Tomcat server is running on the 8180 port.  There is a second tomcat server also running at the same time, but on port 8080.  You have copied over the files from <jchem_ws_server_tomcat_dir>/webapps/ROOT/js_examples/relational/ to


<the_other_server_tomcat_dir>/webapps/ROOT/js_examples/relational/  ?


 


Jon

User 9419fb0fd8

17-01-2012 01:49:50










jlee wrote:

I want to confirm the environment setup when the problem occurs.  


The JChem Web Services Tomcat server is running on the 8180 port.  There is a second tomcat server also running at the same time, but on port 8080.  You have copied over the files from <jchem_ws_server_tomcat_dir>/webapps/ROOT/js_examples/relational/ to


<the_other_server_tomcat_dir>/webapps/ROOT/js_examples/relational/  ?


 


Jon



Yes, and I have copid all the  ajax, marvin,  js_examples  and WEB-INF folders to  a new tomcat server(port 8080).


 


 

User c1ce6b3d19

18-01-2012 11:15:20

Hi,


Can you send any error logs or useful output? 


Perhaps setting up the SOAP monitor might be useful


http://www.chemaxon.com/webservices/FAQ.html#soapmonitor


 


Jon

User c1ce6b3d19

18-01-2012 16:51:34

From the description you have confirmed, most likely the problem is that you are trying to run a javascript from one port to a web service at another.  This will fail the "Same origin policy" followed by JavaScript and AJAX (using the XMLHttpRequest (aka XHR) object). 


There may be cross-domain solutions (hacks?) that circumvent the policy. 


Sorry, but we don't support the extension of the examples, but leave it up to you to make your own solutions or clients of the web services. 


 


Jon Lee