从VB.net调用java webservice [英] Calling java webservice from VB.net

查看:91
本文介绍了从VB.net调用java webservice的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我试图从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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆