Forum Replies Created
-
AuthorPosts
-
GUYS any help … If you notice even the namespace and structure of the document is same … I am clueless as to why the below error is coming
System.Web.Services.Protocols.SoapException: Server was unable to process request. —> System.InvalidOperationException: There is an error in XML document (1, 2). —> System.InvalidOperationException: <Order xmlns=’ConsureWebService.Order‘> was not expected.
Hi Nandika,
If you look at the MS article describing the new features of BizTalk Server 2009 (http://www.microsoft.com/biztalk/en/us/whats-new.aspx), there is a blurb on BizTalk Adapters for Host Systems 2.0, that touches on BI, as following:
Enhanced Business Activity Monitoring (BAM)
BizTalk Server 2009 provides new implementation for UDM cubes and scalable real-time aggregations with SQL Server 2008 Analysis Services, which enhances the BizTalk Business Activity Monitoring support for Microsoft Office Business Intelligence (BI) tools. BAM enhancements, support for Unified Dimensional Model (UDM) cubes in SQL Server Analysis Services, and scalable real-time aggregation.
Daniel.
Biztalk has a flat file ASN schema?
Here’s an explanation of the General Exception that I found in a blog:
“When catching exceptions, choosing ‘General Exception’ as the Exception Object allows Catch Exception blocks to handle exceptions which are not derived from System.Exception. The .NET framework allows any class to be raised as an exception, but some .NET languages such as C# impose a tighter restriction that exceptions must be System.Exception classes. ‘General Exception’ allows BizTalk to deal with any exception it may catch (and rethrow) from an external .NET component, regardless of the language that component was written in.“
[WebMethod] public XmlDocument OrderDocument(XmlDocument xmlDoc) { XmlSerializer deserializer = new XmlSerializer(typeof(sendOrder.Order)); string xmlString = xmlDoc.OuterXml.ToString(); byte[] buffer = ASCIIEncoding.UTF8.GetBytes(xmlString); MemoryStream ms = new MemoryStream(buffer); XmlReader reader = new XmlTextReader(ms); sendOrder.Order orderDoc = (sendOrder.Order)deserializer.Deserialize(reader); sendOrder.WebService_ConsureWebService ws = new sendOrder.WebService_ConsureWebService(); ws.Operation_1(ref orderDoc); return xmlDoc; }
While Debugging I am getting null value for the reader even thou I can still find the document in the xmlDoc passed as a parameter, please do let me know
Biztalk already has a ASN schema – you just need to unpack them from the Biztalk folder.
Can anybody please tell what is wrong with the code, as the error says there is an error in the XML document but if you check the document I am passing and the even the Order object its got the same structure and the namespace
There is an error in XML document (1, 2). —> System.InvalidOperationException: <Order xmlns=’http://ConsureWebService.Order’> was not expected.
I am using the below code snippet now to deserialize the XML document …
[WebMethod] public XmlDocument OrderDocument(XmlDocument xmlDoc) { XmlSerializer serializer = new XmlSerializer(typeof(sendOrder.Order)); string xmlString = xmlDoc.OuterXml.ToString(); byte[] buffer = ASCIIEncoding.UTF8.GetBytes(xmlString); MemoryStream ms = new MemoryStream(buffer); sendOrder.Order orderDoc = (sendOrder.Order)serializer.Deserialize(ms); sendOrder.WebService_ConsureWebService ws = new sendOrder.WebService_ConsureWebService(); ws.Operation_1(ref orderDoc); return xmlDoc; }
While debugging I am getting the below exception:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There is an error in XML document (1, 2). ---> System.InvalidOperationException: <Order xmlns='http://ConsureWebService.Order'> was not expected. at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOrder.Read3_Order() --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) at Service.OrderDocument(XmlDocument xmlDoc) in c:\Sugath\DoTNet Samples\WS Samples\ConsumeXML\App_Code\Service.cs:line 30 --- End of inner exception stack trace ---
The XML document I am passing is as below
<ns0:Order xmlns:ns0="http://ConsureWebService.Order"> <OrderId>OrderId_0</OrderId> <OrderName>OrderName_0</OrderName> </ns0:Order>
Also, this is the sendOrder.Order object I am trying to deserialize to:
namespace sendOrder
{
[Serializable]
[XmlType(AnonymousType = true, Namespace = “http://ConsureWebService.Order”)]
[GeneratedCode(“System.Xml”, “2.0.50727.3053”)]
[DebuggerStepThrough]
[DesignerCategory(“code”)]
public class Order
{
public Order();public string OrderId { get; set; }
public string OrderName { get; set; }
}
}Please do let know what is that I am missing out on ….
Hi Greg,
It does work when i set Output Property to Xml, but with 4 line itmes(It shuould be 3) and with wrond WRBTR data.
Please help.
Thanks,
Bhupal.
Looks like the problem is in the serialization of the output into a flat file.
Does the map work if you set the Test Output property to Xml rather than Native?
thank you
the System.SystemException works. Do you know what is the difference between System.SystemException and the default “General Exception” which I can choose in the “Exception Object Type” field?
Hi All,
Please help , this is critical for me.I can send screen shots of map, if that helps you to analyse my issue.
Invoking component…
C:\projects\OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMMap.btm: warning btm1005: The destination node “WRBTR” has 3 data input(s). The maximum number of possible data inputs to this node is 2.
C:\projects\OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMMap.btm: warning btm1005: The destination node “SGTXT” has 3 data input(s). The maximum number of possible data inputs to this node is 2.
C:\projects\OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMMap.btm: warning btm1005: The destination node “WRBTR” has 3 data input(s). The maximum number of possible data inputs to this node is 2.
C:\projects\OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMMap.btm: warning btm1005: The destination node “SGTXT” has 3 data input(s). The maximum number of possible data inputs to this node is 2.
Test Map used the following file: <file:///C:\projects\OTMInvoiceInterface\Sample File\Output\OutForIn.xml> as input to the map.
C:\Documents and Settings\genpact\Local Settings\Temp\1\Vetco_OTMMap_output.xml: error btm1048: Native serialization error: Cannot find definition for the input: WRBTR
Test Map failure for map file <file:///C:\projects\OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMInvoiceInterface\Vetco_OTMMap.btm>. The output is stored in the following file: <file:///C:\Documents and Settings\genpact\Local Settings\Temp\1\_MapData\Vetco_OTMMap_output.txt>
Component invocation succeeded.Thanks,
Bhupal.
November 11, 2009 at 4:44 PM in reply to: Expose over 100 DB2 Stored Procedures as WCF WebServices. #23742We can get to DB2 now using the HIS adapter. I know there is now a WCF adapter for MS-SQL. Not sure if LOB adapters work with DB2, but even if they did, how does that address my question. How do I do it in a massive way for over 100 stored procs?
Thanks,
Neal
November 11, 2009 at 2:49 PM in reply to: Expose over 100 DB2 Stored Procedures as WCF WebServices. #23741Hi Neal,
Take a look at this article that I came across, discussing WCF LOB Adapter SDK and WCF Channel Model:
http://blogdoc.biztalk247.com/article.aspx?page=ceb0a313-2588-41e0-a731-a5809b257609
Daniel.
Hi,
You should configure your Send Port Group’s Filters matrix to include this line:
Property Operator Value
BTS.MessageType == Namespace#RootNode
Where Namespace#RootNode is the target namespace of your out message’s schema, concatenated with the root node name of that schema, assuming that all your Send ports are subscribing to your out message.
Daniel.
-
AuthorPosts