You may be able to use URI module.

If you are on windows, or have some windows hosts, you can make use of the 
webServiceProxy cmdlets.  This is nice as  you can use the wsdl and 
discover the available methods on the webservice interface at runtime.

Here's a powershell script that can be used to connect to a soap webservice 
and return the methods it exposes.

Function Check_WebService{Param([string] $wsdl)
Process{
    write-host "checking: $wsdl"


    # create a credential object.  Have to convert the pw to a 'secure 
string' before you can create the cred object
    $username = "1"
    $secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force
    $credential = New-Object System.Management.Automation.PSCredential (
$username, $secpasswd)


    # or use this to prompt for username and password
    #$credential = Get-Credential
    try {
       # create the proxy, specifying a namespace and target class to 
represent the interface
       $ws_proxy = New-WebServiceProxy -Uri $wsdl  -Namespace "Soap11" -
Class "Soap11" -Credential $credential


       # get hold of the namespace so you can start creating a suitable 
request object
       $namespace = $ws_proxy.GetType().Namespace 


       # find out what you can do using the proxy
       $ws_proxy| Get-Member -MemberType Method


       $ws_proxy.Dispose() 
    } catch {
        write-host $_.Exception.Message
        write-host "Failed while checking: $wsdl"
        exit(1)
    }
}}


write-host "checking that interfaces can be generated by .net"




# wsdl location for the web service to poke:


# Endpoint to check
 Check_WebService -wsdl "http://hostname/path/to/your.wsdl";




Another way to do this would be to use a tool such as SoapUI which contains 
a program called 'testrunner' which lets you run soapui tests from the 
command line.

Jon



On Monday, February 5, 2018 at 1:06:56 PM UTC, eshan TANDON wrote:
>
> Not sure if there is an explicit module to make soap call however u can 
> use the shell module:
>
> http://docs.ansible.com/ansible/latest/shell_module.html
>
> Here is some documentation on how to make soap call using curl:
>
> http://lancegatlin.org/tech/test-a-soap-web-service-using-curl
>
> Combining the options above is what u want.
>
> Thanks,
> Eshan
>
> On Mon, Feb 5, 2018 at 12:11 AM rajasekhar mutyala <
> mutyala.ra...@gmail.com <javascript:>> wrote:
>
>> Hi All,
>>
>> I am trying to login and perform some taks using SOAP API with ansible. 
>> Can you please let me know how to call SOAP API along with examples would 
>> really help.
>>
>> Thanks
>> Rajasekhar
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to ansible-proje...@googlegroups.com <javascript:>.
>> To post to this group, send email to ansible...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/c47a504c-061c-45f9-8f99-ca87ad7c7c03%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/c47a504c-061c-45f9-8f99-ca87ad7c7c03%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> Warm Regards,
> Eshan Tandon
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2ffdfb3c-c0af-4f63-a0db-d9db55c45b70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to