communication between a php code and a java code

i have a php code which should send parameters to a web service written in java, the web service should return other parameters in an xml format.the communication between both of them should be by the means of a servlet.i want to have an idea how to write that servlet.
[290 byte] By [soumayaa] at [2007-11-27 1:21:03]
# 1
I'm afraid it is not possible to write servlets using PHP.
citcrua at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
^that's not the issue... You have a Java web service (exposed as a servlet). A PHP page invokes this service, and returns an XML payload.So what exactly is your question?
bckrispia at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

the issue is that i want to develop a java servlet which takes somes parameters from a php code then sends them to a java web service (a client and a service) and returns the content in an xml format, so i want to develop that servlet in order to make the php code and the the java service communicate.

soumayaa at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Is your webservice except both php and javaTry ajax... simple javascript which bridge java and php... the xml will be passed from to your java and php using javascript.
G_Abubakra at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
no, i have a portal in php and the web service is the access to database part which is written in java, the portal should send 3 parameters to the web service and the web service should return the response in xml.
soumayaa at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6

Hi,

You say:

>...takes somes parameters from a php code then sends them to a java web service.

So sorry for a stupid question(I haven't done anything with PHP for a long time):

Why do you need a Servlet at all?

As I remember there is something like PHP client for webservices. So if you have a webservice you can call it from PHP without any servlet between, or I understand somethong wrong?

Regards,

giorgi

javri28a at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
thank you,but i don't know if i can develop a client for my web service in php while i have already developed a server in java.
soumayaa at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8

> thank you,

> but i don't know if i can develop a client for my web

> service in php while i have already developed a

> server in java.

Ummm, that's the whole purpose of Web Services, is it not? They allow heterogeneus systems to communicate over a common protocol.

bckrispia at 2007-7-11 23:58:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...