Re: output validation error



I changed the transRolaty type to xs:string and it works.So what can be the
problem. the "comma" character?

Thanks



"Luis Esteban Valencia" <levalencia@xxxxxxxxxxxx> escribió en el mensaje
news:eukEWyjgFHA.1612@xxxxxxxxxxxxxxxxxxxxxxx
> Strange Error.
>
> Hello I got this error.
>
> C:\DOCUME~1\LEVALE~1\CONFIG~1\Temp\_MapData\Sales2POS_output.xml Output
> validation error: El atributo 'transRoyalty' tiene un valor no válido
según
> el tipo de datos. Error en
> file:///C:/DOCUME~1/LEVALE~1/CONFIG~1/Temp/_MapData/Sales2POS_output.xml,
> (1, 194).
>
> The xml schemas in those fields are decimal.
>
>
> The input XML is:
>
> - <ns0:Sales xmlns:ns0="http://Mapping_Chapter_Project.SalesSchema";>
> <Sale bookID="PS3333" qty="100" saleDate="2003-07-30" price="1000" />
> </ns0:Sales>
>
> and the output that is wrong is.
>
> <ns0:BookSales xmlns:ns0="http://Mapping_Chapter_Project.POSSchema";><Item
> pubID="PS3333"><Title>Prolonged Data Deprivation: Four Case
> Studies</Title><TransInfo listPrice="20" transPrice="1000"
> transRoyalty="10000,0" transDate="2003-07-30" transTotal="100000"
> transQty="100"></TransInfo></Item></ns0:BookSales>
>
>
>
> This is the code of the custom functoid but it doesnt throw errors when I
> compiled them
>
> using System;
>
> using Microsoft.BizTalk.BaseFunctoids;
>
> using System.Text;
>
> using System.Reflection;
>
> using System.Globalization;
>
> namespace QueFunctoids
>
> {
>
> /// <summary>
>
> /// Descripción breve de Class1.
>
> /// </summary>
>
> public class GlobalRoyaltyFunctoid : BaseFunctoid
>
> {
>
> /// <summary>
>
> /// Constructor sobreescrito de BaseFunctiod
>
> /// </summary>
>
> public GlobalRoyaltyFunctoid() : base()
>
> {
>
> this.ID = 6045;
>
> SetupResourceAssembly("QueFunctoids.QueFunctoidResources",
> Assembly.GetExecutingAssembly());
>
> SetName("IDS_CACHEFUNCTOID_NAME");
>
> SetTooltip("IDS_CACHEFUNCTOID_TOOLTIP");
>
> SetDescription("IDS_CACHEFUNCTOID_DESCRIPTION");
>
> SetBitmap("IDB_CACHEFUNCTOID_BITMAP");
>
> this.SetMinParams(3);
>
>
> this.SetMaxParams(3);
>
> SetExternalFunctionName(GetType().Assembly.FullName,
> "QueFunctoids.GlobalRoyaltyFunctoid", "CalcRoyalty");
>
> this.Category = FunctoidCategory.Math;
>
> this.OutputConnectionType = ConnectionType.AllExceptRecord;
>
> AddInputConnectionType(ConnectionType.AllExceptRecord);
>
> }
>
> /// <summary>
>
> /// Calcululo del Royalti
>
> /// </summary>
>
> /// <param name="rate">Parametro de la tasa de interes</param>
>
> /// <param name="price">Parametro del Precio por producto</param>
>
> /// <param name="qty">Parametro de la cantidad</param>
>
> /// <returns>Multiploca la cantidad por el precio y a este lo multiplica
por
> la tase de interes/100</returns>
>
> public string CalcRoyalty(string rate, string price, string qty)
>
> {
>
> decimal dRate, dPrice, dRetVal;
>
> int iQty;
>
> if (IsNumeric(rate) && IsNumeric(price) && IsNumeric(qty))
>
> {
>
> dRate = Convert.ToDecimal(rate,
> System.Globalization.CultureInfo.InvariantCulture);
>
> dPrice = Convert.ToDecimal(price,
> System.Globalization.CultureInfo.InvariantCulture);
>
> iQty = Convert.ToInt32(qty,
> System.Globalization.CultureInfo.InvariantCulture);
>
> dRetVal = dRate/100 * dPrice * (decimal)iQty;
>
> return dRetVal.ToString();
>
> }
>
> else
>
> {
>
> return "0.0";
>
> }
>
> }
>
>
>
> }
>
> }
>
>
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
>
>
>
>
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
>
>
>


.