使用/ Proto Behavior和多个参数调用WCF服务

时间:2009-09-09 21:04:04

标签: wcf protobuf-net

这让我感到困惑,我希望这对我来说是一个愚蠢的疏忽。当我调用以下Web服务时,如果遇到null参数,则所有后续参数都为null(对于数字而言为零)。

[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在内的所有参数都默认为null / 0。是否需要应用其他属性?

{编辑} 我的错。 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>

                                                        

提前致谢。 麦克

0 个答案:

没有答案
相关问题