从JAXWS请求中删除标头

时间:2013-05-02 07:40:27

标签: jax-ws

我使用jaxws生成客户端存根。当请求进入服务器时,我想从它中删除一个特定的soap标头,然后才能将它传递给服务器进行处理。我试图添加handler chain,但并非我的所有请求都通过添加的处理程序。有没有其他方法可以做到这一点。下面是请求xml的soap标头示例。我想删除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>

0 个答案:

没有答案