一次WebService调试的遗留问题

分类:Tech | 作者:Shoopman | 发表于2009/07/10 没有评论  

    在上一篇《一次WebService调试》里,简单的完成了WebService的开发与调用,但还存在着两个问题:

1.客户端生成的代码里,RemoteUser这个对象,每个属性并不是预想中的String,而是javax.xml.bind.JAXBElement<String>。

    这个问题可以使用aegis来处理,在RemoteUser所在的包下添加一个RemoteUser.aegis.xml文件,如下:

<?xml version="1.0" encoding="UTF-8"?>
<mappings xmlns:tns="http://www.xxx.com/services/nopService”>
    <mapping name="tns:RemoteUser">
        <property minOccurs="1" maxOccurs="1" nillable="true" name="fax" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="mail" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="mobile" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="name" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="post" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="pwd" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="sex" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="telephone" />
        <property minOccurs="1" maxOccurs="1" nillable="true" name="uid" />
    </mapping>
</mappings>

2.客户端生成的代码里,getAccount()的返回值GetAccountResponse里的并不是预想中的List<RemoteUser>,而是一个ArrayOfRemoteUser对象中再包了一个类型为List<RemoteUser>的属性。

     现在这个问题还没有解决。。。。。。

日志信息 »

该日志于2009-07-10 09:39由 Shoopman 发表在Tech分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。
目前盖楼 (0)层:

发表评论 »

« »