Hi Gabriel,
First, thanks for providing a working test case, makes my life much much
easier.
If you apply the attached patch to Spyne trunk and run
test/interop/test_wsi.py, you will see that the WSDL that Spyne produces
is fine, and you're in fact running into a suds bug.
Turns out I'd ran into that bug and fixed it in my personal fork of suds
years ago.
I'm now making available my fork of suds here: https://github.com/plq/suds
Better late than never, I guess :)
The relevant patch seems to be this one:
https://github.com/plq/suds/commit/952cc6927e4c627fb95fdfd3d6dfc23277d87483#L2L722
but to be honest, I have no idea why OR how this fixes the issue.
Hope that helps.
Best,
Burak
On 08/10/12 11:21, Gabriel Monnerat wrote:
Hello,
I am trying use the WSSE namespace for my Authentication model. But I
have one exception when I am trying instantiate the Client. i.e
gabriel:~$ python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from suds.client import Client
>>> Client("http://localhost:7789/?wsdl")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/client.py",
line 112, in __init__
File
"/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/reader.py",
line 152, in open
File
"/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/wsdl.py",
line 158, in __init__
File
"/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/wsdl.py",
line 207, in resolve
File
"/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/wsdl.py",
line 661, in resolve
File
"/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/wsdl.py",
line 725, in resolveheaders
Exception: message's0:Security', not-found
Here is the soap server that I am using: http://pastebin.com/uJXZ6CdL
Thanks in advance,
--
Gabriel M. Monnerat
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap
diff --git a/spyne/test/interop/test_wsi.py b/spyne/test/interop/test_wsi.py
index cb0aefe..a83659f 100755
--- a/spyne/test/interop/test_wsi.py
+++ b/spyne/test/interop/test_wsi.py
@@ -15,7 +15,7 @@ import string
from lxml import etree
CONFIG_FILE = 'config.xml'
-SPYNE_TEST_NS = 'spyne.test.interop.server'
+SPYNE_TEST_NS = 'spyne.examples.authentication'
SPYNE_TEST_PORT = 'Application'
SPYNE_REPORT_FILE = 'wsi-report-spyne.xml'
@@ -34,31 +34,11 @@ WSI_ANALYZER_CONFIG_TEMPLATE=string.Template("""<?xml version="1.0" encoding="UT
</wsi-analyzerConfig:testAssertionsFile>
<wsi-analyzerConfig:wsdlReference>
<wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropArray" namespace="${WSDL_NAMESPACE}">
+ parentElementName="AuthenticationService" namespace="${WSDL_NAMESPACE}">
${PORT_NAME}
</wsi-analyzerConfig:wsdlElement>
<wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropClass" namespace="${WSDL_NAMESPACE}">
- ${PORT_NAME}
- </wsi-analyzerConfig:wsdlElement>
- <wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropException" namespace="${WSDL_NAMESPACE}">
- ${PORT_NAME}
- </wsi-analyzerConfig:wsdlElement>
- <wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropMisc" namespace="${WSDL_NAMESPACE}">
- ${PORT_NAME}
- </wsi-analyzerConfig:wsdlElement>
- <wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropPrimitive" namespace="${WSDL_NAMESPACE}">
- ${PORT_NAME}
- </wsi-analyzerConfig:wsdlElement>
- <wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropServiceWithComplexHeader" namespace="${WSDL_NAMESPACE}">
- ${PORT_NAME}
- </wsi-analyzerConfig:wsdlElement>
- <wsi-analyzerConfig:wsdlElement type="port"
- parentElementName="InteropServiceWithHeader" namespace="${WSDL_NAMESPACE}">
+ parentElementName="UserService" namespace="${WSDL_NAMESPACE}">
${PORT_NAME}
</wsi-analyzerConfig:wsdlElement>
<wsi-analyzerConfig:wsdlURI>${WSDL_URI}</wsi-analyzerConfig:wsdlURI>
@@ -157,5 +137,5 @@ from spyne.test.interop._test_soap_client_base import run_server
if __name__ == '__main__':
run_server('http')
configure_env()
- create_config('http://localhost:9754/?wsdl', CONFIG_FILE)
+ create_config('http://localhost:7789/?wsdl', CONFIG_FILE)
analyze_wsdl(CONFIG_FILE)
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap