2

这让我感到困惑,我希望这是我的一个愚蠢的疏忽。当我调用以下 Web 服务时,如果遇到空参数,则以下所有参数均为空(或数字为零)。

[OperationContract, ProtoBehavior]
[ServiceKnownType(typeof(ServiceFault))]
[FaultContract(typeof(ServiceFault))]
PersonProfileMessagePart Create(ObjectId person, ObjectId industry, int yearsInIndustry, ObjectId occupation, string occupationFreeText,
                                int yearsInOccupation, string maritalStatus, string educationLevel, 
                                List<ChildMessagePart> children, FinancialProfileMessagePart financialProfile,
                                List<ObjectId> traits);

例如,如果personyearsInIndustry存在但不存在industry,所有参数包括yearsInIndustry默认为空/零。我需要应用其他属性吗?

{edit} 我的错。Marc,它是带有自定义绑定的 WCF。

<customBinding>
    <binding name="ServiceFedBinding">
        <security authenticationMode="SecureConversation">
            <secureConversationBootstrap authenticationMode="IssuedToken">
                <issuedTokenParameters tokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1">
                    <issuer address="http://links-dev:91/security/authentication/securetokenservice.svc/" binding="wsHttpBinding">
                        <identity>
                            <dns value="LINKS"/>
                        </identity>
                    </issuer>
                    <issuerMetadata address="http://links-dev:91/security/authentication/securetokenservice.svc/mex"/>
                </issuedTokenParameters>
            </secureConversationBootstrap>
        </security>

提前致谢。麦克风

4

0 回答 0