On 06/25/2012 12:29 PM, C Anthony Risinger wrote:
hello,

while briefly trying to update to the spyne codebase, i am encountering
an AssertionError due to spyne enforcing a 1-to-1 mapping between
MethodDescriptor and the function it wraps:

   File "/path/to/spyne/interface/_base.py", line 224, in
populate_interface
     assert not s.get_method_id(method) in self.method_id_map
AssertionError

... the problem is that i am currently building the MethodDescriptors
dynamically, and mapping to a single _proxy function; this SOAP service
is really proxying/exposing another JSON service (no JSON support in
rpclib/spyne during development).

since `method_id_map` is only really used in one place, and even then only it's .values() are used (spyne/application.py:161), i converted it to a set() and change the assertion to `(s, method) in ...`, and it seems to work fine :-)

buuuut, i am getting an odd error about the XSD trying to import itself(?):

File "xmlschema.pxi", line 105, in lxml.etree.XMLSchema.__init__ (src/lxml/lxml.etree.c:132720) lxml.etree.XMLSchemaParseError: Element '{http://www.w3.org/2001/XMLSchema}import': The value of the attribute 'namespace' must not match the target namespace 'http://awesome.service.com/' of the importing schema., line 2

tns.xsd
------------------------
<xs:schema xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"; xmlns:tns="http://awesome.service.com/"; xmlns:plink="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"; xmlns:xop="http://www.w3.org/2004/08/xop/include"; xmlns:senc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:s12env="http://www.w3.org/2003/05/soap-envelope/"; xmlns:s12enc="http://www.w3.org/2003/05/soap-encoding/"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:senv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; targetNamespace="http://awesome.service.com/"; elementFormDefault="qualified"> <xs:import namespace="http://awesome.service.com/"; schemaLocation="tns.xsd"/>
  [... model definitions ...]
</xs:schema>
------------------------

... ideas? i have to step away from this for now, but it seems like we are just about there.

--

C Anthony



-----------------------------------------
CONFIDENTIALITY: The information contained in this communication may be 
confidential and is intended only for the use of the intended recipient(s). If 
the reader of this message is not the intended recipient(s), you are hereby 
notified that
any dissemination, distribution, or copying of this communication, or any of 
its contents, is strictly prohibited. If you have received this communication 
in error, please return it to the sender immediately and delete any copy of it 
from your computer system.
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to