1

最近,我进行了一项集成工作,尝试使 WCF 与旧版 Java 肥皂服务一起工作。在通过 wsdl 命令生成代理后,我们发现 WCF 生成的肥皂消息未针对该服务进行验证。

<?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" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
    <wsse:Security soap:mustUnderstand="1">
        <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-e497560b-df45-457d-b60d-1dd68430eec8">
            <wsse:Username xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">.....</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">.....</wsse:Password>
        </wsse:UsernameToken>
        <OrganizationToken xmlns="http://www.strongmail.com/services/2009/03/02/schema">
            <organizationName xmlns="">.....</organizationName>
        </OrganizationToken>
    </wsse:Security>
</soap:Header>
<soap:Body>
    <list xmlns="http://www.strongmail.com/services/2009/03/02/schema">
        <filter xsi:type="SystemAddressFilter">
            <isAscending>true</isAscending>
            <pageNumber>0</pageNumber>
            <recordsPerPage>10</recordsPerPage>
            <typeCondition>
                <value>FROM</value>
                <operator>EQUAL</operator>
            </typeCondition>
        </filter>
    </list>
</soap:Body>

但是java服务期望

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
    <wsse:Security soap:mustUnderstand="1">
        <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-e497560b-df45-457d-b60d-1dd68430eec8">
            <wsse:Username xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">.....</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">.....</wsse:Password>
        </wsse:UsernameToken>
        <OrganizationToken xmlns="http://www.strongmail.com/services/2009/03/02/schema">
            <organizationName xmlns="">.....</organizationName>
        </OrganizationToken>
    </wsse:Security>
</soap:Header>
<soap:Body>
    <list xmlns="http://www.strongmail.com/services/2009/03/02/schema">
        **<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SystemAddressFilter">**
            <isAscending>true</isAscending>
            <pageNumber>0</pageNumber>
            <recordsPerPage>10</recordsPerPage>
            <typeCondition>
                <value>FROM</value>
                <operator>EQUAL</operator>
            </typeCondition>
        </filter>
    </list>
</soap:Body>

任何人都知道是否只有一个属性或设置可以进行更改?

4

0 回答 0