[IronPython] SOAPAction header

Miha Valencic miha.valencic at gmail.com
Fri Sep 12 01:17:46 CEST 2008

Jim, the GUI behind VisualStudio is wsdl.exe. And that generates the proxy
classes. You can do this by hand, if this VisualStudio black magic scares
you. :)

wsdl.exe <your_wsdl_file>

Create that in c# and compile it as a class library. Then use it from python
like so:

from ws.lists import lists

wsClient = lists()
# setup network credentials the way you would
# setup URL endpoint liket
wsClient.Url = "http://foo.com"

I have not compiled it, but it should work.

Hope that helps,

2008/9/11 O'Leary, Jim <Jim.O'Leary at vancouver.ca<Jim.O%27Leary at vancouver.ca>

>  I'm pasting the vb.NET code.
> --------------------------vb.NET code
> BEGINS-------------------------------------
> Dim aWebService As New ws.lists.lists' Web service
> Dim myCredentials As New System.Net.NetworkCredential
> myCredentials = System.Net.CredentialCache.DefaultCredentials
> aWebService.Credentials = myCredentials
> aXMLnode = aWebService.GetListItems(args)
> --------------------------vb.NET code
> ENDS--------------------------------------
> The reason I want to do it in IronPython is to see how it can be done if
> you do not use the GUI that Visual Studio provides for connecting a web
> service provider and consumer. I think it will work if I can add the
> SOAPAction header, but how do I do that? If I write:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080912/a96019e5/attachment.html>

More information about the Ironpython-users mailing list