0
我目前正在javaEE中開發一個jax-ws服務。一切工作正常,我能夠生成soapUI測試。但是當我訪問url中的wsdl時,它不顯示覆雜的類型定義。示例代碼如下:WSDL不包含複雜類型定義
@WebService
public interface AccountWs {
@WebMethod
ActionStatus createCustomer(@WebParam(name = "customer") CustomerDto postData);
}
@WebService(serviceName = "AccountWs", endpointInterface = "org.xxx.api.ws.AccountWs")
public class AccountWsImpl implements AccountWs {
@Override
public ActionStatus createCustomer(CustomerDto postData) {
}
}
@XmlRootElement(name = "Customer")
@XmlAccessorType(XmlAccessType.FIELD)
public class CustomerDto {
private String code;
}
我的另一個問題是如何生成的WSDL和其他屬性,如枚舉枚舉添加基數?上面的代碼應該產生類似於:
<xsd:complexType name="CustomerDto">
<xsd:sequence>
<xsd:element minOccurs="0" name="code" nillable="true" type="xsd:string"/>
...