Ejemplo n.º 1
0
            public void Read(receiveCustomsDeclarationStatus_args structs, Protocol iprot)
            {
                if (true)
                {
                    string value;
                    value = iprot.ReadString();

                    structs.SetCustomsCode(value);
                }



                if (true)
                {
                    string value;
                    value = iprot.ReadString();

                    structs.SetUserId(value);
                }



                if (true)
                {
                    List <com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody> value;

                    value = new List <com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody>();
                    iprot.ReadListBegin();
                    while (true)
                    {
                        try{
                            com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody elem1;

                            elem1 = new com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody();
                            com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBodyHelper.getInstance().Read(elem1, iprot);

                            value.Add(elem1);
                        }
                        catch (Exception e) {
                            break;
                        }
                    }

                    iprot.ReadListEnd();

                    structs.SetBody(value);
                }



                Validate(structs);
            }
Ejemplo n.º 2
0
        public void Read(HtCustomsDeclarationStatusParams structs, Protocol iprot)
        {
            String schemeStruct = iprot.ReadStructBegin();

            if (schemeStruct != null)
            {
                while (true)
                {
                    String schemeField = iprot.ReadFieldBegin();
                    if (schemeField == null)
                    {
                        break;
                    }
                    bool needSkip = true;


                    if ("customsCode".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        string value;
                        value = iprot.ReadString();

                        structs.SetCustomsCode(value);
                    }



                    if ("userId".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        string value;
                        value = iprot.ReadString();

                        structs.SetUserId(value);
                    }



                    if ("body".Equals(schemeField.Trim()))
                    {
                        needSkip = false;
                        List <com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody> value;

                        value = new List <com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody>();
                        iprot.ReadListBegin();
                        while (true)
                        {
                            try{
                                com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody elem0;

                                elem0 = new com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBody();
                                com.vip.haitao.orderservice.service.HtCustomsDeclarationContentBodyHelper.getInstance().Read(elem0, iprot);

                                value.Add(elem0);
                            }
                            catch (Exception e) {
                                break;
                            }
                        }

                        iprot.ReadListEnd();

                        structs.SetBody(value);
                    }



                    if (needSkip)
                    {
                        ProtocolUtil.skip(iprot);
                    }

                    iprot.ReadFieldEnd();
                }

                iprot.ReadStructEnd();
                Validate(structs);
            }
            else
            {
                throw new OspException();
            }
        }