jax-rpc ソープ メッセージ ハンドラで saaj api を使用して、ソープ リクエスト内の要素の名前空間を変更しようとしています。
例:
<\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
}
}