我正在使用JAXWS方式构建SOAP Web服务。当我部署项目并使用SOAP UI检查请求时,我看到了一些我不想要的前缀。任何人都可以告诉我如何克服这个问题吗?
这是我的代码
@WebService
public interface Transaction {
@WebMethod(action="createPurchase", operationName = "purchase")
ResultDto purchase(@WebParam(name = "PurchaseRequest") PurchaseRequest request) throws SQLException, ClassNotFoundException;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "PurchaseRequest")
public class PurchaseRequest implements Serializable {
private static final long serialVersionUID = 1L;
@XmlElement(name = "invoiceId", required = true)
protected String invoiceId;
// Getters and setters
}
当我在SOAP UI中提供wsdl时,这就是形成的请求
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.qiib.com/">
<soapenv:Header/>
<soapenv:Body>
<ser:purchase> --> namespace
<!--Optional:-->
<PurchaseRequest>
<invoiceId>?</invoiceId>
</PurchaseRequest>
</ser:purchase>
</soapenv:Body>
</soapenv:Envelope>
你看到前缀<ser
:我不希望这个ser:
作为前缀,我能不能
非常感谢任何想法。