Exemple #1
0
 def test_qualified(self):
     """
     `split_qualified` splits a qualified XML name into a URI and the tag
     name.
     """
     self.assertEqual(('http://example.com', 'tag'),
                      split_qualified('{http://example.com}tag'))
Exemple #2
0
 def test_qualified(self):
     """
     `split_qualified` splits a qualified XML name into a URI and the tag
     name.
     """
     self.assertEqual(
         ('http://example.com', 'tag'),
         split_qualified('{http://example.com}tag'))
Exemple #3
0
    def process(self, request, body, header=None):
        """
        Process a SOAP request.
        """
        for child in body.getchildren():
            # Since there is no SOAPAction header, and these requests are not
            # made to different endpoints, the only way to handle these is to
            # switch on the root element's name. Yuck.
            localname = split_qualified(child.tag)[1]
            meth = getattr(self, 'process_' + localname, self.process_unknown)
            return meth(child, header, localname)

        raise SoapFault(u'soapenv:Client', u'No actionable items')
Exemple #4
0
 def test_local(self):
     """
     `split_qualified` splits a local XML name into `None` and the tag name.
     """
     self.assertEqual((None, 'tag'), split_qualified('tag'))
Exemple #5
0
 def test_local(self):
     """
     `split_qualified` splits a local XML name into `None` and the tag name.
     """
     self.assertEqual((None, 'tag'), split_qualified('tag'))