我曾经用来jaxws
生成客户端存根。当请求到达服务器时,我想从中删除特定的soap标头,然后才能将其传递给服务器进行处理。我试图添加handler chain
但不是我所有的请求都通过添加的处理程序。有没有其他方法可以做到这一点。下面是来自请求 xml 的肥皂头示例。我想删除ExchangeImpersonation
标题。
<S:Header>
<ExchangeImpersonation xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages">
<ConnectingSID>
<PrimarySmtpAddress>myemail@mysite.com</PrimarySmtpAddress>
</ConnectingSID>
</ExchangeImpersonation>
<MailboxCulture xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages">en-US</MailboxCulture>
<RequestServerVersion xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" Version="Exchange2010_SP1"/>
<TimeZoneContext xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages">
<TimeZoneDefinition Id="Eastern Standard Time"/>
</TimeZoneContext>
</S:Header>