简体   繁体   English

ksoap2发送具有属性类型的抽象类

[英]ksoap2 sending an abstract class with attribute type

I'm having a problem creating a request from Ksoap2 on BlackBerry, I have to create the following XML: 我在从BlackBerry上的Ksoap2创建请求时遇到问题,我必须创建以下XML:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pol="http://osde.com.ar/services/binaria/personas/poliza" xmlns:bin="http://binaria.entities.osde.com.ar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <pol:getPoliza>
         <!--Optional:-->
         <pol:polizaVinculada i:type="bin:PolizaVinculadaVIT">
            <bin:idPoliza>49116</bin:idPoliza>
            <bin:idSolicitud>30261352</bin:idSolicitud>
         </pol:polizaVinculada>
      </pol:getPoliza>
   </soapenv:Body>
</soapenv:Envelope>

With the i:type="bin:PolizaVinculadaVIT" , being polizaVinculada an abstract class and PolizaVinculadaVIT a subclass of PolizaVinculada i:type="bin:PolizaVinculadaVIT" ,作为polizaVinculada一个抽象类, PolizaVinculadaVIT的子类PolizaVinculada

Does anybody know how to do this ? 有人知道怎么做这个吗 ?

Thanks 谢谢

I think the problem is about sending complex objects. 我认为问题在于发送复杂对象。

You can find more info about it on the following site: http://seesharpgears.blogspot.com/2010/10/ksoap-android-web-service-tutorial-with.html 您可以在以下网站上找到有关它的更多信息: http : //seesharpgears.blogspot.com/2010/10/ksoap-android-web-service-tutorial-with.html

In summary your PolizaVinculada must implement the KvmSerializable interface and then add the mapping to the Soap envelope. 总之,您的PolizaVinculada必须实现KvmSerializable接口,然后将映射添加到Soap信封中。

Saludos. 礼炮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM