Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: A BUG about processing XmlPackage

  1. #1
    acqy is offline Junior Member
    Join Date
    Jan 2010
    Posts
    14

    Unhappy A BUG about processing XmlPackage

    Hello,
    I created a customized XmlPackage as follows, which accepts a ProductID and gets the ProductID and Name from database.

    HTML Code:
    <?xml version="1.0" standalone="yes" ?>
    <package version="2.1" displayname="My XML Package" debug="false" allowengine="true">
      <query name="Products" rowElementName="Product" retType="xml">
        <sql>
          <![CDATA[
                    select Product.ProductID, Product.Name from Product
                    where Product.ProductID = @ProductID
                    for xml auto, elements
                ]]>
        </sql>
        <queryparam paramname="@ProductID" paramtype="runtime" requestparamname="ProductID" sqlDataType="int" defvalue="0"  validationpattern="" />
      </query>
      
      <PackageTransform>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf">
          
          <xsl:template match="/">
            <table border="0">
              <tr>
                <td>
                  <strong>Product ID</strong>
                </td>
                <td>
                  <strong>Product Name</strong>
                </td>
              </tr>
              <xsl:for-each select="/root/Products/Product">
                <xsl:call-template name="Products" />
              </xsl:for-each>
            </table>
          </xsl:template>
    
          <xsl:template name="Products">
            <tr>
              <td>
                <xsl:value-of select="ProductID" />
              </td>
              <td>
                <xsl:value-of select="Name" />
              </td>
            </tr>
          </xsl:template>
    
          
        </xsl:stylesheet>
      </PackageTransform>
    </package>
    Then, I created my client application to run the XmlPackage in C#:
    HTML Code:
    var client = new Adnsf.AspDotNetStorefrontImportWebServiceSoapClient();
                var response = client.DoIt("admin@aspdotnetstorefront.com",
                    "mypassword",
                    "<AspDotNetStorefrontImport>" +
                            "<XmlPackage Name=\"my.getproduct.xml.config\" RuntimeParams=\"ProductID=55\" OutputType=\"CDATA\"></XmlPackage>" +
                            "</AspDotNetStorefrontImport>");
    When debugging my client app, I found that there is no record listed in the response variable above. After debug the source code of AspDotNetstorefront, I found that:

    In the AspDotNetStorefrontWSI.WSI.cs source file, in the method"private void ProcessXmlPackage(XmlNode node, int Idx)", there decleared a local variable "RuntimeParams" but had not been used in this method. I suppose that the line "String s = AppLogic.RunXmlPackage(PackageName, null, null, 1, "", "", false, false);" has lost this variable.

    The storefront version is ML 8.0.1.2/8.0.1.2, 32bit version.

    Actually we are using aspdotnetstorefront as the web store for our business solution. It is better that aspdotnetstorefront can fix this bug and publish the patch to its customers. But if aspdotnetstorefront will not fix this bug, I have no idea about how to make it work in my solution. Is it OK to change the source code by myself and build the DLL as a patch for my customers?

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Absolutely, provided you do not provide the source code to your customers that are not entitled to it.

    Also, thanks for the feedback. We certainly appreciate it when you guys take the time to track this type of stuff down. We've actually already got this one fixed for the next release
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    acqy is offline Junior Member
    Join Date
    Jan 2010
    Posts
    14

    Default

    Thanks!

    But how and where can I get the latest update of AspDotNetStorefront (with C# source)?

  4. #4
    acqy is offline Junior Member
    Join Date
    Jan 2010
    Posts
    14

    Default

    Hello George,
    Do you mean that the next release has fixed this bug? But in my license page I just found that the latest version is still 8.0.1.2. Do you mean that the next release which has fixed this bug has not been released to public?

    Thanks!

  5. #5
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    8.0.1.2 is the latest version still. This issue has been fixed for the version 9 release which is coming up soon.