简体   繁体   中英

How do I create a soap client?

I need to create a SOAP client. The SOAP client should access services exposed using SOAP messages. It performs dynamic bindings and executes methods at remote web services. Soap methods are:

  • getTodoList(acronym) -> List of TodoData()
  • getTodoOneDay(acronym, date) -> List of TodoData()
  • createTodo(acronym, time, note, priority) -> String
  • updateTodo(id, acronym, time, note, priority) -> String
  • deleteTodo(acronym, id) -> String

There is a soap server running on http://lol.comlab.bth.se:8090 . Please help me by giving code in either php, java, python or any other language.

You could invoke method getTodoList(acronym) using PHP SOAP Extension in WSDL Mode :

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

Or in non-WSDL Mode :

$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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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