<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Burak,<br>
I was able to monkey-patch the lib allowing it to carry and treat a
_out_result_name kwarg and substitute when building response /
result name, and it kinda works. Unfortunately I couldn't fix
totally my issue.<br>
The problem is the client that is consuming my spyne webservice is
based on Java JAX WS lib. It is right now able to call the method
and receive the response, but however finds null on all the returned
values on that ComplexModel return thing.<br>
I have a response that works on the java app (generated by itself
when in emulator mode), and one generated by the real spyne app that
doesnt and provide null values to the client.<br>
This one works:<br>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US"><S:Envelope
xmlns:S="<a
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
<S:Body><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
</span>
<span style="font-family:"Courier New""><RecuperaInfoSoftwareResponse
xmlns="tns" xmlns:ns2="<a
href="http://www.tse.jus.br/secad/produtos/biometria/tiposComuns">http://www.tse.jus.br/secad/produtos/biometria/tiposComuns</a>"
xmlns:ns3="<a
href="http://standards.iso.org/iso-iec/19794/-1/">http://standards.iso.org/iso-iec/19794/-1/</a>"
xmlns:ns4="<a
href="http://standards.iso.org/iso-iec/19794/-4/">http://standards.iso.org/iso-iec/19794/-4/</a>"><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
<ns2:fabricante>SECAD/STI/TSE</ns2:fabricante><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
<ns2:dataLiberacao>2015-04-22T19:51:59.295-03:00</ns2:dataLiberacao><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
<ns2:versao>0.0.1</ns2:versao><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
<ns2:outrasInfo>Implementação DEMO do "lado
servidor"</ns2:outrasInfo><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New""> </span><span
style="font-family:"Courier New"" lang="EN-US"></RecuperaInfoSoftwareResponse><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
</S:Body><o:p></o:p></span></small></small></small></p>
<small><small><small>
<span style="font-family:"Courier New"" lang="EN-US"></S:Envelope></span></small></small></small><br>
<br>
and this want doesnt:<br>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US"><senv:Envelope
xmlns:tns="tns" xmlns:senv="<a
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>"><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
<senv:Body><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
<<b><span style="color:red">tns:</span></b>RecuperaInfoSoftwareResponse><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
<tns:outrasInfo>{'product_id': 'WATSON MINI',
'software_version': '3.1.4', 'software_vendor': 'BioLogica
Sistemas SA', 'device_state': '0',
'software_release_date': '02/04/2015', 'serial_number':
'1236-00083', 'device': '\n ', 'infoSoftwareXml':
'\n ', 'firmware_version':
'1.0.2'}</tns:outrasInfo><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"" lang="EN-US">
</span><span style="font-family:"Courier New""><tns:fabricante>Biologica
Sistemas</tns:fabricante><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
<tns:versao>3.1.4</tns:versao><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
<tns:dataLiberacao>02/04/2015</tns:dataLiberacao><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
</tns:RecuperaInfoSoftwareResponse><o:p></o:p></span></small></small></small></p>
<small><small><small>
</small></small></small>
<p class="MsoNormal"><small><small><small><span
style="font-family:"Courier New"">
</senv:Body><o:p></o:p></span></small></small></small></p>
<small><small><small>
<span style="font-family:"Courier New""></senv:Envelope></span></small></small></small><br>
<br>
They really seem quite similar with only namespace compatible
differences. Do you have any clue what could be wrong or any
experience dealing with JAX WS clients ?<br>
<br>
Thank you !<br>
<br>
<br>
<div class="moz-cite-prefix">On 4/21/2015 12:31 PM, Burak Arslan
wrote:<br>
</div>
<blockquote cite="mid:55366D53.7000301@arskom.com.tr" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<br>
<br>
<div class="moz-cite-prefix">On 04/21/15 06:52, Patricio Stegmann
Gmail wrote:<br>
</div>
<blockquote cite="mid:5535C96E.5080102@gmail.com" type="cite">The
bare parameter is forcing me to have, for the decorated
function, only one parameter of input, </blockquote>
<br>
SOAP defines a way to map an XML document to a method call.
Actually, that's like this for every serialization standard / RPC
standard pair. For example JsonRPC is a standard to map an
incoming json document to a method call. XmlRpc is another way of
mapping xml documents to method calls, etc.. <br>
<br>
So in normal (non-bare) mode, you define your method and Spyne
generates needed input and output objects for you. In bare mode,
it's your job to define these objects. That's why you can only
have a single input and single output object.<br>
<br>
So if your method needs to take two arguments, you have to do what
Spyne does behind the scenes and define a complex model that has
two attributes and use that object as type of the single argument
to your method.<br>
<br>
The "one object == one method call" is the fundamental design
principle behind Spyne[1].<br>
<br>
If that's clear, let's get back to your case. You need:<br>
<blockquote>class InitializeRequest(ComplexModel):<br>
__type_name__ = 'Initialize'<br>
__namespace__ = 'tns' # whatever you passed to your app as
tns argument<br>
<br>
_type_info = [<br>
('id', Unicode),<br>
('name', Unicode),<br>
]<br>
</blockquote>
and<br>
<blockquote>class SomeService(ServiceBase):<br>
@rpc(InitializeRequest, _body_style='bare')<br>
def wicked(ctx, request):<br>
print "id:", request.id<br>
print "name:", request.name<br>
<br>
</blockquote>
If you need to have the namespace of your incoming object
different from your app's tns, you need latest code from
github.com/arskom/spyne. I just found out 2.11 doesn't support
that.<br>
<br>
I hope this helps.<br>
<br>
Best,<br>
Burak<br>
<br>
[1]: That doesn't mean one document can't contain more than one
object, but that's not implemented because I don't see the point.<br>
<br>
</blockquote>
<br>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="http://www.avast.com/">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
This email has been checked for viruses by Avast antivirus software.
<br><a href="http://www.avast.com/">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
</body>
</html>