From khamlichi.khalil at gmail.com Thu May 5 14:09:45 2016 From: khamlichi.khalil at gmail.com (Khalil Khamlichi) Date: Thu, 05 May 2016 18:09:45 -0000 Subject: [Soap-Python] php script to python script Message-ID: Hi everyone, I have received this script from our software provider as an example on how to use their soap API from php. #!/usr/bin/env php __setSoapHeaders($headers); // ------- The main block begins here ------- $obj_id = $client->getObjectId('System users', 'Carriers;Administration;System users'); echo $obj_id; // ------- The main block ends here ------- ?> The example also provides the XML request that this script generates : xmlns:soap="http://provider_website.com/soap" xmlns:auth="auth"> Login Password System users Carriers;Administration;System users Can anyone help me with similar script in functionality in the python language, I basically am stuck on the auth headers, I am always getting : wrong credential error message. Thanks in advance. Khalil Khamlichi -------------- next part -------------- An HTML attachment was scrubbed... URL: From khamlichi.khalil at gmail.com Thu May 26 13:09:01 2016 From: khamlichi.khalil at gmail.com (Khalil Khamlichi) Date: Thu, 26 May 2016 18:09:01 +0100 Subject: [Soap-Python] New Soap library: zeep In-Reply-To: References: Message-ID: Hi Michael, can you help me out convert this piece of php code into your library's code ? I have been mainly struggling with the : Login Password part I have received this script from our software provider as an example on how to use their soap API from php. #!/usr/bin/env php __setSoapHeaders($headers); // ------- The main block begins here ------- $obj_id = $client->getObjectId('System users', 'Carriers;Administration;System users'); echo $obj_id; // ------- The main block ends here ------- ?> The example also provides the XML request that this script generates : xmlns:soap="http://provider_website.com/soap" xmlns:auth="auth"> Login Password System users Carriers;Administration;System users Thanks in advance, On Sun, Apr 17, 2016 at 7:02 PM, Michael van Tellingen < michaelvantellingen at gmail.com> wrote: > Hi all, > > Although this list seems fairly inactive, i'll give it a shot anyhow. I've > just released a new version of python zeep (0.4.0) and would love to get > feedback on it. A small roundup of the features are: > > - Based on Requests / LXML and defusedxml > - Supports recursive wsdl and xsd documents (one of the usp's of this > lib) > - Supports the xsd:any and xsd:choice elements > - Works on py2, py3 and pypy > > The repository can be found at > https://github.com/mvantellingen/python-zeep and the documentation on > http://docs.python-zeep.org/ > > PyPi url is https://pypi.python.org/pypi/zeep/ > > Thanks, > Michael > > > _______________________________________________ > Soap mailing list > Soap at python.org > https://mail.python.org/mailman/listinfo/soap > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cbeck at railkey.net Thu May 26 13:46:17 2016 From: cbeck at railkey.net (Chris Beck) Date: Thu, 26 May 2016 13:46:17 -0400 Subject: [Soap-Python] php script to python script In-Reply-To: References: Message-ID: Hi Khalil, Can you provide an example of what you are doing? On Thu, May 5, 2016 at 2:09 PM, Khalil Khamlichi wrote: > Hi everyone, > > I have received this script from our software provider as an example on > how to use their soap API from php. > > #!/usr/bin/env php > // Creating a new SOAP client > $client = new SoapClient( > 'https://192.168.1.2/service/?wsdl_v2' > ); > // Setting authentication headers > $headers = array(); > // Write your password unencrypted as all the information goes through > the secure SSL connection > $headers[] = new SoapHeader('auth','Login','admin'); > $headers[] = new SoapHeader('auth','Password','admin'); > $client->__setSoapHeaders($headers); > // ------- The main block begins here ------- > $obj_id = $client->getObjectId('System users', > 'Carriers;Administration;System users'); > echo $obj_id; > // ------- The main block ends here ------- > ?> > > The example also provides the XML request that this script generates : > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv=" > http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:soap="http://provider_website.com/soap" xmlns:auth="auth"> > > > > Login > Password > > > > > System users > Carriers;Administration;System users > > > > > > Can anyone help me with similar script in functionality in the python > language, I basically am stuck on the auth headers, I am always getting : > wrong credential error message. > > Thanks in advance. > > > Khalil Khamlichi > > > > > _______________________________________________ > Soap mailing list > Soap at python.org > https://mail.python.org/mailman/listinfo/soap > > -- Christopher Beck cbeck at railkey.net +1.514.431.7759 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michaelvantellingen at gmail.com Sun May 29 06:07:17 2016 From: michaelvantellingen at gmail.com (Michael van Tellingen) Date: Sun, 29 May 2016 12:07:17 +0200 Subject: [Soap-Python] New Soap library: zeep In-Reply-To: References: Message-ID: Hi Khalil, What did you try yourself? It should be something simple like: import zeep from zeep.wsse.username import UsernameToken client = zeep.Client('wsdl-url', wsse=UserNameToken('Login', 'Password')) result = client.service.getObjectId('System users', 'Carriers;Administration;System users print (result) See http://docs.python-zeep.org for more info Cheers, Michael On Thu, May 26, 2016 at 7:09 PM, Khalil Khamlichi < khamlichi.khalil at gmail.com> wrote: > Hi Michael, > > can you help me out convert this piece of php code into your library's > code ? I have been mainly struggling with the : > > > Login > Password > > > part > > I have received this script from our software provider as an example on > how to use their soap API from php. > > #!/usr/bin/env php > // Creating a new SOAP client > $client = new SoapClient( > 'https://192.168.1.2/service/?wsdl_v2' > ); > // Setting authentication headers > $headers = array(); > // Write your password unencrypted as all the information goes through > the secure SSL connection > $headers[] = new SoapHeader('auth','Login','admin'); > $headers[] = new SoapHeader('auth','Password','admin'); > $client->__setSoapHeaders($headers); > // ------- The main block begins here ------- > $obj_id = $client->getObjectId('System users', > 'Carriers;Administration;System users'); > echo $obj_id; > // ------- The main block ends here ------- > ?> > > The example also provides the XML request that this script generates : > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv=" > http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:soap="http://provider_website.com/soap" xmlns:auth="auth"> > > > > Login > Password > > > > > System users > Carriers;Administration;System users > > > > > > Thanks in advance, > > On Sun, Apr 17, 2016 at 7:02 PM, Michael van Tellingen < > michaelvantellingen at gmail.com> wrote: > >> Hi all, >> >> Although this list seems fairly inactive, i'll give it a shot anyhow. >> I've just released a new version of python zeep (0.4.0) and would love to >> get feedback on it. A small roundup of the features are: >> >> - Based on Requests / LXML and defusedxml >> - Supports recursive wsdl and xsd documents (one of the usp's of this >> lib) >> - Supports the xsd:any and xsd:choice elements >> - Works on py2, py3 and pypy >> >> The repository can be found at >> https://github.com/mvantellingen/python-zeep and the documentation on >> http://docs.python-zeep.org/ >> >> PyPi url is https://pypi.python.org/pypi/zeep/ >> >> Thanks, >> Michael >> >> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> https://mail.python.org/mailman/listinfo/soap >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danny at cs.huji.ac.il Sun May 29 07:06:33 2016 From: danny at cs.huji.ac.il (Daniel Braniss) Date: Sun, 29 May 2016 14:06:33 +0300 Subject: [Soap-Python] need client ip in server Message-ID: <16056978-F482-4D72-AC08-68D74A31715F@cs.huji.ac.il> Hi, I?m using pysimplesoap, and I need to now the client?s ip address in the server, but can?t seem to find address_string() :-( cheers, danny