Pergunta

I'm trying to make a call to one SOAP Webservice that WSDL file looks something like this:

<wsdl:service name="API">
    <wsdl:port binding="tns:API" name="API">
        <soap:address location="https://secure.server.com/clients/api/api.php"/>
    </wsdl:port>
</wsdl:service>

I'm using ksoap2 library for Android. What is the SOAP Action value that I should use to make a call?

Thanks

Foi útil?

Solução

It depends if you are using the RPC/literal or Document/literal type for your WSDL file. - For RPC/literal you should specify the method name which is the name of the function you call on the WS. So the action is in fact the method name. - For Document/literal the method is not specified in the XML of the request. So action is null or empty String

I strongly recommend you to use the type RPC/literal (see differences here: http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/) if you are the WS developer If not, check the type and do according to this. So if it is RPC/literal the SOAP Action is the method name you are calling on your WS.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top