From fmezas at gmail.com Wed Jun 5 22:40:38 2013 From: fmezas at gmail.com (Francisco Meza) Date: Wed, 5 Jun 2013 13:40:38 -0700 Subject: [Soap-Python] spyne: incorrect order of elements is wsdl? Message-ID: hi is it just me or the order of element in the wsdl generated by spyne is not the standard one defined in http://www.w3.org/TR/wsdl from spyne I get: definition types message service portType binding in http://www.w3.org/TR/wsdl I see (in http://www.w3.org/TR/wsdl#A4.1) a schema that indicates the sequence should be definition types message portType binding service this causes problems with strict client tools like the one provided by SAP Francisco -------------- next part -------------- An HTML attachment was scrubbed... URL: From joni.kivinen at simosol.fi Mon Jun 10 08:18:35 2013 From: joni.kivinen at simosol.fi (Joni Kivinen) Date: Mon, 10 Jun 2013 09:18:35 +0300 Subject: [Soap-Python] spyne: incorrect order of elements is wsdl? In-Reply-To: References: Message-ID: Well, I know I ran into some problems with the soap class generation with a strict wsdl requirement, since it's in dictionary sorted order by default. My solution was essentially: from spyne.util.odict import odict from spyne.model.primitive import String, Integer, Double from spyne.model.complex import ComplexModelBase od = odict() od['One] = String od['Two'] = Double od['Three'] = Integer MyClass = ComplexModelBase.produce('http://namespace.com', 'MyClass', od) Hope it helps, - Joni 2013/6/5 Francisco Meza > hi > > is it just me or the order of element in the wsdl generated by spyne is > not the standard one defined in http://www.w3.org/TR/wsdl > > from spyne I get: > > definition > types > message > service > portType > binding > > in http://www.w3.org/TR/wsdl I see (in http://www.w3.org/TR/wsdl#A4.1) a > schema that indicates the sequence should be > > definition > types > message > portType > binding > service > > this causes problems with strict client tools like the one provided by SAP > > Francisco > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.fialkoff at setaris.com Mon Jun 10 16:44:59 2013 From: joshua.fialkoff at setaris.com (Joshua Fialkoff) Date: Mon, 10 Jun 2013 10:44:59 -0400 Subject: [Soap-Python] XML Syntax error when calling method on Spyne Message-ID: Hello all, This is a continuation of this question on StackOverflow. Burak suggested I post here instead. I am using Spyne as a SOAP server and have tested it with suds. Everything works fine. However, when my customer sends a request, I get this error: [Django] ERROR: ' services_xxx_xxx xxxx ' The request body and request headers can be seen here: http://snipt.org/Aoaj6. I've run the request body through an XML validator and everything looks fine. I really have no idea why I'm getting this error. I hope you can help. Thanks! - Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From azurit at pobox.sk Mon Jun 10 17:18:35 2013 From: azurit at pobox.sk (azurIt) Date: Mon, 10 Jun 2013 17:18:35 +0200 Subject: [Soap-Python] =?utf-8?q?spyne_list_keys?= Message-ID: <20130610171835.4D15176B@pobox.sk> Hi, is it, somehow, possible to list/iter keys in spyne object (complex type, function parameter)? I'm only able to do: for i in parameter: .... but this is itering values, not key names. Thank you. azur From johnaherne at rocs.co.uk Tue Jun 11 21:00:04 2013 From: johnaherne at rocs.co.uk (John Aherne) Date: Tue, 11 Jun 2013 20:00:04 +0100 Subject: [Soap-Python] Add namespace to each element Message-ID: I have been playing with simplesoap for some soap client tests. So far no problem although it has been very simple stuff. Now I need to do some more and since I am not too clued up on Soap I have become stuck. I have got a namespace that I declare as ns='jah' and it gets added to the body elements as follows JJA 123456 What I would like but can't seem to work out is how I get the namespace 'jah' attached to each element. If anyone has any clues I would be very pleased. Thanks for any help -- *John Aherne* * * * * * * *www.rocs.co.uk * 020 7223 7567 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnaherne at rocs.co.uk Tue Jun 11 21:31:06 2013 From: johnaherne at rocs.co.uk (John Aherne) Date: Tue, 11 Jun 2013 20:31:06 +0100 Subject: [Soap-Python] Add namespace to each element Message-ID: My mistake. I meant to say that I need to add a prefix to each element. Sorry about that -- *John Aherne* * * * * * * *www.rocs.co.uk * 020 7223 7567 -------------- next part -------------- An HTML attachment was scrubbed... URL: From joshua.fialkoff at setaris.com Thu Jun 6 22:27:32 2013 From: joshua.fialkoff at setaris.com (Joshua Fialkoff) Date: Thu, 6 Jun 2013 16:27:32 -0400 Subject: [Soap-Python] XML Syntax Error when calling SOAP method on Spyne Message-ID: <01B9DB0A-EF37-465E-85AE-A007D74D413B@setaris.com> Hello all, This is a continuation of this question on StackOverflow. Burak suggested I post here instead. I am using Spyne as a SOAP server and have tested it with suds. Everything works fine. However, when my client sends a request, I get this error: [Django] ERROR: ' services_xxx_xxx xxxx ' I'm not really sure what the problem is and would very much appreciate some help. Here is the request body and headers for my suds request: services_quest_4quest<questxml>sdlkfjsdlkj</questxml> , POST:': [u''], u'questxml': [u''], u'lt': [u'', u''], u'services_xxxxxxxx']}>, COOKIES:{}, META:{'CONTENT_LENGTH': '518', 'CONTENT_TYPE': 'text/xml; charset=utf-8', 'HTTP_ACCEPT_ENCODING': 'identity', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_HOST': 'app.stage.thetestvault.com', 'HTTP_SOAPACTION': '"ReceiveLabTestResult"', 'HTTP_USER_AGENT': 'Python-urllib/2.7', 'HTTP_X_CLUSTER_CLIENT_IP': '10.176.0.61', 'HTTP_X_FORWARDED_FOR': '69.249.200.37,10.176.0.61', 'HTTP_X_FORWARDED_PORT': '80', 'HTTP_X_FORWARDED_PROTO': 'https', 'HTTP_X_FORWARDED_PROTOCOL': 'ssl', 'HTTP_X_INSTANCE_ID': '1681', 'PATH_INFO': u'/soap-api/quest/', 'QUERY_STRING': '', 'RAW_URI': '/soap-api/quest/', 'REMOTE_ADDR': '10.176.0.61', 'REMOTE_PORT': '80', 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'app.stage.thetestvault.com', 'SERVER_PORT': '443', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'gunicorn/0.14.5', 'gunicorn.socket': , 'wsgi.errors': ', mode 'w' at 0x7f4119b7e270>, 'wsgi.file_wrapper': , 'wsgi.input': , 'wsgi.multiprocess': False, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 0)}> Here is that information for the client request. I ran the request body through an XML validator and it seems to be fine: services_xxxx xxxx 11 NURSING No One SAP
1 SIR TYLER DRIVE, WILMTON NC 28405 999-999-9999
0022455 2263455130611ZKS 230611Z 111111111 DAVIS,ALYXANDREA MAR OTHER 1 20120418 1536 20120419 0649
20120419 1257 YNNNNNN 201204191256 5003117538
36 OTHER ID NG KS Quest Diagnostics-Lenexa KSAS01
10101 Renner Blvd Lenexa KS 66219
XVD
Quest Diagnostics-Holland Wellness Dri 3290 N Wellness Dr Holland MI 49424 616-399-3016 616-399-3017
6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 AMP AMPHETAMINES (1000 ng/mL SCREEN) 72431 D K R SAP 1000 500 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 BARB BARBITURATES 72443 D K R SAP 300 200 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 BENZ BENZODIAZEPINES 72451 D K R SAP 300 200 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 COC COCAINE METABOLITES 72432 D K R SAP 300 150 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 T50 MARIJUANA METABOLITES, (50 ng/mL SCREEN) 72452 D K R SAP 50 15 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 METD METHADONE 72454 D K R SAP 300 200 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 METQ METHAQUALONE 72455 D K R SAP 300 200 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 OPI2K OPIATES (2000 NG/ML SCREEN) 72726 D K R SAP 2000 2000 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 PCP PHENCYCLIDINE 72426 D K R SAP 25 25 A NEGATIVE 6633N 717833 SUBSTANCE ABUSE PANEL 10- 50, GC/MS CONFIRM SAP 10-50 GC/MS 0006633 PROP PROPOXYPHENE 72456 D K R SAP 300 200 A NEGATIVE
]]>
No stack trace available , POST:\n \n \n \n services_quest_4\n quest\n \n \n \n 11 \n NURSING \n No One \n SAP \n
\n 1 SIR TYLER DRIVE, \n WILMTON \n NC \n 28405 \n 999-999-9999 \n \n
\n
\n \n 0022455 \n 2263455130611ZKS \n 230611Z \n 111111111 \n DAVIS,ALYXANDREA MAR \n OTHER \n 1 \n 20120418 \n 1536 \n 20120419 \n 0649 \n \n \n \n
\n \n \n \n \n
\n
\n \n 20120419 \n 1257 \n YNNNNNN \n 201204191256 \n 5003117538 \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n
\n \n \n 36 \n OTHER ID \n NG \n \n \n \n \n \n \n \n \n KS \n Quest Diagnostics-Lenexa \n KSAS01 \n
\n 10101 Renner Blvd \n Lenexa \n KS \n 66219 \n
\n
\n \n XVD \n
\n Quest Diagnostics-Holland Wellness Dri \n 3290 N Wellness Dr \n \n Holland \n MI \n 49424 \n 616-399-3016 \n 616-399-3017 \n
\n
\n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n AMP \n AMPHETAMINES (1000 ng/mL SCREEN) \n 72431 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 1000 \n 500 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n BARB \n BARBITURATES \n 72443 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 300 \n 200 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n BENZ \n BENZODIAZEPI NES \n 72451 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 300 \n 200 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n COC \n COCAINE METABOLITES \n 72432 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 300 \n 150 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n T50 \n MARIJUANA METABOLITES, (50 ng/mL SCREEN) \n 72452 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 50 \n 15 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n METD \n METHADONE \n 72454 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 300< /ScreeningCutoff> \n 200 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n METQ \n METHAQUALONE \n 72455 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 300 \n 200 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n OPI2K \n OPIATES (2000 NG/ML SCREEN) \n 72726 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 2000 \n 2000 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n PCP \n PHENCYCLIDINE \n 72426 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 25 \n 25 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n 6633N \n 717833 \n SUBSTANCE ABUSE PANEL 10- \n 50, GC/MS CONFIRM \n SAP 10-50 GC/MS \n \n 0006633 \n \n PROP \n PROPOXYPHENE \n 72456 \n \n D \n K \n \n \n \n \n \n \n R \n SAP \n 300 \n 200 \n \n \n \n \n A \n NEGATIVE \n \n \n \n \n \n
]]>
\n
\n
\n']}>, COOKIES:{}, META:{'CONTENT_LENGTH': '14559', 'CONTENT_TYPE': 'text/xml;charset=UTF-8', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_HOST': 'app.stage.thetestvault.com', 'HTTP_SOAPACTION': '"ReceiveLabTestResult"', 'HTTP_USER_AGENT': 'Jakarta Commons-HttpClient/3.1', 'HTTP_X_CLUSTER_CLIENT_IP': '10.176.0.61', 'HTTP_X_FORWARDED_FOR': '198.70.194.61,10.176.0.61', 'HTTP_X_FORWARDED_PORT': '80', 'HTTP_X_FORWARDED_PROTO': 'https', 'HTTP_X_FORWARDED_PROTOCOL': 'ssl', 'HTTP_X_INSTANCE_ID': '1681', 'PATH_INFO': u'/soap-api/quest/', 'QUERY_STRING': '', 'RAW_URI': '/soap-api/quest/', 'REMOTE_ADDR': '10.176.0.61', 'REMOTE_PORT': '80', 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'app.stage.thetestvault.com', 'SERVER_PORT': '443', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'gunicorn/0.14.5', 'gunicorn.socket': , 'wsgi.errors': ', mode 'w' at 0x7f4119b7e270>, 'wsgi.file_wrapper': , 'wsgi.input': , 'wsgi.multiprocess': False, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 0)}> Thanks, Josh -------------- next part -------------- An HTML attachment was scrubbed... URL: From nullpuppy at gmail.com Fri Jun 7 21:08:40 2013 From: nullpuppy at gmail.com (Dustin Knie) Date: Fri, 7 Jun 2013 12:08:40 -0700 Subject: [Soap-Python] spyne: service with multiple namespaces Message-ID: I am in the process of implementing some existing WSDL in spyne, and I'm running into a problem where I have requests that contain multiple namespaces. For example, I have a request that looks like: blah When I send this request, I get the following back: senv:Client.SchemaValidationError <string>:1:0:ERROR:SCHEMASV:SCHEMAV_ELEMENT_CONTENT: Element '{www.example.com/schema/b}Baz': This element is not expected. Expected is one of ( {www.example.com/schema/a}Baz, {www.example.com/schema/a}Bar ). I've been looking at the documentation and setting options, and so far nothing has gotten me past this bump. Is this currently possible with spyne? Do I need to do more and parse the in_document? Any input would be greatly appreciated. An for more detail the code I've been messing with: from spyne.model.primitive import Unicode from spyne.model.complex import Iterable, XmlAttribute, ComplexModel, ComplexModelMeta, ComplexModelBase from spyne.service import ServiceBase from spyne.protocol.soap import Soap11 from spyne.application import Application from spyne.decorator import srpc, rpc class BazBase(ComplexModelBase): __namespace__ = "www.example.com/schema/b" __metaclass__ = ComplexModelMeta class Baz(BazBase): Thing = Unicode AttrC = XmlAttribute(Unicode) class FooService(ServiceBase): __namespace__ = "www.example.com/schema/a" @rpc(XmlAttribute(Unicode), XmlAttribute(Unicode), Baz, Unicode, _returns=Iterable(Unicode)) def Foo(ctx, AttrA, AttrB, Baz, Bar): yield 'Hello, %s' % Bar app = Application([FooService], "www.example.com/schema/a", in_protocol=Soap11(validator='lxml'), out_protocol=Soap11(), ) Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From johnaherne at rocs.co.uk Tue Jun 11 12:10:45 2013 From: johnaherne at rocs.co.uk (John Aherne) Date: Tue, 11 Jun 2013 11:10:45 +0100 Subject: [Soap-Python] Add namespace to each element Message-ID: I have been playing with simplesoap for some soap client tests. So far no problem although it has been very simple stuff. Now I need to do some more and since I am not too clued up on Soap I have become stuck. I have got a namespace that I declare as ns='jah' and it gets added to the body elements as follows JJA 123456 What I would like but can't seem to work out is how I get the namespace 'jah' attached to each element. If anyone has any clues I would be very pleased. Thanks for any help -- *John Aherne* * * * * * * *www.rocs.co.uk * 020 7223 7567 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjaherne at gmail.com Tue Jun 11 21:27:15 2013 From: jjaherne at gmail.com (John Aherne) Date: Tue, 11 Jun 2013 20:27:15 +0100 Subject: [Soap-Python] Add namespace to each element In-Reply-To: References: Message-ID: Of course what I meant to say was that I need to add a prefix to each element when using pysimplesoap. Sorry about that. John Aherne On Tue, Jun 11, 2013 at 8:00 PM, John Aherne wrote: > I have been playing with simplesoap for some soap client tests. > > So far no problem although it has been very simple stuff. > > Now I need to do some more and since I am not too clued up on Soap I have > become stuck. > > I have got a namespace that I declare as ns='jah' and it gets added to the > body elements as follows > > JJA > 123456 > > > > What I would like but can't seem to work out is how I get the namespace > 'jah' attached to each element. > > If anyone has any clues I would be very pleased. > > Thanks for any help > > -- > *John Aherne* > * > * > * > * > * > * > *www.rocs.co.uk > * > 020 7223 7567 > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From azurit at pobox.sk Tue Jun 18 14:40:24 2013 From: azurit at pobox.sk (azurIt) Date: Tue, 18 Jun 2013 14:40:24 +0200 Subject: [Soap-Python] =?utf-8?q?spyne_list_keys?= In-Reply-To: <20130610171835.4D15176B@pobox.sk> References: <20130610171835.4D15176B@pobox.sk> Message-ID: <20130618144024.EB58C668@pobox.sk> >Hi, > >is it, somehow, possible to list/iter keys in spyne object (complex type, function parameter)? I'm only able to do: >for i in parameter: > .... > >but this is itering values, not key names. Thank you. > >azur Ok, i found this solution (probably not the best but it's working): for i in parameter._type_info: print "key:", i, "value:", getattr(parameter, i) azur From burak.arslan at arskom.com.tr Fri Jun 28 09:36:35 2013 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 28 Jun 2013 10:36:35 +0300 Subject: [Soap-Python] Parsing XML Schema with Spyne Message-ID: <51CD3D03.7020904@arskom.com.tr> Hi, For the upcoming 2.11 release, I decided to work on Xml Schema parsing in Spyne. As you know, this is an important first step towards Wsdl parsing. I got an initial version working. The code is very incomplete now, no imports, no simpleTypes, nothing. https://github.com/arskom/spyne/blob/0ee100f289926fe4ce006bf671d1eef94dac2927/spyne/test/interface/test_xml_schema.py#L267 Currently, test_complex test passes, the following one (test_complex_with_customized_type) fails. As of 2.11, Spyne's XML modeling features got advanced enough to model the Xml Schema schema itself, so the initial "objectification" of the schema document was a breeze to get running (which implements suds.xsd (a ~3kloc package of suds) in 100 lines: https://github.com/arskom/spyne/blob/master/spyne/interface/xml_schema/defn.py The parse_schema function in https://github.com/arskom/spyne/blob/0ee100f289926fe4ce006bf671d1eef94dac2927/spyne/util/xml.py#L133 returns a dict of proper Spyne objects. Nothing is set in stone now, so ideas, tests and patches are welcome! Best regards, Burak