From carlos.palomares.external at airbus.com Thu Jun 18 10:27:39 2015 From: carlos.palomares.external at airbus.com (carlos.palomares.external at airbus.com) Date: Thu, 18 Jun 2015 12:27:39 +0200 Subject: [spyne] Array in Django SOAP webservice Message-ID: <984_1434623261_55829D1D_984_16696_1_7D150E064B6575478F02B835E527CD4D0F7B5E4E05@EMAILEADS01.eadscasa.casa.corp> Hi everybody, I have a problem with the type of Array in spyne, I am working with Django and my server is apache with wsgi.py in windows. I have these structures: class IncidenceData(ComplexModel): __namespace__ = http://my/__IncidenceManagement/service.wsdl' __mixin__ = True _type_info = { "Id": Integer, "Categoria": Unicode, "MSN": Unicode, "FSolicitud": Unicode, "Quien": Array(Unicode), "Problema": Unicode, "Solucion": Unicode, "Responsables": Array(Unicode), "FSolucion": Unicode, "Status": Unicode, "ValCierre": Unicode, } class ResponseDataQuery(ComplexModel): __namespace__ = http://my/__IncidenceManagement/service.wsdl' __mixin__ = True _type_info = { "message": Unicode, "codResultado": Integer, "Incidences": Array(IncidenceData), "IncidencesNotFound": Unicode, } And this method wich one I am using: @srpc(Array(Integer), _returns=ResponseDataQuery) def GetInfoIncidences(elementos): idNoEncontrados = "" resData = ResponseDataQuery() try: for p in elementos: try: incidenciaRes = Soporte.objects.get(pk=p) retval = IncidenceData() retval.Id= incidenciaRes.pk retval.Categoria= incidenciaRes.categoria retval.MSN= incidenciaRes.MSN retval.FSolicitud= incidenciaRes.fechaSolicitudSoporte retval.Quien= incidenciaRes.gastadas retval.Problema= incidenciaRes.descripcion retval.Solucion= incidenciaRes.solucion retval.Responsables= incidenciaRes.gastadas retval.FSolucion= incidenciaRes.gastadas retval.Status= incidenciaRes.estadoSoporte retval.ValCierre= incidenciaRes.gastadas resData.Incidences.append({'incidencia':retval}) except ObjectDoesNotExist: if idNoEncontrados == "": idNoEncontrados = str(p) else: idNoEncontrados = idNoEncontrados +";" + str(p) if idNoEncontrados!="": resData.message = "ERROR" resData.codResultado = 0 resData.IncidencesNotFound = idNoEncontrados return resData resData.message = "CORRECT" resData.codResultado = 1 return resData except Exception as mine: print mine print '%s (%s)' % (mine.message, type(mine)) resData.message = "Error en sistema DEMAT, Contacte con el administrador del sistema : " + '%s (%s)' % (mine.message, type(mine)) resData.codResultado = 0 return resData This line is all time making error in my system: 'NoneType' object has no attribute 'append' [Thu Jun 18 11:41:15 2015] [error] 'NoneType' object has no attribute 'append' () I don't what is the problem, the kind of data, the Array type maybe.............. I don't know anyone can help me? Thanks in advance. The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Thu Jun 18 11:11:12 2015 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 18 Jun 2015 14:11:12 +0300 Subject: [spyne] Array in Django SOAP webservice In-Reply-To: <984_1434623261_55829D1D_984_16696_1_7D150E064B6575478F02B835E527CD4D0F7B5E4E05@EMAILEADS01.eadscasa.casa.corp> References: <984_1434623261_55829D1D_984_16696_1_7D150E064B6575478F02B835E527CD4D0F7B5E4E05@EMAILEADS01.eadscasa.casa.corp> Message-ID: <5582A750.9020901@arskom.com.tr> Hello, On 06/18/15 13:27, carlos.palomares.external at airbus.com wrote: > > Hi everybody, > > > > I have a problem with the type of Array in spyne, I am working with > Django and my server is apache with wsgi.py in windows. I have these > structures: > > > > > > This line is all time making error in my system: > > 'NoneType' object has no attribute 'append' > > [Thu Jun 18 11:41:15 2015] [error] 'NoneType' object has no attribute > 'append' () > > > > I don?t what is the problem, the kind of data, the Array type > maybe????.. I don?t know anyone can help me? > > You must initialize the data with an empty array first, just like any other Python object. Try: resData = ResponseDataQuery(incidences=[]) hth, burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.palomares.external at airbus.com Thu Jun 18 11:33:56 2015 From: carlos.palomares.external at airbus.com (carlos.palomares.external at airbus.com) Date: Thu, 18 Jun 2015 13:33:56 +0200 Subject: [spyne] Array in Django SOAP webservice In-Reply-To: <29031_1434625878_5582A755_29031_8254_1_5582A750.9020901@arskom.com.tr> References: <984_1434623261_55829D1D_984_16696_1_7D150E064B6575478F02B835E527CD4D0F7B5E4E05@EMAILEADS01.eadscasa.casa.corp> <29031_1434625878_5582A755_29031_8254_1_5582A750.9020901@arskom.com.tr> Message-ID: <7202_1434627239_5582ACA6_7202_5885_1_7D150E064B6575478F02B835E527CD4D0F7B5E4FAC@EMAILEADS01.eadscasa.casa.corp> Great!!! Thanks a lot. De: Burak Arslan [mailto:burak.arslan at arskom.com.tr] Enviado el: jueves, 18 de junio de 2015 13:11 Para: Palomares Campos, Carlos (External); people at spyne.io Asunto: Re: [spyne] Array in Django SOAP webservice Hello, On 06/18/15 13:27, carlos.palomares.external at airbus.com wrote: Hi everybody, I have a problem with the type of Array in spyne, I am working with Django and my server is apache with wsgi.py in windows. I have these structures: This line is all time making error in my system: 'NoneType' object has no attribute 'append' [Thu Jun 18 11:41:15 2015] [error] 'NoneType' object has no attribute 'append' () I don't what is the problem, the kind of data, the Array type maybe.............. I don't know anyone can help me? You must initialize the data with an empty array first, just like any other Python object. Try: resData = ResponseDataQuery(incidences=[]) hth, burak The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.palomares.external at airbus.com Fri Jun 26 06:40:20 2015 From: carlos.palomares.external at airbus.com (carlos.palomares.external at airbus.com) Date: Fri, 26 Jun 2015 08:40:20 +0200 Subject: [spyne] change name of elements in wsdl working with dango app Message-ID: <4436_1435300822_558CF3D6_4436_1074_1_7D150E064B6575478F02B835E527CD4D0F7B78EE43@EMAILEADS01.eadscasa.casa.corp> This one is very important for me, I need change the name of specific elements in the wsdl, for example: or this others: the name, only the name, I suppose this should be so simple, because in java or .net you can change the name of these parameters without problems, but wiht this library I dont know how can I do it? I am working with Django app, so if for example I have this method; # Servicio SOAP class NewIncidenceService(ServiceBase): #Realiza la creacion de soportes/incidencias nuevos @srpc(SopoSoap, _returns=ResponseData) def NewIncidence(sop): try: What I need for changing these names? Thanks in advance. The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Fri Jun 26 07:13:47 2015 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 26 Jun 2015 10:13:47 +0300 Subject: [spyne] change name of elements in wsdl working with dango app In-Reply-To: <4436_1435300822_558CF3D6_4436_1074_1_7D150E064B6575478F02B835E527CD4D0F7B78EE43@EMAILEADS01.eadscasa.casa.corp> References: <4436_1435300822_558CF3D6_4436_1074_1_7D150E064B6575478F02B835E527CD4D0F7B78EE43@EMAILEADS01.eadscasa.casa.corp> Message-ID: <558CFBAB.3050406@arskom.com.tr> On 06/26/15 09:40, carlos.palomares.external at airbus.com wrote: > > What I need for changing these names? > and the docs didn't help? What did you try? -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.palomares.external at airbus.com Fri Jun 26 07:27:03 2015 From: carlos.palomares.external at airbus.com (carlos.palomares.external at airbus.com) Date: Fri, 26 Jun 2015 09:27:03 +0200 Subject: [spyne] change name of elements in wsdl working with dango app In-Reply-To: <17721_1435302828_558CFBAC_17721_1500_1_558CFBAB.3050406@arskom.com.tr> References: <4436_1435300822_558CF3D6_4436_1074_1_7D150E064B6575478F02B835E527CD4D0F7B78EE43@EMAILEADS01.eadscasa.casa.corp> <17721_1435302828_558CFBAC_17721_1500_1_558CFBAB.3050406@arskom.com.tr> Message-ID: <11793_1435303626_558CFECA_11793_4448_1_7D150E064B6575478F02B835E527CD4D0F7B78EF5B@EMAILEADS01.eadscasa.casa.corp> No, sorry :-S. the documentation is not very clear about that. De: Burak Arslan [mailto:burak.arslan at arskom.com.tr] Enviado el: viernes, 26 de junio de 2015 9:14 Para: Palomares Campos, Carlos (External); people at spyne.io Asunto: Re: [spyne] change name of elements in wsdl working with dango app On 06/26/15 09:40, carlos.palomares.external at airbus.com wrote: What I need for changing these names? and the docs didn't help? What did you try? The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free. -------------- next part -------------- An HTML attachment was scrubbed... URL: