2
Vote

Exception has been thrown by the target of an invocation.

description

What am I doing ?
Trying to invoke a Method after filling the details that is about it without any modifications to WebServiceStudio.
Everything went through seamlessly
Generating WSDL
Generating Proxy
Compiling Proxy
Generated Assembly
Reflecting Proxy Assembly

Ready To Invoke

The Method I invoked had a Class Parameter which has fields.
These where populated using the tool.
object result = method.Invoke(proxy, BindingFlags.Public, null, parameters, null);
Inner Exception
{"Data at the root level is invalid. Line 1, position 1."}
 
" at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at WebServiceStudio.MainForm.InvokeWebMethod() in C:\TAutomation\New folder\WebServiceStudio\MainForm.cs:line 723\r\n at WebServiceStudio.MainForm.buttonInvoke_Click(Object sender, EventArgs e) in C:\TAutomation\New folder\WebServiceStudio\MainForm.cs:line 128\r\n at System.Windows.Forms.Control.OnClick(EventArgs e)\r\n at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\r\n at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.ButtonBase.WndProc(Message& m)\r\n at System.Windows.Forms.Button.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at WebServiceStudio.MainForm.Main() in C:\TAutomation\New folder\WebServiceStudio\MainForm.cs:line 770\r\n at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"

comments