473,471 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Web service method call exception

dpp

Hi

I am calling a method of a .NET component from both win forms and web
service applications.

Strangly, it is working fine from win forms application, but when i
call the same method (same code with same input values) of that . NET
component from the web service method it is giving the following
exception,

[System.ArgumentException] {"Object type cannot be converted to target

type." }

_remoteStackTraceString "\nServer stack trace: \n at
System.Reflection.RuntimeFieldInfo.InternalSetValu e(Object obj, Object
val, BindingFlags invokeAttr, Binder binder, CultureInfo culture,
Boolean requiresAccessCheck, Boolean isBinderDefault)\r\n at
System.Runtime.Serialization.FormatterServices.Ser ializationSetValue(MemberInfo
fi, Object target, Object value)\r\n at
System.Runtime.Serialization.FormatterServices.Pop ulateObjectMembers(Object
obj, MemberInfo[] members, Object[] data)\r\n at
System.Runtime.Serialization.Formatters.Soap.ReadO bjectInfo.PopulateObjectMembers()\r\n
at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.ParseObjectEnd(ParseRecord
pr)\r\n at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.ParseMemberEnd(ParseRecord
pr)\r\n at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.Parse(ParseRecord
pr)\r\n at
System.Runtime.Serialization.Formatters.Soap.SoapH andler.EndElement(String
prefix, String name, String urn)\r\n at
System.Runtime.Serialization.Formatters.Soap.SoapP arser.ParseXml()\r\n
at System.Runtime.Serialization.Formatters.Soap.SoapP arser.Run()\r\n at
System.Runtime.Serialization.Formatters.Soap.Objec tReader.Deserialize(HeaderHandler
handler, ISerParser serParser)\r\n at
System.Runtime.Serialization.Formatters.Soap.SoapF ormatter.Deserialize(Stream
serializationStream, HeaderHandler handler)\r\n at
System.Runtime.Remoting.Channels.CoreChannel.Deser ializeSoapRequestMessage(Stream
inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel
securityLevel)\r\n at
System.Runtime.Remoting.Channels.SoapServerFormatt erSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& responseMsg, ITransportHeaders&
responseHeaders, Stream& responseStream)\n\nException rethrown at [0]:
\n" string
I don't know how come the same code is working from the win forms
button action.

Can anyone please suggest me on might be the problem. I both cases i am
referencing the .NET dll to the application.

Thanks,
DPP
--
dpp
------------------------------------------------------------------------
dpp's Profile: http://www.hightechtalks.com/m268
View this thread: http://www.hightechtalks.com/t2286146

Nov 23 '05 #1
0 1311

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Hardy Wang | last post by:
Hi all: I read an article from http://www.c-sharpcorner.com/Code/2003/Sept/InstallingWinServiceProgrammatically.asp about how to install a windows service programmatically. Based ont the code...
1
by: Ajay Pal Singh | last post by:
Hi, I am making an windows service similar to windows task schedular. The service would invoke the methods of some assemblies at some predefined schedules. (windows service read the...
5
by: Dhilip Kumar | last post by:
Hi All, I'm writing a Windows Service app using C#. I need to read some configuration settings before the service starts up. These settings will be used by the service in its operation. ...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
0
by: whizpop | last post by:
Hi, First of all, thanks for a great starter kit, now If I could just get it to work (fully). I am trying to compile and run the solution/services all on a local dev box. I am able to...
1
by: Scott Yen | last post by:
Hi, I'm using the following Axis java client to invoke a .Net web service hosted my localhost. Although the username and password is set on the "call", client gets (401) Access Denied"...
2
by: Richard Collette | last post by:
Hi, I have a service, that runs perfectly when executed outside of the web service environment. When called as a web service I get the exception listed below sporadically. A call to the web...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
6
by: alho | last post by:
The web service is called by a program running on pocket pc. When to call the web service, the first call is still ok, but for the second or later calls, it will throw "403 Forbidden" WebException....
4
by: dlc9s | last post by:
Hi All, I have a JSR 168 portlet that I need to call a J2EE 1.4 JAX-RPC Web Service. I'm using Oracle 10g JDeveloper. (I don't have a choice about this). It works when I call the sync method, but...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.