Android Ksoap2 Setting the namespace for nested (children) types

后端 未结 1 1257
情书的邮戳
情书的邮戳 2020-12-20 09:55

I want to send an object, SBNInloggBegar, to a WCF web service. SBNInloggBegar contains the objects SBPBegar and SBPInloggning

相关标签:
1条回答
  • 2020-12-20 10:47

    I didn't declare any namespace for request, but I added a mapping to the specific type, like this:

    envelope.addMapping("http://www.statskontoret.se/sambruk/nyttomeddelanden", "SBNInloggBegar", SBNInloggBegar.class);
    envelope.addMapping("http://www.statskontoret.se/sambruk/sbpbegar", "SBPBegar", SBPBegar.class);
    envelope.addMapping("http://www.statskontoret.se/sambruk/sbpinloggning", "SBPInloggning", SBPInloggning.class);
    envelope.addMapping("http://www.statskontoret.se/sambruk/sbpsubjekt", "SBPSubjekt", SBPSubjekt.class);
    

    Also, I set implicitTypes to true.

    0 讨论(0)
提交回复
热议问题