救命啊C#连JAVA写的服务有安全信息头(header)对方取不到我发的头?我抓包看了一下,我的TAG好像和JAVA的不太一样,不知怎么改了,现在是JAVA方不能做任何改动,只能我这边改?怎么改呢:?
以下是我这边c#发送的头部文件:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
<soap:Header>
<Authentication xmlns=" http://handler.com">
<sequence>4</sequence>
<spid>username</spid>
<timestamp>20120824141932</timestamp>
<key>7945a5093d130845735648b7532d2b23</key>
<mode>0</mode>
<info />
</Authentication>
</soap:Header>
<soap:Body>
<sendMediaTask xmlns=" http://webservice.sports.huawei.com"><extMediaTasks>
<accessoryPath xsi:nil="true" xmlns=" http://webservice.sports.huawei.com/xsd" />
<content xmlns=" http://webservice.sports.huawei.com/xsd">test</content>
<priority xmlns=" http://webservice.sports.huawei.com/xsd">1008002</priority>
<receiverInfo xmlns=" http://webservice.sports.huawei.com/xsd">13288888888</receiverInfo>
<sendNo xmlns=" http://webservice.sports.huawei.com/xsd">114</sendNo>
<serviceId xsi:nil="true" xmlns=" http://webservice.sports.huawei.com/xsd" />
<spId xsi:nil="true" xmlns=" http://webservice.sports.huawei.com/xsd" />
<staffNo xsi:nil="true" xmlns=" http://webservice.sports.huawei.com/xsd" />
<subject xmlns=" http://webservice.sports.huawei.com/xsd">subject test</subject>
</extMediaTasks></sendMediaTask></soap:Body></soap:Envelope>
以下是JAVA发送的信息头,能正确解析的,上面的是C#发送的,但是JAVA不能正常解析:<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Authentication xmlns:wsse="http://handler.com">
<wsse:sequence>4</wsse:sequence>
<wsse:spid>username</wsse:spid>
<wsse:timestamp>20120824141932</wsse:timestamp>
<wsse:key>7945a5093d130845735648b7532d2b23</wsse:key>
<wsse:mode>0</wsse:mode>
<wsse:info />
</wsse:Authentication>
</soapenv:Header>
<soapenv:Body>
<sendMediaTask xmlns="http://webservice.sports.huawei.com">
<item0 xmlns="" type="com.huawei.sports.webservice.ExtMediaTaskBean">
<accessoryPath />
<content>123SDA</content>
<priority xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true" />
<receiverInfo>18688888888</receiverInfo>
<sendNo>10655116114</sendNo>
<sendTime>2012-05-25T05:00:00.000Z</sendTime>
<serviceId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true" />
<spId>username</spId>
<staffNo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:nil="true" />
<subject>SPTEST</subject>
</item0>
</sendMediaTask>
</soapenv:Body>
</soapenv:Envelope>