简体   繁体   English

如何创建肥皂客户端?

[英]How do I create a soap client?

I need to create a SOAP client. 我需要创建一个SOAP客户端。 The SOAP client should access services exposed using SOAP messages. SOAP客户端应访问使用SOAP消息公开的服务。 It performs dynamic bindings and executes methods at remote web services. 它执行动态绑定并在远程Web服务上执行方法。 Soap methods are: 肥皂的方法有:

  • getTodoList(acronym) -> List of TodoData() getTodoList(缩写)-> TodoData()的列表
  • getTodoOneDay(acronym, date) -> List of TodoData() getTodoOneDay(缩写,日期)-> TodoData()的列表
  • createTodo(acronym, time, note, priority) -> String createTodo(首字母缩写,时间,注释,优先级)->字符串
  • updateTodo(id, acronym, time, note, priority) -> String updateTodo(id,首字母缩写词,时间,注意,优先级)->字符串
  • deleteTodo(acronym, id) -> String deleteTodo(缩写,id)->字符串

There is a soap server running on http://lol.comlab.bth.se:8090 . http://lol.comlab.bth.se:8090上运行着一个肥皂服务器。 Please help me by giving code in either php, java, python or any other language. 请通过提供php,java,python或任何其他语言的代码来帮助我。

You could invoke method getTodoList(acronym) using PHP SOAP Extension in WSDL Mode : 您可以在WSDL模式下使用PHP SOAP Extension调用方法getTodoList(acronym)

$client = new SoapClient("http://lol.comlab.bth.se:8090/PathToYour.wsdl");
$return = $client->getTodoList(acronym));

Or in non-WSDL Mode : 或在非WSDL模式下

$client = new SoapClient(null, array(
    'location' => "http://lol.comlab.bth.se:8090/PathToYourServer.php",
    'uri'      => "urn://lol.comlab.bth.se",
    'trace'    => 1 ));

$return = $client->__soapCall("getTodoList", array(acronym));

Also, these tutorials could be helpful: 另外,这些教程可能会有所帮助:

Just install the python-zsi library, or any other source code generator, and execute: 只需安装python-zsi库或任何其他源代码生成器,然后执行:

wsdl2py http://lol.comlab.bth.se:8090/wsdl

your done 你完成了

I think you're asking someone to write the whole client, and not just help out with it. 我认为您是在要求某人编写整个客户端,而不仅仅是提供帮助。 You might try another site to hire a coder for this. 您可以尝试其他站点为此聘请编码器。

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

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