JAVA调用PHP SOAP服务的示例
2014-11-27 21:47
302 查看
Image you had a php service that would connect to a mysql database and return query results via soap.
That php service (SOAP server) could look like that:
To make this example work you would need to create a database called userdb with an usertable. This would be the sql to create the table and put in some data:
After everything is created you would like to call the function get_names via a java program:
This java code makes a soap call to the php soap server and puts the returned database result into a List of Hashmaps with the database entries. The example output of the java program looks like that:
(3/0)added id = 1
(3/1)added name = alexander
(3/2)added email = a.balsam@nedeco.de
(3/0)added id = 2
(3/1)added name = alexander
(3/2)added email = alexander@balsam.de
If you have any input on this leave a comment or write some additional code and send it to me.
That php service (SOAP server) could look like that:
(3/0)added id = 1
(3/1)added name = alexander
(3/2)added email = a.balsam@nedeco.de
(3/0)added id = 2
(3/1)added name = alexander
(3/2)added email = alexander@balsam.de
If you have any input on this leave a comment or write some additional code and send it to me.
相关文章推荐
- eoLinker-API_Shop_短信服务接口-调用示例代码,支持PHP、Python、Java等语言
- PHP提供Web Service服务供JAVA调用(SOAP+WSDL)
- JAVA调用PHP SOAP服务
- php SOAP客户端访问 JAVA soap服务端示例
- PHP : SOAP 协议调用 Web服务(WebService)(转)
- 在 PHP 中使用 SOAP 协议调用 Web服务(WebService)
- PHP 调用Java Dubbo服务(Dubbo、Hessian、JsonRPC)
- php调用java写的webservices提示Uncaught SoapFault exception: [HTTP] Not Found
- java根据ip地质调用百度定位api服务获取地理位置示例
- java调用百度定位api服务获取地理位置示例
- java调用php的webservice示例
- PHP SOAP服务示例代码
- 详解JAVA调用WCF服务的示例代码
- PHP通过Memcached协议连接Netty, 调用Java服务
- C#调用php的Soap服务
- PHP soap 调用 JAVA发布的webservice
- PHP远程调用Java服务
- 使用PHPHessian调用Java Spring Hessian暴露服务­
- java根据ip地质调用百度定位api服务获取地理位置示例