2017-04-26 57 views
0

我已经定义web服务的数据输入的Eclipse生成WSDL使用的Java类minOccus = 0设置

import java.util.Date; 

public class MaterialDoc { 
    public String workid; 
    public String mblnr; 
    public double mblpo; 
} 

一个Java类,并定义一个web服务

public class MaterialInterface { 

    public void generateProcess(Material[] inboundDocs) { 
     // do something 
    } 
} 

使用Eclipse的生成所产生的web服务像下面的WSDL

<complexType name="Material"> 
    <sequence> 
     <element name="workid" nillable="true" type="xsd:string"/> 
     <element name="mblnr" nillable="true" type="xsd:string"/> 
     <element name="mblpo" type="xsd:double"/> 

但是,我想允许一些标签是可选的,WSDL像

<element name="workid" minOccurs="0" nillable="true" type="xsd:string"/> 

如何调整我的Java类?有什么想法?

回答

0

mblpo从基本类型double更改为对象Double

+0

将数据类型double更改为Double仍然不显示minOccurs =“0” –