简体   繁体   English

使用php中的SOAP和WSDL将数据从表单传递到Web服务器

[英]pass data from a form to a web server using SOAP and WSDL in php

I am a newbie in SOAP and WSDL..I have to get data from a form and pass it through SOAP to a web server. 我是SOAP和WSDL的新手。我必须从表单获取数据并将其通过SOAP传递到Web服务器。 I have the WSDL adress: ...how can I achieve this? 我有WSDL地址:...如何实现这一目标? do I have to make some configuration or install something? 我必须进行一些配置或安装某些东西吗? please help..I also have a function called: which in the input takes the following parameters: 请帮助。我还有一个函数:在输入中带有以下参数:

Can you please give some advice or an example? 您能给我一些建议或例子吗?

your service url not loding for me, this is the soap web methods call in php. 您的服务网址不适合我,这是php中的soap web方法调用。 check this 检查这个

   $client = new SoapClient("http://www.gerovital.local/extras/server.wsdl");
      $params = array (
            "telefon" => 742209305,
            "cod" => "a4urv6bs",
            "ip" => "192.168.55.78"
    );

    $response = $client->__soapCall('inscriereWeb',array($params));

You need to use 您需要使用

$response = $client->__soapCall('inscriereWeb',array($params));

instead of 代替

$response $client->__soapCall('inscriereWeb',array($params));

this assign the return of your webservice call to the variable $response. 这会将您的Web服务调用的返回分配给变量$ response。

You can then use var_dump($response); 然后可以使用var_dump($response); to check the webservice response. 检查网络服务响应。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM