从VB.net调用java webservice [英] Calling java webservice from VB.net
问题描述
大家好,
我试图从VB.net控制台应用程序中的tomcat服务器调用web服务但是我在运行vb控制台客户端应用程序时遇到错误任何人都可以帮我解决这个问题问题。
提前致谢
控制台出错了
System.InvalidOperationException未处理
消息="有一个XML文档中的错误(1,285)。"来源=" System.Xml"
StackTrace:
在System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,String encodingStyle ,XmlDeserializationEvents事件)
在System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,String encodingStyle)
在System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage消息,WebResponse响应,流responseStream) ,Boolean asyncCall)
在System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName,Ob ject []参数)
在TZApplicationGEClient.TZApplicationGW.login(LoginRequestType LoginRequest)中的C:\Documents and Settings \ rajkumar \ My Documents\Visual Studio 2005 \Projects\TZApplicationGEClient \TZApplicationGEClient \ TZApplicationGW.vb:第56行在TZApplicationGEClient.BaseClient.Login()中的C:\Documents和Settings \ rajkumar \ My Documents \ Visual Studio 2005 \Projects \TZApplicationGEClient \TZApplicationGEClient \ BaseClient .vb:第17行在TZApplicationGEClient.ConsoleClient.DoLogin()中的C:\Documents and Settings \rajkumar \ My Documents\Visual Studio 2005 \Projects\TZApplicationGEClient\TZApplicationGEClient\ConsoleClient。 vb:第78行在TZApplicationGEClient.ConsoleClient.Execute()中的C:\Documents和Settings \ rajkumar \ My Documents \ Visual Studio 2005 \Projects \TZApplicationGEClient \ TZApplicationGEClient \ConsoleClient.vb:第37行在CZ的TZApplicationGEClient.Application.Main()中:\ Documents and Settings \ rajkumar \ My Documents \ Visual Studio 2005 \Projects \TZApplicationGEClient \\ \\ TZApplicationGEClient \ Application.vb:第17行,在System.AppDomain.nExecuteAssembly(Assembly assembly,String [] args)
在System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
在System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext,String [] activationCustomData)
在System.Runtime.Hosting.ApplicationActivator.CreateInstance (ActivationContext activationContext)
在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
在System.Threading.ThreadHelper.ThreadStart_Context(对象状态)<在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)中,在System.Threading.ThreadHelper.ThreadStart()
< blockquote>你可以发布你想要解析的XML吗?看起来像XML文件中的无效标记,但需要查看XML文件以进行确认。这也不是提问XML相关问题的正确论坛。
Hi All,
I am Trying to call the webservice from tomcat server in VB.net console application but i am getting error on running vb console client application can any one help me out in fixing this problem .
Thanks in Advance
Error in the console is
System.InvalidOperationException was unhandled
Message="There is an error in XML document (1, 285)."
Source="System.Xml"
StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at TZApplicationGEClient.TZApplicationGW.login(LoginRequestType LoginRequest) in C:\Documents and Settings\rajkumar\My Documents\Visual Studio 2005\Projects\TZApplicationGEClient\TZApplicationGEClient\TZApplicationGW.vb:line 56
at TZApplicationGEClient.BaseClient.Login() in C:\Documents and Settings\rajkumar\My Documents\Visual Studio 2005\Projects\TZApplicationGEClient\TZApplicationGEClient\BaseClient.vb:line 17
at TZApplicationGEClient.ConsoleClient.DoLogin() in C:\Documents and Settings\rajkumar\My Documents\Visual Studio 2005\Projects\TZApplicationGEClient\TZApplicationGEClient\ConsoleClient.vb:line 78
at TZApplicationGEClient.ConsoleClient.Execute() in C:\Documents and Settings\rajkumar\My Documents\Visual Studio 2005\Projects\TZApplicationGEClient\TZApplicationGEClient\ConsoleClient.vb:line 37
at TZApplicationGEClient.Application.Main() in C:\Documents and Settings\rajkumar\My Documents\Visual Studio 2005\Projects\TZApplicationGEClient\TZApplicationGEClient\Application.vb:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Can you post the XML you are trying to parse. Looks like an invalid tag in the XML file but would need a look at the XML file to confirm. Also this is not the correct forum to ask XML related issues.
这篇关于从VB.net调用java webservice的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!