How to use php call ajax Project

User ec4ea2cf9b

14-12-2009 08:34:50

Hi!


I want to do a php project, so that php call ajax display.


<db>
 <username>root</username>
 <password></password>
 <driver>com.mysql.jdbc.Driver</driver>
 <url>jdbc:mysql://localhost:3306/jchem</url>
 <propertyTable>JChemProperties</propertyTable>
</db>
<marvinPath>/marvin</marvinPath>
<jspPath>
 <getimage>/ajax/jsp/img.jsp</getimage>
 <export>/ajax/jsp/export.jsp</export>
</jspPath>
<soapPath>
 <tabledata>/axis2/services/JChemSearchWS</tabledata>
 <complete>/axis2/services/JChemSearchWS</complete>
 <getmoldata>/axis2/services/JChemSearchWS</getmoldata>
 <insert>/axis2/services/JChemSearchWS</insert>
 <edit>/axis2/services/JChemSearchWS</edit>
 <remove>/axis2/services/JChemSearchWS</remove>
 <export>/axis2/services/JChemSearchWS</export>
 <info>/axis2/services/JChemSearchWS</info>
</soapPath>


I want to use mysql database.Should I ask how to configure?


<tabledata>/axis2/services/JChemSearchWS</tabledata>What is the path of this path?How should I call ?


thinks,

ChemAxon ebbce65bcf

14-12-2009 09:45:50

Hi,


For me your post is a little bit ambiguous. So I assume you have downloaded the web service package and started up the web services successfully. Then you should check whether the Ajax example is working or not on port 8180 requesting http://localhost:8180/ajax/ . Does it work or do you have other configuration? Your config parameters seem to be good if you have a Mysql listening on localhost on port 3306, and you have a JChem database named 'jchem' in it. About PHP... Personally I use a different Apache web server for PHPs, which is listening on port 80 but as I see it is possible to execute PHP scripts on Tomcat. If you are using a different webroot for PHPs like me, you should copy the Ajax directory from Tomcat webroot to PHP webroot (ajax/jsp directory is not necessary). Assuming that your webservices are running on http://localhost:8180 you should modify every relative path (marvinPath, jspPath, soapPath) of your configuration file in the PHP webroot this way: 


marvinPath:   /marvin => http://localhost:8180/marvin


getimage:   /ajax/jsp/img.jsp => http://localhost:8180/ajax/jsp/img.jsp


...


info:   /axis2/services/JChemSearchWS => http://localhost:8180/axis2/services/JChemSearchWS


Of course if you are using different domain or different port you have to type those. Then you can rename the index.html file to index.php in the PHP webroot and you can insert PHP scripts there. If I understand well, this is what you intended to do...


Cheers,


Roland

User ec4ea2cf9b

15-12-2009 01:05:03

But my JChemWebServices bag inside this folder is not axis2/services/JChemSearchWS how to do this

ChemAxon ebbce65bcf

15-12-2009 11:02:09

Please, read the manual:


http://www.chemaxon.com/webservices/adminGuide.html


After a successful WS startup you should open a browser and type: 


http://localhost:8180/axis2/services/listServices


Does it work? There you can find JChemSearchWS and other web services.


Roland