Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Call to Wrapper class

9 views
Skip to first unread message

heena relan

unread,
Jul 30, 2014, 7:45:47 AM7/30/14
to
Hi,

I have method to which i have to call through biztalk in expression shape.

public static List<ProductDto> GetManuScriptListFromDCT(string UserName, string Password, string DCTServerURL, DateTime DCTEffectiveDate)
{
StringBuilder requestTextVerifyProducer = new StringBuilder();
List<ProductDto> ManuScriptList = new List<ProductDto>();

string manuScriptVersion1 = string.Empty;
string manuScriptVersion2 = string.Empty;
string ManuScriptName = string.Empty;
string dctEffectiveDate = string.Empty;
SingletonExampleConnectionDetails.Instance.SessionId = null;

string verifyUserResponse = VarifyUser(UserName, Password, DCTServerURL,DCTEffectiveDate);

if (verifyUserResponse == "success")
{

ResumeCurrentSession(SingletonExampleConnectionDetails.Instance.SessionId);

//manuScriptVersion1 = ConfigurationManager.AppSettings["DCTversionManuScript1"];
//manuScriptVersion2 = ConfigurationManager.AppSettings["DCTversionManuScript2"];

string manuScriptServerRequest = "<ManuScriptBroker.listRq >" +
"<key>" +
//"<key name = \"lob\" operator = \"=\" value = \"CarrierCPP\" >" +
//"</key>" +
"<key name = \"productCode\" operator = \"=\" value = \"Pages\" >" +
"</key>" +
//"<key name = \"state\" operator = \"=\" value = \"US\">" +
//"</key>" +
//"<key name = \"version\" operator = \"&gt;=\" value = \"" + manuScriptVersion1 + "\" >" +
//"</key>" +
//"<key name = \"version\" operator = \"&lt;=\" value = \"" + manuScriptVersion2 + " \" >" +
//"</key>" +
"<key name = \"effectiveDateNew\" operator = \"!=\" value = \"Admin\" >" +
"</key>" +
"<key name = \"effectiveDateNew\" operator = \"&gt;=\" value = \"" + DCTEffectiveDate + "\" >" +
"</key>" +
"<sort name = \"effectiveDateNew\" direction = \"descending\" >" +
"</sort>" +
"</key>" +
"</ManuScriptBroker.listRq>";

XElement setManuScriptRq = XElement.Parse(manuScriptServerRequest.ToString());

XElement[] ManuScriptRequestObj = new XElement[1];

ManuScriptRequestObj[0] = setManuScriptRq;

XElement manuScriptResponse = CallServerRequest(ManuScriptRequestObj);

XElement successManuScriptRs = manuScriptResponse.XPathSelectElement("//ManuScriptBroker.listRs");


if (successManuScriptRs.Attribute("status").Value == "success")
{

ResumeCurrentSession(SingletonExampleConnectionDetails.Instance.SessionId);

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(successManuScriptRs.ToString());

foreach (XmlElement element in xmlDoc.DocumentElement)
{
if (element.Name.Equals("items"))
{
foreach (XmlNode manuScriptBrokerData in element.ChildNodes)
{
if (manuScriptBrokerData.Name.Equals("item"))
{
ManuScriptName = manuScriptBrokerData.Attributes["id"].Value;

}
foreach (XmlNode keysData in manuScriptBrokerData.ChildNodes)
{
if (keysData.Name.Equals("keys"))
{
foreach (XmlNode keyData in keysData.ChildNodes)
{
if (keyData.Attributes["name"].Value == "effectiveDateNew")
{
dctEffectiveDate = keyData.Attributes["value"].Value;

var obj = new ProductDto { ManuScriptName = ManuScriptName, EffectiveDate = Convert.ToDateTime(dctEffectiveDate), ExpirationDate = Convert.ToDateTime(dctEffectiveDate).AddYears(1), checkValue = 0 };

ManuScriptList.Add(obj);
}
}
}
}
}
}
}

}
else
{
throw new ExampleHelperException("Unable to get ManuScript. Response from EXAMPLE follows:" + System.Environment.NewLine + successManuScriptRs);
}

}
else
{
throw new ExampleHelperException("Unable to login in DCT server. Response from EXAMPLE follows:" + System.Environment.NewLine + verifyUserResponse);
}
return ManuScriptList;

}



In biztalk, I have created variable of type object and after a call to the application its giving the error" the method or operation is not implemented"

can anybody help me with this case???



Thanks
Heena
0 new messages