我在Jax-WS中遇到问题,我公开的服务无法处理以下消息:
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<CCGW_CUSTOM_HEADER xmlns="">
<CCGW_CUSTOM_HEADER xmlns="Key"><?xml version="1.0" encoding="utf-16"?>&#xD;<CcgwCustomHeaderData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">&#xD; <ClientSystemType>ClientSystem</ClientSystemType>&#xD;</CcgwCustomHeaderData></CCGW_CUSTOM_HEADER>
</CCGW_CUSTOM_HEADER>
</S:Header>
<S:Body>
<HeartbeatRequest xmlns="http://my-site.com/CCGWCallback">
<conferenceId>this is a heartbeat</conferenceId>
</HeartbeatRequest>
</S:Body>
</S:Envelope>
但是,服务器能够处理此消息:
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<CCGW_CUSTOM_HEADER xmlns="">
<CCGW_CUSTOM_HEADER xmlns="Key"><?xml version="1.0" encoding="utf-16"?>&#xD;<CcgwCustomHeaderData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">&#xD; <ClientSystemType>ClientSystem</ClientSystemType>&#xD;</CcgwCustomHeaderData></CCGW_CUSTOM_HEADER>
</CCGW_CUSTOM_HEADER>
</S:Header>
<S:Body>
<ns2:HeartbeatRequest xmlns:ns2="http://my-site.com/CCGWCallback">
<conferenceId xmlns="">this is a heartbeat</conferenceId>
</ns2:HeartbeatRequest>
</S:Body>
</S:Envelope>
我想要的是找到一种方法来删除“:ns2”前缀。
我将非常感谢你的帮助。
Nadav