On Tue, Feb 7, 2012 at 1:32 AM, Karl Putland <k...@simplesignal.com> wrote:
> Schema, generated source are available, but it's 65MB zipped.
> I can send or make available privately.
>
It does look like there's a bug there if {C}AuthenticationResponse exists
as a complex type, but digging through 65MB of compressed material to try
to track it down is beyond the level of support I can donate. If you file
a trac ticket I'll see if I can figure out next time I'm poking at PyXB; if
you provide a small reproducing case by extracting the relevant parts of
the schema for namespace "C" and a copy of the response document, that'll
speed things up.
Peter
> --Karl
>
> >>> import ocibase
> >>> import bwas
> >>> import socket
> >>> # snipped socket setup
> >>> ar = ocibase.BroadsoftDocument(protocol="OCI", sessionId='d3cafbad',
> command=[bwas.AuthenticationRequest(userId='karllab!'),])
> >>> ar.toxml()
> u'<?xml version="1.0" ?><ns1:BroadsoftDocument protocol="OCI"
> xmlns:ns1="C"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><sessionId>d3cafbad</sessionId><command
> xsi:type="AuthenticationRequest"><userId>xxxxxx</userId></command></ns1:BroadsoftDocument>'
> >>> s.sendall(ar.toxml())
> >>> res = s.recv(4096)
> >>> res
> '<?xml version="1.0" encoding="UTF-8"?>\n<BroadsoftDocument protocol="OCI"
> xmlns="C" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><sessionId
> xmlns="">d3cafbad</sessionId><command echo=""
> xsi:type="AuthenticationResponse"
> xmlns=""><userId>xxxxxx</userId><nonce>1328599257348</nonce><passwordAlgorithm>MD5</passwordAlgorithm></command></BroadsoftDocument>\n'
> >>> ocibase.CreateFromDocument(res)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "ocibase.py", line 32, in CreateFromDocument
> saxer.parse(StringIO.StringIO(xml_text))
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/sax/expatreader.py",
> line 107, in parse
> xmlreader.IncrementalParser.parse(self, source)
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/sax/xmlreader.py",
> line 123, in parse
> self.feed(buffer)
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/sax/expatreader.py",
> line 207, in feed
> self._parser.Parse(data, isFinal)
> File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/sax/expatreader.py",
> line 338, in start_element_ns
> AttributesNSImpl(newattrs, qnames))
> File
> "/Library/Python/2.6/site-packages/PyXB-1.1.3-py2.6.egg/pyxb/binding/saxer.py",
> line 329, in startElementNS
> (did_replace, type_class) =
> XSI._InterpretTypeAttribute(attrs.getValue(self.__XSITypeTuple), ns_ctx,
> None, type_class)
> File
> "/Library/Python/2.6/site-packages/PyXB-1.1.3-py2.6.egg/pyxb/namespace/builtin.py",
> line 103, in _InterpretTypeAttribute
> type_en = ns_ctx.interpretQName(type_name,
> namespace=fallback_namespace)
> File
> "/Library/Python/2.6/site-packages/PyXB-1.1.3-py2.6.egg/pyxb/namespace/resolution.py",
> line 611, in interpretQName
> raise pyxb.SchemaValidationError('QName %s with absent default
> namespace cannot be resolved' % (local_name,))
> pyxb.exceptions_.SchemaValidationError: QName AuthenticationResponse with
> absent default namespace cannot be resolved
> >>>
>
>
>
> --Karl
>
> Karl Putland
> Senior VoIP Engineer
>
> *SimpleSignal*
> 3600 S Yosemite, Suite 150
> Denver, CO 80237
> One Number Rings All My Phones: 303-242-8608
>
> SimpleSignal.com <http://www.simplesignal.com/> |
> Blog<http://www.simplesignal.com/blog>
> | Facebook <http://www.facebook.com/SimpleSignal?ref=ts> |
> Twitter<http://twitter.com/simplesignal>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> pyxb-users mailing list
> pyxb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyxb-users
>
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users