我有两个必需的xml元素,它们被强制转换为请求类并随响应一起传递。 示例:
<businessName>xyz</businessName>
<userId>abc</userId>
我想删除一个<businessName>
元素,并将它的数据设置为一个请求,并通过仅发送userId发送出去以获得响应。
我的问题是无法修改客户端程序包或wsdl,我确实希望通过仅传递一个使用SOPAUI测试的元素来获得响应,并且它可以正常工作。
但是,如何从请求类中删除xmlelement并传递到JAVA中呢?
下面是一个代码段
public GetDataScoreResponse getDataScore(String url, GetDataScoreRequest getDataScoreRequest) throws Exception {
Long starttime = System.currentTimeMillis();
GetDataScoreResponse resp = new GetDataScoreResponse();
AdminServicePortType port = null ;
try{
port = getPortType(url);
((Stub)port).setTimeout(30000);
resp = port.getDataScore(getDataScoreRequest);
}
在上面的代码段中,如何删除getDataScoreRequest.getBusinessName()