【发布时间】:2010-12-10 09:21:15
【问题描述】:
在 cxf 网络服务中我的请求是
<student>
<name>jaleel</name>
<age>26</age>
</student>
这里我想把年龄作为可选的
怎么可能;
我在 cxf 中使用 spring java。
我的终点是
<bean id="tsetService" class="com.maxartists.tsm.server.TestServiceImpl"></bean>
<jaxws:endpoint id="issure_password_request"
address="/testserver">
<jaxws:implementor>
<bean parent="tsetService" />
</jaxws:implementor>
</jaxws:endpoint>
我的网络服务方法是
@WebService
public interface TestService {
@WebMethod
public String test( Testvo type);
@WebMethod
public Result validation(@WebParam(name="pwvalue") Studentvo ipvo);
这是我的参数类型
公开课 Studentvo { 字符串名称; 年龄;
public String getName() {
return name;
}
public void setName(String name) {
this.name= name;
}
public void setAge(int age){
this.age = age;
}
公共 int getAge(){ 回归年龄; }
【问题讨论】: