Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Error while calling a .NET function
- This topic has 5 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
September 10, 2009 at 1:50 PM #23220
My Orch has given a call to .NET function returning a boolen. On the basis of return value, I am giving a call to SQL Adapter..
Function looks like ..
public bool Savee(XLANGMessage order)
{
XmlDocument Order = (XmlDocument) order[0].RetrieveAs(typeof(XmlDocument));
System.Diagnostics.EventLog.WriteEntry(“Test’, Order.InnerXml);
return true;
}Class has serializable attribute..etc etc…
However I am receiving error below…and if I removed call to .NET MyOrch is working fine….
Error….
Failed while creating a MyReceiveOrder service.Exception type: ServiceCreationException
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._serviceCreator(Guid& instanceId, Object objCurrMsg)
at Microsoft.XLANGs.Core.ResourceContainer._allocateResource(Guid& key, UInt32 hashKey, ResourceCreator resCreator, Object creationContext)
at Microsoft.XLANGs.Core.ResourceContainer.Dispense(Guid& key, ResourceCreator resCreator, Object creationContext)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._dispenseService(Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._tryReceiveOneMessage(Boolean& loggedError, Guid& instanceId, IBTMessage currMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._receiveOneMessage(Guid& instanceId, Guid& serviceId, IBTMessage currentMsg)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession.ReceiveMessages(IBTMessage[] messages, Int32 firstIdx, Int32 count)
at Microsoft.BizTalk.XLANGs.BTXEngine.AppDomains.AppDomainRoot.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object objMsg)
at Microsoft.XLANGs.BizTalk.CrossProcess.AppDomainStubProxy.Microsoft.XLANGs.BizTalk.ProcessInterface.IAppDomainStub.ReceiveMessages(Object msgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
at System.Threading.Thread.CompleteCrossContextCallback(InternalCrossContextDelegate ftnToCall, Object[] args)
Additional error information:
Exception has been thrown by the target of an invocation.
Exception type: TargetInvocationException
Source: mscorlib
Target Site: Void _SerializationInvoke(System.Object, System.SignatureStruct ByRef, System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
The following is a stack trace that identifies the location where the exception occured
at System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.RuntimeMethodHandle.SerializationInvoke(Object target, SignatureStruct declaringTypeSig, SerializationInfo info, StreamingContext context)
at System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at Microsoft.XLANGs.Core.ObjectSerializer.DeserializeStateManager(Guid stateId, Stream s, StringLookup lookup)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._deserializeService(Guid& instanceId, StringLookup sl, Stream stateData)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg)
Additional error information:
Invalid ‘Key’ node inside constraint named: Pool_Order.
Exception type: DataException
Source: System.Data
Target Site: Void HandleKeyref(System.Xml.Schema.XmlSchemaKeyref)
The following is a stack trace that identifies the location where the exception occured
at System.Data.XSDSchema.HandleKeyref(XmlSchemaKeyref keyref)
at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef)
at System.Data.XSDSchema.HandleTable(XmlSchemaElement node)
at System.Data.XSDSchema.HandleDataSet(XmlSchemaElement node, Boolean isNewDataSet)
at System.Data.XSDSchema.LoadSchema(XmlSchemaSet schemaSet, DataSet ds)
at System.Data.DataSet.ReadXSDSchema(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXmlSchema(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.DeserializeDataSetSchema(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat, SchemaSerializationMode schemaSerializationMode)
at System.Data.DataSet.DeserializeDataSet(SerializationInfo info, StreamingContext context, SerializationFormat remotingFormat, SchemaSerializationMode schemaSerializationMode)
at System.Data.DataSet..ctor(SerializationInfo info, StreamingContext context, Boolean ConstructSchema)
at System.Data.DataSet..ctor(SerializationInfo info, StreamingContext context)
Thanks in advance…
-
September 11, 2009 at 2:56 AM #23222
are you connecting to Local server or remote SQL server ?
if it’s a remote , domain User must be a user of SQL database
-
September 11, 2009 at 9:30 AM #23227
Everything is on same server… If i don’t give a call to .NET code everything is working fine…
-
September 14, 2009 at 7:09 AM #23236
Any chance of seeing the rest of your class definition.
Although you mark your class as Serializable, if it contains a non-serializable class, it will throw an exception at runtime.
-
-
-
September 14, 2009 at 10:41 PM #23248
It is some thing related to your order details
check error Invalid ‘Key’ node inside constraint named: Pool_Order
Try following code
public bool Savee(XLANGMessage order)
{
System.Diagnostics.EventLog.WriteEntry(“Test’, ‘My Order’);
return true;
}Comment order code and then run; If it executes successfully then there is something wrong with your order object
-
October 27, 2009 at 1:24 AM #23539
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.