[PHP] SOAP Tool Kit for PHP | Solved | PHP-Tomcat-Apache HOWTO
Hello, A bit of background. I work at a company that has a web-based staffing software (jobs, candidates, you get the idea). We are about 5 developers (close to 15 w/ all other projects). Jobs and candidates are a perfect example of where XML and web-services are applicable. Use our software and post your job to monster, or any staffing agency w/ a compliant web service listener. Later receive a candiate response via the same protocol (defined by XML.org or whomever). Anyway, I figured out an apache configuration that allows us to use the ease and speed of PHP and the power of java (all the SOAP tool kits from IBM, etc). Here is the apache conf. PHP, Tomcat, Apache HOWTO - (assume jdk1.3.1 installed under /usr/java/) This was done on RH7.1 tomcat-3.2.3-1.noarch.rpm jakarta-tomcat-3.2.3-src.tar.gz apache_1.3.19.tar.gz php-4.0.6.tar.gz Untar these packages within the same dir. I use /usr/src/. Install the rpm vi /etc/rc.d/init.d/tomcat (make it look something like this) export PATH=$PATH:/usr/java/jdk1.3.1_01/bin:/usr/java/jdk1.3.1_01/jre/bin export JAVA_HOME=/usr/java/jdk1.3.1_01 export TOMCAT_HOME=/var/tomcat cd apache_1.3.19 ./configure --enable-module=so make make install cd php-4.0.6 ./configure --with-apxs=/usr/local/apache/bin/apxs make make install (of course you'll want --with-* that represent your env) cd /usr/src/jakarta-tomcat-3.2.3-src/src/native/apache1.3 /usr/local/apache/bin/apxs -o mod_jk.so -I ../jk -I /usr/java/jdk1.3.1_01/include -I /usr/java/jdk1.3.1_01/include/linux -c *.c ../jk/*.c cp mod_jk.so /usr/local/apache/libexec/ add the following line to the bottom of httpd.conf (do the regular conf of apache for php as well) include /var/tomcat/conf/mod_jk.conf-auto That is it. Now any empty directory in your DocumentRoot (that you define in the tomcat conf) is handled via tomcat/mod_jk and any .php file is handled by mod_php. It'll take a while for me to get really familar with tomcat conf, but once I am virtual servers and the rest should be possible. Anyway, I'm happy I get the apache soap and XML java based tools for the web services and get to keep the rapid development environment of php. Hope this is of use to some people. - Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] SOAP Tool Kit for PHP
When doing XML/XSL stuff that applies to just about any scripting language as Java has always been the reference implementation for this. When leaving the XML space the same is not true. But yes, we have a bit of catching up to do when it comes to XML/XSL/XSLT. -Rasmus On Mon, 1 Oct 2001, Chris Bailey wrote: > Check out this page of SOAP implementations: > > http://www.soapware.org/directory/4/implementations > > It lists several for PHP, so those may give you a solution. > > This is an interesting issue though, especially in light of you bringing up > Tomcat. I don't mean to start a big flame war over languages, but this is > one thing I struggle with in PHP land too. I've been doing Java stuff for > years, and am just starting to develop a few things in PHP. PHP is fast and > easy to use, and a lot easier to setup than Tomcat (or worse, Apache+Tomcat, > and further, if you have a non-standard directory structure). But, what > I've found so far, is that if I need to do pretty much anything beyond a > simple web app that is mostly a database client, Java just has so many more > libraries and resources available, from SOAP, to XML, XSL, and more. While > it's not true that PHP doesn't have any of this, it just seems there is more > momentum and solidity behind these types of things for Java. > > For example, I'm working on a web app that does a lot of XSL processing, and > immediately I can just grab the various Apache XML and XSL toolkits and get > rolling. On PHP I can look into Sablotron and some stuff, but I don't get a > feeling that I'd have near the level of functionality, and quality (or > solidity/maturity of code) as I would with the various Java based tools. > > > -Original Message- > From: Dahnke, Eric [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 01, 2001 10:46 AM > To: 'Chris Bailey' > Cc: '[EMAIL PROTECTED]' > Subject: RE: [PHP] SOAP Tool Kit for PHP > > > > Thanks. That's what I'm doing, and it is working, but it doesn't seem like > it will be very robust, and I don't know if my roll your own will be > compliant with MS SOAP messages and Apache SOAP messages. > > I'm reading the Soap:Envelope and Body XML via the $HTTP_RAW_DATA_POST > variable. It comes as a string. I parse that XML to determine the method to > invode (create, edit whatever). It works, but just seems sketch. Especially > the ack back to the poster. It says 200 OK, because the host and file I'm > posting to are found, but if there is an error in the method or anywhere > else, I'm supposed build the SOAP:Fault XML and send that back. > > I mean all the IP functions in PHP are so nice, and SOAP is an IP service as > well. Why no love for SOAP? > > > > -Original Message- > From: Chris Bailey [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 01, 2001 1:30 PM > To: Dahnke, Eric; [EMAIL PROTECTED] > Subject: RE: [PHP] SOAP Tool Kit for PHP > > > You could also consider possibly the reverse of what you're doing. I'm not > sure if it would actually work well, nor can I give you real details on how > to do it, but you can always use Java classes from PHP. Depending on how > much SOAP is needed/used across your site, you could continue with PHP for > the bulk of your site, and just use Java classes to handle the SOAP stuff > when needed. The primary issue I don't know about since I haven't looked > into it, is whether it's reasonable to have PHP receive the initial SOAP > request and how you would then hand it off to the Java classes for > processing, etc. Anyway, just a thought... > > -Original Message- > From: Dahnke, Eric [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 01, 2001 8:15 AM > To: [EMAIL PROTECTED] > Subject: [PHP] SOAP Tool Kit for PHP > > > > My god does PHP need one. Or a library of functions to use. > > Yes, I have built in CURL support and am reading the $HTTP_RAW_DATA_POST > variable and rolling my own as they say, but it sure would be nice. I've > seen Manual Lemos' soap classes, and they are cool, but aren't really what I > need. > > PHP is fast, has beautiful syntax and I love it, but I think it needs to > grow up a bit. I don't mean to start a war, but it is true, php needs to > evolve into something beyond a newbie language great for producing db driven > web-sites. > > I wish I could help, and after a few more C classes I will be able to, but > until then, I can only hope some C wizard is producing something like this. > Web-services are going to be big. Independent of .net (*uck MS), but the > messaging (SOAP) paradigm over http is going to be big. How d
RE: [PHP] SOAP Tool Kit for PHP
Check out this page of SOAP implementations: http://www.soapware.org/directory/4/implementations It lists several for PHP, so those may give you a solution. This is an interesting issue though, especially in light of you bringing up Tomcat. I don't mean to start a big flame war over languages, but this is one thing I struggle with in PHP land too. I've been doing Java stuff for years, and am just starting to develop a few things in PHP. PHP is fast and easy to use, and a lot easier to setup than Tomcat (or worse, Apache+Tomcat, and further, if you have a non-standard directory structure). But, what I've found so far, is that if I need to do pretty much anything beyond a simple web app that is mostly a database client, Java just has so many more libraries and resources available, from SOAP, to XML, XSL, and more. While it's not true that PHP doesn't have any of this, it just seems there is more momentum and solidity behind these types of things for Java. For example, I'm working on a web app that does a lot of XSL processing, and immediately I can just grab the various Apache XML and XSL toolkits and get rolling. On PHP I can look into Sablotron and some stuff, but I don't get a feeling that I'd have near the level of functionality, and quality (or solidity/maturity of code) as I would with the various Java based tools. -Original Message- From: Dahnke, Eric [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 10:46 AM To: 'Chris Bailey' Cc: '[EMAIL PROTECTED]' Subject: RE: [PHP] SOAP Tool Kit for PHP Thanks. That's what I'm doing, and it is working, but it doesn't seem like it will be very robust, and I don't know if my roll your own will be compliant with MS SOAP messages and Apache SOAP messages. I'm reading the Soap:Envelope and Body XML via the $HTTP_RAW_DATA_POST variable. It comes as a string. I parse that XML to determine the method to invode (create, edit whatever). It works, but just seems sketch. Especially the ack back to the poster. It says 200 OK, because the host and file I'm posting to are found, but if there is an error in the method or anywhere else, I'm supposed build the SOAP:Fault XML and send that back. I mean all the IP functions in PHP are so nice, and SOAP is an IP service as well. Why no love for SOAP? -Original Message- From: Chris Bailey [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 1:30 PM To: Dahnke, Eric; [EMAIL PROTECTED] Subject: RE: [PHP] SOAP Tool Kit for PHP You could also consider possibly the reverse of what you're doing. I'm not sure if it would actually work well, nor can I give you real details on how to do it, but you can always use Java classes from PHP. Depending on how much SOAP is needed/used across your site, you could continue with PHP for the bulk of your site, and just use Java classes to handle the SOAP stuff when needed. The primary issue I don't know about since I haven't looked into it, is whether it's reasonable to have PHP receive the initial SOAP request and how you would then hand it off to the Java classes for processing, etc. Anyway, just a thought... -Original Message----- From: Dahnke, Eric [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] SOAP Tool Kit for PHP My god does PHP need one. Or a library of functions to use. Yes, I have built in CURL support and am reading the $HTTP_RAW_DATA_POST variable and rolling my own as they say, but it sure would be nice. I've seen Manual Lemos' soap classes, and they are cool, but aren't really what I need. PHP is fast, has beautiful syntax and I love it, but I think it needs to grow up a bit. I don't mean to start a war, but it is true, php needs to evolve into something beyond a newbie language great for producing db driven web-sites. I wish I could help, and after a few more C classes I will be able to, but until then, I can only hope some C wizard is producing something like this. Web-services are going to be big. Independent of .net (*uck MS), but the messaging (SOAP) paradigm over http is going to be big. How does php fit in there? It looks as though we're headed over to tomcat, and I'm probably going to bring a bunch of php developers with me. And that sucks, because tomcat is slow, and it takes twice as long to produce an application w/ non masters level or big time CS people. The first thing I'm going to try though is running php as a servlet under tomcat, but it's only to get at the apache soap tools. See what I mean. Thanks to all the php developers. 'gards - Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://ww
RE: [PHP] SOAP Tool Kit for PHP
Thanks. That's what I'm doing, and it is working, but it doesn't seem like it will be very robust, and I don't know if my roll your own will be compliant with MS SOAP messages and Apache SOAP messages. I'm reading the Soap:Envelope and Body XML via the $HTTP_RAW_DATA_POST variable. It comes as a string. I parse that XML to determine the method to invode (create, edit whatever). It works, but just seems sketch. Especially the ack back to the poster. It says 200 OK, because the host and file I'm posting to are found, but if there is an error in the method or anywhere else, I'm supposed build the SOAP:Fault XML and send that back. I mean all the IP functions in PHP are so nice, and SOAP is an IP service as well. Why no love for SOAP? -Original Message- From: Chris Bailey [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 1:30 PM To: Dahnke, Eric; [EMAIL PROTECTED] Subject: RE: [PHP] SOAP Tool Kit for PHP You could also consider possibly the reverse of what you're doing. I'm not sure if it would actually work well, nor can I give you real details on how to do it, but you can always use Java classes from PHP. Depending on how much SOAP is needed/used across your site, you could continue with PHP for the bulk of your site, and just use Java classes to handle the SOAP stuff when needed. The primary issue I don't know about since I haven't looked into it, is whether it's reasonable to have PHP receive the initial SOAP request and how you would then hand it off to the Java classes for processing, etc. Anyway, just a thought... -Original Message- From: Dahnke, Eric [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] SOAP Tool Kit for PHP My god does PHP need one. Or a library of functions to use. Yes, I have built in CURL support and am reading the $HTTP_RAW_DATA_POST variable and rolling my own as they say, but it sure would be nice. I've seen Manual Lemos' soap classes, and they are cool, but aren't really what I need. PHP is fast, has beautiful syntax and I love it, but I think it needs to grow up a bit. I don't mean to start a war, but it is true, php needs to evolve into something beyond a newbie language great for producing db driven web-sites. I wish I could help, and after a few more C classes I will be able to, but until then, I can only hope some C wizard is producing something like this. Web-services are going to be big. Independent of .net (*uck MS), but the messaging (SOAP) paradigm over http is going to be big. How does php fit in there? It looks as though we're headed over to tomcat, and I'm probably going to bring a bunch of php developers with me. And that sucks, because tomcat is slow, and it takes twice as long to produce an application w/ non masters level or big time CS people. The first thing I'm going to try though is running php as a servlet under tomcat, but it's only to get at the apache soap tools. See what I mean. Thanks to all the php developers. 'gards - Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] SOAP Tool Kit for PHP
You could also consider possibly the reverse of what you're doing. I'm not sure if it would actually work well, nor can I give you real details on how to do it, but you can always use Java classes from PHP. Depending on how much SOAP is needed/used across your site, you could continue with PHP for the bulk of your site, and just use Java classes to handle the SOAP stuff when needed. The primary issue I don't know about since I haven't looked into it, is whether it's reasonable to have PHP receive the initial SOAP request and how you would then hand it off to the Java classes for processing, etc. Anyway, just a thought... -Original Message- From: Dahnke, Eric [mailto:[EMAIL PROTECTED]] Sent: Monday, October 01, 2001 8:15 AM To: [EMAIL PROTECTED] Subject: [PHP] SOAP Tool Kit for PHP My god does PHP need one. Or a library of functions to use. Yes, I have built in CURL support and am reading the $HTTP_RAW_DATA_POST variable and rolling my own as they say, but it sure would be nice. I've seen Manual Lemos' soap classes, and they are cool, but aren't really what I need. PHP is fast, has beautiful syntax and I love it, but I think it needs to grow up a bit. I don't mean to start a war, but it is true, php needs to evolve into something beyond a newbie language great for producing db driven web-sites. I wish I could help, and after a few more C classes I will be able to, but until then, I can only hope some C wizard is producing something like this. Web-services are going to be big. Independent of .net (*uck MS), but the messaging (SOAP) paradigm over http is going to be big. How does php fit in there? It looks as though we're headed over to tomcat, and I'm probably going to bring a bunch of php developers with me. And that sucks, because tomcat is slow, and it takes twice as long to produce an application w/ non masters level or big time CS people. The first thing I'm going to try though is running php as a servlet under tomcat, but it's only to get at the apache soap tools. See what I mean. Thanks to all the php developers. 'gards - Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SOAP Tool Kit for PHP
My god does PHP need one. Or a library of functions to use. Yes, I have built in CURL support and am reading the $HTTP_RAW_DATA_POST variable and rolling my own as they say, but it sure would be nice. I've seen Manual Lemos' soap classes, and they are cool, but aren't really what I need. PHP is fast, has beautiful syntax and I love it, but I think it needs to grow up a bit. I don't mean to start a war, but it is true, php needs to evolve into something beyond a newbie language great for producing db driven web-sites. I wish I could help, and after a few more C classes I will be able to, but until then, I can only hope some C wizard is producing something like this. Web-services are going to be big. Independent of .net (*uck MS), but the messaging (SOAP) paradigm over http is going to be big. How does php fit in there? It looks as though we're headed over to tomcat, and I'm probably going to bring a bunch of php developers with me. And that sucks, because tomcat is slow, and it takes twice as long to produce an application w/ non masters level or big time CS people. The first thing I'm going to try though is running php as a servlet under tomcat, but it's only to get at the apache soap tools. See what I mean. Thanks to all the php developers. 'gards - Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]