Burak,
There is the message, but inside is the result which has its own name. It is automatically generated with Result suffix, but my ws consumer didnt want that. He wanted the name of it's spec on it. I added that keyword and slightly changed some spyne lines. I had lot of issues using multiple namespaces, in the lxml output generation, which I managed to solve using git version, and now it seems to work ok. I have just a simple question. I need to be able to generate something like this:

<MyResponse>
  <Items>
    <ItemList ofType="b">
      <Item>blabla</Item>
      <Item>bleble</Item>
      <Item>blibli</Item>
    </ItemList>
    <ItemList ofType="c">
      <Item>clacla</Item>
      <Item>clecle</Item>
      <Item>clicli</Item>
    </ItemList>
  </Items>
</MyResponse>

For that I created ComplexModels:

class Item(ComplexModel):
    value = String

class ItemList(ComplexModel):
    Elements = Array(Item)

class MyResponse(ComplexModel):
    Items = Array(ItemList)

... (oversimplified) ...

obviously this creates an output similar to this:

<MyResponse>
  <Items>
    <Elements>
      <Item> .... </Item>
etc...
    </Elements>
  </Items>
</MyResponse>

the Elements part here is useless. However I dont know how I could append Item to an Items variable without declaring Elements as an internal variable, thus making it appear when serializing.
Am I doing something wrong here ????


On 23/04/2015 15:04, Burak Arslan wrote:


On 04/23/15 06:45, Patricio Stegmann wrote:
Burak,
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.

Wait, _out_message_name didn't work?


They really seem quite similar with only namespace compatible differences. Do you have any clue what could be wrong


Yes, namespaces of the spyne example are different, which is quite important in the xml world.

Could you put your service somewhere I can reach (e.g. github gist) I'd like to dig deeper and find out whether it's a Spyne bug.

Best,
Burak



---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
_______________________________________________
Soap mailing list
[email protected]
https://mail.python.org/mailman/listinfo/soap

Reply via email to