Welcome to thinktecture forums
Sign in
|
Join
|
Faq
Discussion
Started by pmadhav at 03-07-2008 5:24 AM. Topic has 0 replies.
thinktecture fo...
»
DynWsLib
»
Discussion
»
System.InvalidOperationException
Search
Sort Posts:
Oldest to newest
Newest to oldest
03-07-2008, 5:24 AM
pmadhav
Joined on 03-07-2008
Posts 1
System.InvalidOperationException
Hi All,
I have been using the Dynwslib for my asp.net application (version 1.5). We are still on asp.net 1.1/VS 2003.
The Dynwslib has been mostly working. We have been using the dll to access Webservices/ methods dynamically. Everything seems to be working fine on our local server (IIS 6.0, Windows 2003 server). We can access the WSDL from an external site using IE.
I recently posted the web service to my external server and wrote a small sample app to consuming it using Dynwslib. When I consume it using localhost everything works fine. Hoowever when I give the static IP, the behavior is inconsistent. Somethimes I get the exception
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Client found response content type of '', but expected 'text/xml'.
This is being thrown by the
object result = mi.Invoke(proxyInstance, paramsArray); call in the InvokeCall() method. I am not specifying any namespace in my webservice, could that be a problem? Appreciate any help on this.
Here is the code
private void Button1_Click(object sender, System.EventArgs e)
{
string sDisplayStateRequest= "Test value";
DynamicWebServiceProxy ws = new DynamicWebServiceProxy();
string sWebServiceURL = "http://www.domainname.com/ServiceConnector.asmx?WSDL";
ws.WSDL = sWebServiceURL;
string sTypeName = "SC";
ws.TypeName = sTypeName;
ws.MethodName = "GetInfo";
ws.AddParameter(new Guid("abbc599f-9618-4e3b-9a19-4a1a0f32fdf0"));
ws.AddParameter(sDisplayStateRequest);
//This parameter is used to call another method of a web service by the GetDisplayState method
ws.AddParameter("http://www.domainname.com/MyService.asmx?WSDL");
object oGetDisplayState = ws.InvokeCall();
string sRetVal = (string)oGetDisplayState;
Response.Write(sRetVal);
string sTemp="";
}
Thanks in Advance
Madhav
Report
thinktecture fo...
»
DynWsLib
»
Discussion
»
System.InvalidOperationException
(please select)
Forums Home
|- Search Forums
|- Active Topics
|- Unanswered Posts
User Options
|- Sign In
|- Join this community
|- Forgot Password
WSCF
|- Discussion
|- Feature Requests
|- Announcements
DynWsLib
|- Discussion
© 2002 - 2006 by thinktecture, Ingo Rammer and Christian Weyer. All rights reserved.