Closed GoogleCodeExporter closed 8 years ago
This is a bug apparently because the WSDL cannot be correctly recognized.
In the meantime, you can try the raw method (building the xml directly):
client = SoapClient(location="https://api.clarizen.com/v1.0/Clarizen.svc",
namespace='http://clarizen.com/api', trace=True)
headers = SimpleXMLElement("<Headers/>", namespace="http://clarizen.com/api",
prefix="ns1")
session = headers.add_child("Session")
session['xmlns'] = "http://clarizen.com/api"
session.marshall('ID', 'test123456')
client.location = "https://api.clarizen.com/v1.0/Clarizen.svc"
client.action = "http://clarizen.com/api/IClarizen/Logout"
client.call("Logout", headers=headers)
Original comment by reingart@gmail.com
on 28 Jan 2012 at 12:23
The raw xml method too doesnt seem to work. The header element is not attached
to the request. This is what I'm trying -
client = SoapClient(wsdl="file:///C:/myservice.wsdl",trace=True)
client.namespace = "http://api.mynamespace.com/"
query_str = 'Select Id,Name from Product'
headers = SimpleXMLElement("<Header/>")
my_test_header = headers.add_child("SessionHeader")
my_test_header.marshall('Session', 'abcdefg123==')
query_result = client.query(query_str, headers=headers )
Request XML does not have the Header element. Am I missing something here?
Original comment by ravi.siv...@tarams.com
on 14 Feb 2012 at 9:28
Ravi:
You have to use the raw call method:
query_result_xml = client.call("query", query_str=query_str, headers=headers)
Original comment by reingart@gmail.com
on 14 Feb 2012 at 2:02
Hi did you guys get this issue fixed?
I'm running into the same issue too (with the raw call method) =...(
Original comment by shih...@gmail.com
on 21 Apr 2012 at 1:35
shihwei: could you attach a test case (.py source code)?
did you try :
query_result_xml = client.call("query", query_str=query_str, headers=headers)
Original comment by reingart@gmail.com
on 21 Apr 2012 at 3:34
I also get the same problem. No matter what method I use to add custom headers
it won't happen or pysimplesoap will add them in the soap body.
Original comment by mario.r....@gmail.com
on 18 May 2012 at 1:00
[deleted comment]
This issue was closed by revision 5079af939058.
Original comment by reingart@gmail.com
on 11 Jun 2012 at 11:20
fixed in client version 1.06b:
http://code.google.com/p/pysimplesoap/source/detail?r=5079af939058933fdadfe8ca0d
a2078d2d4fe3d6
See wsdl and raw tests at:
http://code.google.com/p/pysimplesoap/source/diff?spec=svn5079af939058933fdadfe8
ca0da2078d2d4fe3d6&r=5079af939058933fdadfe8ca0da2078d2d4fe3d6&format=side&path=/
tests/issues_tests.py
Original comment by reingart@gmail.com
on 11 Jun 2012 at 11:26
Original issue reported on code.google.com by
jpcampb...@gmail.com
on 27 Jan 2012 at 10:19