XML RPC强类型类

时间:2018-08-09 19:16:47

标签: c# xml-rpc xml-rpc.net

我正在将XML RPC用于ASP.NET。我正在尝试为XML创建强类型的类,但无法从此XML中检索ID。

这是我的课程:

    [XmlRpcMissingMapping(MappingAction.Ignore)]
    public class AdditionalInformation
    {
        private AuthorizeCards _authorize_cards;

        public AuthorizeCards authorize_cards
        {
            get { return _authorize_cards; }
            set { _authorize_cards = value; }
        }
    }

    [XmlRpcMissingMapping(MappingAction.Ignore)]
    public class AuthorizeCards
    {
        public AuthorizeCard AuthorizeCard { get; set; }
    }

    [XmlRpcMissingMapping(MappingAction.Ignore)]
    public class AuthorizeCard
    {
        public string id { get; set; }
    }

这是我的XML:

<member>
                           <name>additional_information</name>
                           <value>
                              <struct>
                                 <member>
                                    <name>authorize_cards</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>30962b8bc268c157cd104d53461d957c</name>
                                             <value>
                                                <struct>
                                                   <member>
                                                      <name>id</name>
                                                      <value>
                                                         <string>30962b8bc268c157cd104d53461d957c</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>requested_amount</name>
                                                      <value>
                                                         <string />
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>balance_on_card</name>
                                                      <value>
                                                         <string />
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>last_trans_id</name>
                                                      <value>
                                                         <string>40861203372</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>processed_amount</name>
                                                      <value>
                                                         <string>224.74</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_type</name>
                                                      <value>
                                                         <string>AE</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_owner</name>
                                                      <value>
                                                         <nil />
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_last4</name>
                                                      <value>
                                                         <string>7000</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_exp_month</name>
                                                      <value>
                                                         <string>2</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_exp_year</name>
                                                      <value>
                                                         <string>2021</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_ss_issue</name>
                                                      <value>
                                                         <nil />
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_ss_start_month</name>
                                                      <value>
                                                         <nil />
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>cc_ss_start_year</name>
                                                      <value>
                                                         <nil />
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>captured_amount</name>
                                                      <value>
                                                         <string>224.74</string>
                                                      </value>
                                                   </member>
                                                </struct>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                              </struct>
                           </value>
                        </member>

0 个答案:

没有答案