java使用jax rpc SOAP消息处理程序更改SOAP消息中的命名空间
我试图在jax-rpcsoap消息处理程序中使用saajapi修改soap请求中元素的名称空间
例如:
<\s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<\s:Body>
<\ns2:getAllGeneratedPasswords\>xmlns:ns2="http://service.services.manufacturing.evse.inds.ge.com/">
<\ps1:userType xmlns="ps1:http://sdsdf.asdasd">user<\/ps1:userType>
<\/ns2:getAllGeneratedPasswords>
<\/s:Body>
<\/s:Envelope>
在上面的soap请求中,我想更改:
xmlns:ns2="http://service.services.manufacturing.evse.inds.ge.com/"
到
xmlns:ns2="http://service.company.com/"
import javax.xml.rpc.handler.GenericHandler
import....
import...
public class ServiceHandler extends GenericHandler{
public boolean handleRequest(SOAPMessageContext arg0) {
//manipulate namespace here
}
}
共 (0) 个答案