Exemplo n.º 1
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "Value"))
                    {
                        gxTv_SdtGridState_FilterValue_Value = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
 public virtual short readxmlcollection(GXXMLReader oReader, string sName, string itemName)
 {
     if (string.IsNullOrEmpty(sName))
     {
         return(readxmlcollectionUnwrapped(oReader, "", itemName));
     }
     else
     {
         try
         {
             if (oReader.LocalName == sName)
             {
                 ClearCollection();
                 oReader.Read();
                 readxmlcollectionUnwrapped(oReader, "", itemName);
             }
             return(1);
         }
         catch (Exception ex)
         {
             GXLogging.Error(log, "readxmlcollection error", ex);
             return(-1);
         }
     }
 }
Exemplo n.º 3
0
        public override short readxmlcollection(GXXMLReader oReader,
                                                String sName,
                                                String itemName)
        {
            short  currError;
            String sTagName;
            String itemName1;

            currError = 1;
            itemName1 = (String)(GetContainedName());
            if (!String.IsNullOrEmpty(StringUtil.RTrim(itemName)))
            {
                itemName1 = itemName;
            }
            if ((StringUtil.StrCmp(oReader.LocalName, itemName1) != 0) || (StringUtil.StrCmp(sName, itemName1) == 0))
            {
                currError = oReader.Read();
            }
            sTagName = oReader.Name;
            if (!String.IsNullOrEmpty(StringUtil.RTrim(sName)))
            {
                this.ClearCollection();
            }
            while ((StringUtil.StrCmp(oReader.Name, sTagName) == 0) && (oReader.NodeType == 1) && (currError > 0))
            {
                if (IsSimpleCollection() || (oReader.IsSimple == 0) || (oReader.AttributeCount > 0))
                {
                    currError = (short)(AddObjectInstance(oReader));
                }
                oReader.Read();
            }
            return(currError);
        }
Exemplo n.º 4
0
 public override void initialize( )
 {
     GXSoapHTTPRequest  = new GxHttpRequest(context);
     GXSoapXMLReader    = new GXXMLReader(context.GetPhysicalPath());
     GXSoapHTTPResponse = new GxHttpResponse(context);
     GXSoapXMLWriter    = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg     = "";
     currMethod         = "";
     sTagName           = "";
     scmdbuf            = "";
     P000L2_A10QuimiquerosBandaCPSUAB    = new long[1];
     P000L2_A11QuimiquerosTarifaCargados = new decimal[1];
     P000L2_A9QuimiquerosID            = new short[1];
     AV13SdtResultado                  = new SdtSdtResultado(context);
     P000L3_A10QuimiquerosBandaCPSUAB  = new long[1];
     P000L3_A12QuimiquerosTarifaLastre = new decimal[1];
     P000L3_A9QuimiquerosID            = new short[1];
     pr_default = new DataStoreProvider(context, new GeneXus.Programs.awscalcularquimiqueros__default(),
                                        new Object[][] {
         new Object[] {
             P000L2_A10QuimiquerosBandaCPSUAB, P000L2_A11QuimiquerosTarifaCargados, P000L2_A9QuimiquerosID
         }
         , new Object[] {
             P000L3_A10QuimiquerosBandaCPSUAB, P000L3_A12QuimiquerosTarifaLastre, P000L3_A9QuimiquerosID
         }
     }
                                        );
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 5
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short  currError;
            String arrayType;
            short  gxi;

            currError = 1;
            arrayType = "";
            gxi       = 0;
            while (gxi <= oReader.AttributeCount)
            {
                if (StringUtil.StrCmp(oReader.GetAttributeLocalName(gxi), "arrayType") == 0)
                {
                    arrayType = oReader.GetAttributeByIndex(gxi);
                }
                gxi = (short)(gxi + 1);
            }
            if (StringUtil.StrCmp(arrayType, "") != 0)
            {
                currError = (short)(readEncodedArray(arrayType, oReader));
            }
            else
            {
                currError = (short)(readxmlcollection(oReader, sName, ""));
            }
            return(currError);
        }
Exemplo n.º 6
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "IP"))
                    {
                        gxTv_SdtOperTugSchedule_GetOperTugScheduleResult_MATE1_Ip = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "LName"))
                    {
                        gxTv_SdtOperTugSchedule_GetOperTugScheduleResult_MATE1_Lname = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "FName"))
                    {
                        gxTv_SdtOperTugSchedule_GetOperTugScheduleResult_MATE1_Fname = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "NAME"))
                    {
                        gxTv_SdtOperTugSchedule_GetOperTugScheduleResult_MATE1_Name = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
Exemplo n.º 7
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "SdtResultadoPanamax"))
                    {
                        gxTv_SdtSdtResultado_Sdtresultadopanamax = NumberUtil.Val(oReader.Value, ".");
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "SdtResultadoNeoPanamax"))
                    {
                        gxTv_SdtSdtResultado_Sdtresultadoneopanamax = NumberUtil.Val(oReader.Value, ".");
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "SdtResultadoLastre"))
                    {
                        gxTv_SdtSdtResultado_Sdtresultadolastre = NumberUtil.Val(oReader.Value, ".");
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "SdtLastreRoundtrip"))
                    {
                        gxTv_SdtSdtResultado_Sdtlastreroundtrip = NumberUtil.Val(oReader.Value, ".");
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
Exemplo n.º 8
0
        public short readEncodedArray(String arrayType,
                                      GXXMLReader oReader)
        {
            short currError;
            int   arrayLength;
            int   arraySizeStartPos;
            int   arraySizeLength;
            short gxi;

            arraySizeStartPos = (int)(StringUtil.StringSearch(arrayType, "[", 1) + 1);
            arraySizeLength   = (int)(StringUtil.Len(arrayType) - arraySizeStartPos);
            if ((arraySizeStartPos == 1) || (arraySizeLength == 0))
            {
                throw new Exception("GxObjectCollectionBase error: Could not read encoded array size\"+\"(\"+StringUtil.LTrim( StringUtil.NToC( (decimal)(0), 6, 0, \".\", \"\"))+\")");
            }
            arrayLength = (int)(NumberUtil.Val(StringUtil.Substring(arrayType, arraySizeStartPos, arraySizeLength), "."));
            currError   = oReader.Read();
            gxi         = 0;
            while ((gxi < arrayLength) && (currError > 0))
            {
                currError = (short)(AddObjectInstance(oReader));
                oReader.Read();
                gxi = (short)(gxi + 1);
            }
            return(currError);
        }
Exemplo n.º 9
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "Code"))
                    {
                        gxTv_SdtTabOptions_TabOptionsItem_Code = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "Description"))
                    {
                        gxTv_SdtTabOptions_TabOptionsItem_Description = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "Link"))
                    {
                        gxTv_SdtTabOptions_TabOptionsItem_Link = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "WebComponent"))
                    {
                        gxTv_SdtTabOptions_TabOptionsItem_Webcomponent = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
 public void SetPrefixes(Dictionary <string, string> pfxs, GXXMLReader reader)
 {
     currentNamespacePrefixes.SetPrefixes(new Dictionary <string, string>(pfxs));
     if (reader != null)
     {
         SetPrefixesFromReader(reader);
     }
 }
Exemplo n.º 11
0
 public override void initialize( )
 {
    GXSoapHTTPRequest = new GxHttpRequest(context) ;
    GXSoapXMLReader = new GXXMLReader(context.GetPhysicalPath());
    GXSoapHTTPResponse = new GxHttpResponse(context) ;
    GXSoapXMLWriter = new GXXMLWriter(context.GetPhysicalPath());
    currSoapErrmsg = "";
    currMethod = "";
    Gxm1homesampledata = new GeneXus.Programs.wwpbaseobjects.SdtHomeSampleData_HomeSampleDataItem(context);
    /* GeneXus formulas. */
    context.Gx_err = 0;
 }
Exemplo n.º 12
0
        static public GxLocation getlocation(IGxContext context,
                                             String sLocation)
        {
            GXXMLReader oReader;
            GxLocation  oLocation;

            if (context.nLocRead == 0)
            {
                oReader = new GXXMLReader(context.GetPhysicalPath());
                oReader.Open(context.GetPhysicalPath( ) + "location.xml");
                initLocations(context, oReader);
                if (oReader.ErrCode == 0)
                {
                    oReader.Close();
                }
            }
            context.nSOAPErr = 0;
            oLocation        = context.colLocations.GetItem(sLocation);
            context.nSOAPErr = 0;
            if (oLocation == null)
            {
                context.nSOAPErr = 1;
            }
            assigngroupproperties(context, oLocation);
            if (context.nSOAPErr != 0)
            {
                context.nSOAPErr                 = (short)(-20007);
                context.sSOAPErrMsg              = "Invalid location name.";
                oLocation                        = new GxLocation();
                oLocation.Name                   = sLocation;
                oLocation.Host                   = "";
                oLocation.Port                   = -1;
                oLocation.BaseUrl                = "";
                oLocation.Secure                 = -1;
                oLocation.ProxyServerHost        = "";
                oLocation.ProxyServerPort        = -1;
                oLocation.Timeout                = -1;
                oLocation.CancelOnError          = 0;
                oLocation.Authentication         = 0;
                oLocation.AuthenticationMethod   = 0;
                oLocation.AuthenticationRealm    = "";
                oLocation.AuthenticationUser     = "";
                oLocation.AuthenticationPassword = "";
                oLocation.GroupLocation          = "";
                context.colLocations.Add(oLocation, sLocation);
            }
            else
            {
                context.nSOAPErr    = 0;
                context.sSOAPErrMsg = "";
            }
            return(oLocation);
        }
Exemplo n.º 13
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "User"))
                    {
                        gxTv_SdtContext_User = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "CompanyCode"))
                    {
                        gxTv_SdtContext_Companycode = (short)(NumberUtil.Val(oReader.Value, "."));
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "Profile"))
                    {
                        gxTv_SdtContext_Profile = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
Exemplo n.º 14
0
 public override void initialize( )
 {
     GXSoapHTTPRequest                     = new GxHttpRequest(context);
     GXSoapXMLReader                       = new GXXMLReader(context.GetPhysicalPath());
     GXSoapHTTPResponse                    = new GxHttpResponse(context);
     GXSoapXMLWriter                       = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg                        = "";
     currMethod                            = "";
     sTagName                              = "";
     scmdbuf                               = "";
     P000O2_A44REF_CGRAL_DESP_CARGA        = new String[] { "" };
     P000O2_A45REF_CGRAL_DESP_TIPO         = new String[] { "" };
     P000O2_n45REF_CGRAL_DESP_TIPO         = new bool[] { false };
     P000O2_A46REF_CGRAL_DESP_TON_TARIF    = new long[1];
     P000O2_n46REF_CGRAL_DESP_TON_TARIF    = new bool[] { false };
     P000O2_A47REF_CGRAL_DESP_TARIFA       = new decimal[1];
     P000O2_A48REF_CGRAL_DESP_ID_TON_TARIF = new short[1];
     P000O2_A49REF_CGRAL_DESP_ID           = new short[1];
     A44REF_CGRAL_DESP_CARGA               = "";
     A45REF_CGRAL_DESP_TIPO                = "";
     AV12SdtResultado                      = new SdtSdtResultado(context);
     P000O3_A44REF_CGRAL_DESP_CARGA        = new String[] { "" };
     P000O3_A45REF_CGRAL_DESP_TIPO         = new String[] { "" };
     P000O3_n45REF_CGRAL_DESP_TIPO         = new bool[] { false };
     P000O3_A46REF_CGRAL_DESP_TON_TARIF    = new long[1];
     P000O3_n46REF_CGRAL_DESP_TON_TARIF    = new bool[] { false };
     P000O3_A47REF_CGRAL_DESP_TARIFA       = new decimal[1];
     P000O3_A48REF_CGRAL_DESP_ID_TON_TARIF = new short[1];
     P000O3_A49REF_CGRAL_DESP_ID           = new short[1];
     AV11REF_CGRAL_DESP_CARGA_LIST         = new GxSimpleCollection();
     P000O4_A44REF_CGRAL_DESP_CARGA        = new String[] { "" };
     P000O4_A47REF_CGRAL_DESP_TARIFA       = new decimal[1];
     P000O4_A48REF_CGRAL_DESP_ID_TON_TARIF = new short[1];
     P000O4_A49REF_CGRAL_DESP_ID           = new short[1];
     pr_default                            = new DataStoreProvider(context, new GeneXus.Programs.awscalcularrefcgraldesp__default(),
                                                                   new Object[][] {
         new Object[] {
             P000O2_A44REF_CGRAL_DESP_CARGA, P000O2_A45REF_CGRAL_DESP_TIPO, P000O2_n45REF_CGRAL_DESP_TIPO, P000O2_A46REF_CGRAL_DESP_TON_TARIF, P000O2_n46REF_CGRAL_DESP_TON_TARIF, P000O2_A47REF_CGRAL_DESP_TARIFA, P000O2_A48REF_CGRAL_DESP_ID_TON_TARIF, P000O2_A49REF_CGRAL_DESP_ID
         }
         , new Object[] {
             P000O3_A44REF_CGRAL_DESP_CARGA, P000O3_A45REF_CGRAL_DESP_TIPO, P000O3_n45REF_CGRAL_DESP_TIPO, P000O3_A46REF_CGRAL_DESP_TON_TARIF, P000O3_n46REF_CGRAL_DESP_TON_TARIF, P000O3_A47REF_CGRAL_DESP_TARIFA, P000O3_A48REF_CGRAL_DESP_ID_TON_TARIF, P000O3_A49REF_CGRAL_DESP_ID
         }
         , new Object[] {
             P000O4_A44REF_CGRAL_DESP_CARGA, P000O4_A47REF_CGRAL_DESP_TARIFA, P000O4_A48REF_CGRAL_DESP_ID_TON_TARIF, P000O4_A49REF_CGRAL_DESP_ID
         }
     }
                                                                   );
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 15
0
 void setNamespaceContext(GXXMLReader rdr, bool setLocalNamespace)
 {
     for (int i = 1; i <= rdr.AttributeCount; i++)
     {
         string attName = rdr.GetAttributeName(i);
         if (attName.ToLower().StartsWith("xmlns:"))
         {
             AddNamespacePrefix(attName.Substring(6), rdr.GetAttributeByIndex(i));
         }
         else if (attName.ToLower() == "xmlns" && setLocalNamespace)
         {
             AddNamespacePrefix("", rdr.GetAttributeByIndex(i));
         }
     }
 }
Exemplo n.º 16
0
 public override void initialize( )
 {
     GXSoapHTTPClient = new GxHttpClient(context);
     sReturn          = "";
     GXSoapXMLReader  = new GXXMLReader(context.GetPhysicalPath());
     GXSoapXMLWriter  = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg   = "";
     sTagName         = "";
     sFaultCode       = "";
     sFaultString     = "";
     sDetail          = "";
     oLocation        = new GxLocation();
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 17
0
 public override void initialize( )
 {
     GXSoapHTTPRequest  = new GxHttpRequest(context);
     GXSoapXMLReader    = new GXXMLReader(context.GetPhysicalPath());
     GXSoapHTTPResponse = new GxHttpResponse(context);
     GXSoapXMLWriter    = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg     = "";
     currMethod         = "";
     AV5HomeSampleData  = new GXBaseCollection <GeneXus.Programs.wwpbaseobjects.SdtHomeSampleData_HomeSampleDataItem>(context, "HomeSampleDataItem", "DataAnalysisPlatform");
     GXt_objcol_SdtHomeSampleData_HomeSampleDataItem1 = new GXBaseCollection <GeneXus.Programs.wwpbaseobjects.SdtHomeSampleData_HomeSampleDataItem>(context, "HomeSampleDataItem", "DataAnalysisPlatform");
     AV6HomeSampleDataItem       = new GeneXus.Programs.wwpbaseobjects.SdtHomeSampleData_HomeSampleDataItem(context);
     Gxm2homesamplenamevaluedata = new GeneXus.Programs.wwpbaseobjects.SdtHomeSampleNameValueData_HomeSampleNameValueDataItem(context);
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 18
0
 public void SetPrefixesFromReader(GXXMLReader rdr)
 {
     for (int i = 1; i <= rdr.AttributeCount; i++)
     {
         string attName = rdr.GetAttributeName(i);
         if (attName.ToLower().StartsWith("xmlns:"))
         {
             AddNamespacePrefix(attName.Substring(6), rdr.GetAttributeByIndex(i));
         }
         else if (attName.ToLower() == "xmlns")
         {
             AddNamespacePrefix("", rdr.GetAttributeByIndex(i));
         }
     }
 }
        public short readxmlcollectionUnwrapped(GXXMLReader oReader, string sName, string itemName)
        {
            short currError = 1;

            while (oReader.LocalName == itemName && currError > 0)
            {
                T currObject = new T();
                currObject.context = this.context;
                string xml = GxUserType.UpdateNodeDefaultNamespace(oReader.ReadRawXML(), null, false, this.GetPrefixesInContext());
                currObject.FromXml(xml, itemName, oReader.NamespaceURI);
                Add(currObject);
                oReader.Read();
            }
            return(currError);
        }
Exemplo n.º 20
0
 public void initialize( )
 {
     defaultExecute     = "";
     GXSoapHTTPClient   = new GxHttpClient(context);
     execName           = "";
     targetResourceName = "";
     GXSoapXMLReader    = new GXXMLReader(context.GetPhysicalPath());
     GXSoapXMLWriter    = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg     = "";
     sTagName           = "";
     oLocation          = new GxLocation();
     sFaultCode         = "";
     sFaultString       = "";
     sDetail            = "";
     return;
 }
Exemplo n.º 21
0
 public override void initialize( )
 {
     GXSoapHTTPRequest             = new GxHttpRequest(context);
     GXSoapXMLReader               = new GXXMLReader(context.GetPhysicalPath());
     GXSoapHTTPResponse            = new GxHttpResponse(context);
     GXSoapXMLWriter               = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg                = "";
     currMethod                    = "";
     sTagName                      = "";
     scmdbuf                       = "";
     P000K2_A1TanqueroEsclusasID   = new short[1];
     P000K2_A8TanqueroBandaCPSUAB  = new long[1];
     P000K2_A4TanqueroTarifaCPSUAB = new decimal[1];
     P000K2_A3TanqueroRango        = new short[1];
     AV15SdtResultado              = new SdtSdtResultado(context);
     P000K3_A1TanqueroEsclusasID   = new short[1];
     P000K3_A8TanqueroBandaCPSUAB  = new long[1];
     P000K3_A4TanqueroTarifaCPSUAB = new decimal[1];
     P000K3_A3TanqueroRango        = new short[1];
     P000K4_A1TanqueroEsclusasID   = new short[1];
     P000K4_A5TanqueroBandaTM      = new long[1];
     P000K4_A6TanqueroTarifaTM     = new decimal[1];
     P000K4_A3TanqueroRango        = new short[1];
     P000K5_A1TanqueroEsclusasID   = new short[1];
     P000K5_A8TanqueroBandaCPSUAB  = new long[1];
     P000K5_A7TanqueroTarifaLastre = new decimal[1];
     P000K5_A3TanqueroRango        = new short[1];
     pr_default                    = new DataStoreProvider(context, new GeneXus.Programs.awscalculartanqueros__default(),
                                                           new Object[][] {
         new Object[] {
             P000K2_A1TanqueroEsclusasID, P000K2_A8TanqueroBandaCPSUAB, P000K2_A4TanqueroTarifaCPSUAB, P000K2_A3TanqueroRango
         }
         , new Object[] {
             P000K3_A1TanqueroEsclusasID, P000K3_A8TanqueroBandaCPSUAB, P000K3_A4TanqueroTarifaCPSUAB, P000K3_A3TanqueroRango
         }
         , new Object[] {
             P000K4_A1TanqueroEsclusasID, P000K4_A5TanqueroBandaTM, P000K4_A6TanqueroTarifaTM, P000K4_A3TanqueroRango
         }
         , new Object[] {
             P000K5_A1TanqueroEsclusasID, P000K5_A8TanqueroBandaCPSUAB, P000K5_A7TanqueroTarifaLastre, P000K5_A3TanqueroRango
         }
     }
                                                           );
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 22
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp(oReader.LocalName, "Caption") == 0)
                    {
                        gxTv_SdtLinkList_LinkItem_Caption = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp(oReader.LocalName, "URL") == 0)
                    {
                        gxTv_SdtLinkList_LinkItem_Url = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
Exemplo n.º 23
0
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "GetOperTugScheduleResult"))
                    {
                        if (gxTv_SdtOperTugSchedule_Getopertugscheduleresult == null)
                        {
                            gxTv_SdtOperTugSchedule_Getopertugscheduleresult = new SdtOperTugSchedule_GetOperTugScheduleResult(context);
                        }
                        if ((oReader.IsSimple == 0) || (oReader.AttributeCount > 0))
                        {
                            GXSoapError = gxTv_SdtOperTugSchedule_Getopertugscheduleresult.readxml(oReader, "GetOperTugScheduleResult");
                        }
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
Exemplo n.º 24
0
        private void ProcessService(GXXMLReader reader)
        {
            reader.ReadType(1, "Name");
            String name = reader.Value;

            reader.ReadType(1, "Type");
            String type = reader.Value;

            reader.ReadType(1, "ClassName");
            String className = reader.Value;

            String allowMultiple = string.Empty;

            reader.Read();
            if (reader.Name == "AllowMultiple")
            {
                allowMultiple = reader.Value;
                reader.Read();
            }

            GXProperties properties = ProcessProperties(type, name, reader);

            GXService service = new GXService();

            service.Name          = name;
            service.Type          = type;
            service.ClassName     = className;
            service.Properties    = properties;
            service.AllowMultiple = string.IsNullOrEmpty(allowMultiple) ? false : bool.Parse(allowMultiple);
            if (service.AllowMultiple)
            {
                services.Add($"{service.Type}:{service.Name}", service);
            }
            else
            {
                services.Add(type, service);
            }
        }
Exemplo n.º 25
0
        public static void LoadFromFile(string fileName, ref GXServices services)
        {
            string filePath = ServicesFilePath(fileName);

            if (File.Exists(filePath))
            {
                try
                {
                    if (services == null)
                    {
                        services = new GXServices();
                    }
                    GXLogging.Debug(log, "Loading service:", filePath);
                    GXXMLReader reader = new GXXMLReader();
                    reader.Open(filePath);
                    reader.ReadType(1, "Services");
                    reader.Read();
                    if (reader.ErrCode == 0)
                    {
                        while (reader.Name != "Services")
                        {
                            services.ProcessService(reader);
                            reader.Read();
                            if (reader.Name == "Service" && reader.NodeType == 2)                             //</Service>
                            {
                                reader.Read();
                            }
                        }
                        reader.Close();
                    }
                }
                catch (Exception ex)
                {
                    GXLogging.Error(log, "Couldn't create service from:", filePath, ex);
                    throw ex;
                }
            }
        }
 public override void initialize( )
 {
     GXSoapHTTPRequest           = new GxHttpRequest(context);
     GXSoapXMLReader             = new GXXMLReader(context.GetPhysicalPath());
     GXSoapHTTPResponse          = new GxHttpResponse(context);
     GXSoapXMLWriter             = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg              = "";
     currMethod                  = "";
     sTagName                    = "";
     scmdbuf                     = "";
     P000I2_A42VEH_RORO_UTIL_FIN = new decimal[1];
     P000I2_A41VEH_RORO_UTIL_INI = new decimal[1];
     P000I2_A40VEH_RORO_TON_FIN  = new decimal[1];
     P000I2_A39VEH_RORO_TON_INI  = new decimal[1];
     P000I2_A43VEH_RORO_TARIFA   = new decimal[1];
     P000I2_A38VEH_RORO_ID       = new short[1];
     AV8SdtResultado             = new SdtSdtResultado(context);
     P000I3_A42VEH_RORO_UTIL_FIN = new decimal[1];
     P000I3_A41VEH_RORO_UTIL_INI = new decimal[1];
     P000I3_A40VEH_RORO_TON_FIN  = new decimal[1];
     P000I3_A39VEH_RORO_TON_INI  = new decimal[1];
     P000I3_A43VEH_RORO_TARIFA   = new decimal[1];
     P000I3_A38VEH_RORO_ID       = new short[1];
     pr_default                  = new DataStoreProvider(context, new GeneXus.Programs.awscalcularportavehiculosrorosoap__default(),
                                                         new Object[][] {
         new Object[] {
             P000I2_A42VEH_RORO_UTIL_FIN, P000I2_A41VEH_RORO_UTIL_INI, P000I2_A40VEH_RORO_TON_FIN, P000I2_A39VEH_RORO_TON_INI, P000I2_A43VEH_RORO_TARIFA, P000I2_A38VEH_RORO_ID
         }
         , new Object[] {
             P000I3_A42VEH_RORO_UTIL_FIN, P000I3_A41VEH_RORO_UTIL_INI, P000I3_A40VEH_RORO_TON_FIN, P000I3_A39VEH_RORO_TON_INI, P000I3_A43VEH_RORO_TARIFA, P000I3_A38VEH_RORO_ID
         }
     }
                                                         );
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 27
0
 public override void initialize( )
 {
     GXSoapHTTPRequest                  = new GxHttpRequest(context);
     GXSoapXMLReader                    = new GXXMLReader(context.GetPhysicalPath());
     GXSoapHTTPResponse                 = new GxHttpResponse(context);
     GXSoapXMLWriter                    = new GXXMLWriter(context.GetPhysicalPath());
     currSoapErrmsg                     = "";
     currMethod                         = "";
     sTagName                           = "";
     scmdbuf                            = "";
     P000N2_A18LNGBandaM3               = new long[1];
     P000N2_A19LNGTarifaCargados        = new decimal[1];
     P000N2_A17LNGID                    = new short[1];
     AV13SdtResultado                   = new SdtSdtResultado(context);
     P000N3_A18LNGBandaM3               = new long[1];
     P000N3_A20LNGTarifaLastre          = new decimal[1];
     P000N3_A17LNGID                    = new short[1];
     P000N4_A18LNGBandaM3               = new long[1];
     P000N4_A21LNGTarifaLastreRoundtrip = new decimal[1];
     P000N4_A17LNGID                    = new short[1];
     pr_default                         = new DataStoreProvider(context, new GeneXus.Programs.awscalcularlng__default(),
                                                                new Object[][] {
         new Object[] {
             P000N2_A18LNGBandaM3, P000N2_A19LNGTarifaCargados, P000N2_A17LNGID
         }
         , new Object[] {
             P000N3_A18LNGBandaM3, P000N3_A20LNGTarifaLastre, P000N3_A17LNGID
         }
         , new Object[] {
             P000N4_A18LNGBandaM3, P000N4_A21LNGTarifaLastreRoundtrip, P000N4_A17LNGID
         }
     }
                                                                );
     /* GeneXus formulas. */
     context.Gx_err = 0;
 }
Exemplo n.º 28
0
        static public void initLocations(IGxContext context,
                                         GXXMLReader oReader)
        {
            String     sSection;
            String     sName;
            short      nFirstRead;
            GxLocation oLocation;

            context.nLocRead     = 1;
            context.colLocations = new GxLocationCollection();
            if (oReader.ErrCode == 0)
            {
                if (oReader.ReadType(1, "GXLocations") > 0)
                {
                    oReader.Read();
                    while (!((StringUtil.StrCmp(oReader.Name, "GXLocations") == 0) && (oReader.NodeType == 2)))
                    {
                        if ((StringUtil.StrCmp(oReader.Name, "GXLocation") == 0) && (oReader.NodeType == 1))
                        {
                            sName            = oReader.GetAttributeByName("name");
                            oLocation        = context.colLocations.GetItem(sName);
                            context.nSOAPErr = 0;
                            if (oLocation == null)
                            {
                                context.nSOAPErr = 1;
                            }
                            if (context.nSOAPErr != 0)
                            {
                                /* Error while reading XML. Code:  4 . Message:  Input error . */
                                oLocation                        = new GxLocation();
                                oLocation.Name                   = sName;
                                oLocation.Host                   = "localhost";
                                oLocation.Port                   = 80;
                                oLocation.BaseUrl                = "/";
                                oLocation.Secure                 = 0;
                                oLocation.ProxyServerHost        = "";
                                oLocation.ProxyServerPort        = 0;
                                oLocation.Timeout                = 0;
                                oLocation.CancelOnError          = 0;
                                oLocation.Authentication         = 0;
                                oLocation.AuthenticationMethod   = 0;
                                oLocation.AuthenticationRealm    = "";
                                oLocation.AuthenticationUser     = "";
                                oLocation.AuthenticationPassword = "";
                                oLocation.GroupLocation          = "";
                                context.colLocations.Add(oLocation, sName);
                            }
                            oLocation.GroupLocation = "";
                            nFirstRead = 1;
                            oReader.Read();
                            while (!((StringUtil.StrCmp(oReader.Name, "GXLocation") == 0) && (oReader.NodeType == 2)))
                            {
                                sSection = read_section(context, oReader, oLocation);
                                if (((StringUtil.StrCmp(sSection, "Common") == 0) && (nFirstRead == 1)) || (StringUtil.StrCmp(sSection, "HTTP") == 0))
                                {
                                    nFirstRead = 0;
                                }
                                oReader.Read();
                            }
                        }
                        oReader.Read();
                    }
                }
            }
        }
        public override short readxml(GXXMLReader oReader,
                                      String sName)
        {
            short GXSoapError = 1;

            sTagName = oReader.Name;
            if (oReader.IsSimple == 0)
            {
                GXSoapError   = oReader.Read();
                nOutParmCount = 0;
                while (((StringUtil.StrCmp(oReader.Name, sTagName) != 0) || (oReader.NodeType == 1)) && (GXSoapError > 0))
                {
                    readOk = 0;
                    if (StringUtil.StrCmp2(oReader.LocalName, "CallerObject"))
                    {
                        gxTv_SdtTransactionContext_Callerobject = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "CallerOnDelete"))
                    {
                        gxTv_SdtTransactionContext_Callerondelete = (bool)(Convert.ToBoolean(((StringUtil.StrCmp(oReader.Value, "true") == 0) || (StringUtil.StrCmp(oReader.Value, "1") == 0) ? 1 : 0)));
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "CallerURL"))
                    {
                        gxTv_SdtTransactionContext_Callerurl = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "TransactionName"))
                    {
                        gxTv_SdtTransactionContext_Transactionname = oReader.Value;
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    if (StringUtil.StrCmp2(oReader.LocalName, "Attributes"))
                    {
                        if (gxTv_SdtTransactionContext_Attributes == null)
                        {
                            gxTv_SdtTransactionContext_Attributes = new GxObjectCollection(context, "TransactionContext.Attribute", "CalcularPeajes", "SdtTransactionContext_Attribute", "GeneXus.Programs");
                        }
                        if (oReader.IsSimple == 0)
                        {
                            GXSoapError = gxTv_SdtTransactionContext_Attributes.readxmlcollection(oReader, "Attributes", "Attribute");
                        }
                        if (GXSoapError > 0)
                        {
                            readOk = 1;
                        }
                        GXSoapError = oReader.Read();
                    }
                    nOutParmCount = (short)(nOutParmCount + 1);
                    if (readOk == 0)
                    {
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Error reading " + sTagName + StringUtil.NewLine( );
                        context.sSOAPErrMsg = context.sSOAPErrMsg + "Message: " + oReader.ReadRawXML();
                        GXSoapError         = (short)(nOutParmCount * -1);
                    }
                }
            }
            return(GXSoapError);
        }
Exemplo n.º 30
0
        static public String read_section(IGxContext context,
                                          GXXMLReader oReader,
                                          GxLocation oLocation)
        {
            String sSection;

            sSection = "";
            if (oReader.NodeType == 1)
            {
                sSection = oReader.Name;
                oReader.Read();
                while (!((StringUtil.StrCmp(oReader.Name, sSection) == 0) && (oReader.NodeType == 2)))
                {
                    if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "host") == 0)
                    {
                        oLocation.Host = oReader.Value;
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "port") == 0)
                    {
                        oLocation.Port = (int)(NumberUtil.Val(oReader.Value, "."));
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "baseurl") == 0)
                    {
                        oLocation.BaseUrl = oReader.Value;
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "resourcename") == 0)
                    {
                        oLocation.ResourceName = oReader.Value;
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "secure") == 0)
                    {
                        oLocation.Secure = (short)(NumberUtil.Val(oReader.Value, "."));
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "proxyserverhost") == 0)
                    {
                        oLocation.ProxyServerHost = oReader.Value;
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "proxyserverport") == 0)
                    {
                        oLocation.ProxyServerPort = (int)(NumberUtil.Val(oReader.Value, "."));
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "timeout") == 0)
                    {
                        oLocation.Timeout = (short)(NumberUtil.Val(oReader.Value, "."));
                    }
                    else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "cancelonerror") == 0)
                    {
                        oLocation.CancelOnError = (short)(NumberUtil.Val(oReader.Value, "."));
                    }
                    else if (StringUtil.StrCmp(oReader.Name, "Authentication") == 0)
                    {
                        oLocation.Authentication       = 1;
                        oLocation.AuthenticationMethod = (short)(NumberUtil.Val(StringUtil.Str((decimal)(0), 1, 0), "."));
                        oReader.Read();
                        while (!((StringUtil.StrCmp(oReader.Name, "Authentication") == 0) && (oReader.NodeType == 2)))
                        {
                            if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "authenticationmethod") == 0)
                            {
                                oLocation.AuthenticationMethod = (short)(NumberUtil.Val(oReader.Value, "."));
                            }
                            else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "authenticationuser") == 0)
                            {
                                oLocation.AuthenticationUser = oReader.Value;
                            }
                            else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "authenticationrealm") == 0)
                            {
                                oLocation.AuthenticationRealm = oReader.Value;
                            }
                            else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "authenticationpassword") == 0)
                            {
                                oLocation.AuthenticationPassword = oReader.Value;
                            }
                            oReader.Read();
                        }
                    }
                    else if (StringUtil.StrCmp(oReader.Name, "Proxyauthentication") == 0)
                    {
                        oLocation.ProxyAuthenticationMethod = (short)(NumberUtil.Val(StringUtil.Str((decimal)(0), 1, 0), "."));
                        oReader.Read();
                        while (!((StringUtil.StrCmp(oReader.Name, "Proxyauthentication") == 0) && (oReader.NodeType == 2)))
                        {
                            if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "proxyauthenticationmethod") == 0)
                            {
                                oLocation.ProxyAuthenticationMethod = (short)(NumberUtil.Val(oReader.Value, "."));
                            }
                            else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "proxyauthenticationuser") == 0)
                            {
                                oLocation.ProxyAuthenticationUser = oReader.Value;
                            }
                            else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "proxyauthenticationrealm") == 0)
                            {
                                oLocation.ProxyAuthenticationRealm = oReader.Value;
                            }
                            else if (StringUtil.StrCmp(StringUtil.Lower(oReader.Name), "proxyauthenticationpassword") == 0)
                            {
                                oLocation.ProxyAuthenticationPassword = oReader.Value;
                            }
                            oReader.Read();
                        }
                    }
                    oReader.Read();
                }
            }
            return(sSection);
        }