Hi all,
i have an ejb with following methods
1. valid
2. getdetail
first method returns a simple string. and second returns a object which has many string in it. this returned object has all the getter ans setter funcation as well as it implements serilizable interface.
Now i have exposed this Ejb as web service. and i am trying to consume this web service from a .Net client but it gives following error.
Unhandled Exception: System.InvalidOperationException: There is an error in XML document (1, 407). ---> System.Xml.XmlException: This is an unexpected token. The expected token is 'EndElement'. Line 1, position 407.
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.ReadElementString()
at System.Xml.Serialization.XmlSerializationReader.ReadNullableString()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read9_CostCenter_ListOutputImpl(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read8_CostCenter_ListOutput(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read18_getListResponse()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
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 CostCenterSearchUI.CostCenterService.CostCenterService.getList(String costcenter, String controllingArea, String company, DateTime date, String lang, String[] instance, String[] client) in C:\Documents and Settings\divy\Desktop\CostCenterSearchDotNetUI\CostCenterSearchUI\Web References\CostCenterService\Reference.cs:line 71
at CostCenterSearchUI.Form1.btnGetList_Click(Object sender, EventArgs e) in c:\documents and settings\divy\desktop\costcentersearchdotnetui\costcentersearchui\form1.cs:line 304
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationCoThe program '[4136] CostCenterSearchUI.exe' has exited with code 0 (0x0).
ntext context)
at System.Windows.Forms.Application.Run(Form mainForm)
what might be the reason?
is it because soap message return by the web service is not compatable with dotNet. if it is so then we are loosing advantage of the web service.