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?