473,830 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with invoking web method

Hi all,

I am getting following error while a user is trying to execute web method
from proxy class (proxy class inhertis from WebServicesClie ntProtocol class)

System.Xml.XmlE xception: There is an unclosed literal string. Line 1,
position 129.
at System.Xml.XmlS canner.ScanLite ral()
at System.Xml.XmlT extReader.SetLi teralValues(Xml AttributeTokenI nfo fld)
at System.Xml.XmlT extReader.SetAt tributeValues()
at System.Xml.XmlT extReader.Parse Element()
at System.Xml.XmlT extReader.Read( )
at Microsoft.Web.S ervices2.Xml.Xm lSkipDTDReader. Read()
at System.Xml.XmlL oader.LoadDocSe quence(XmlDocum ent parentDoc)
at System.Xml.XmlL oader.Load(XmlD ocument doc, XmlReader reader, Boolean
preserveWhitesp ace)
at System.Xml.XmlD ocument.Load(Xm lReader reader)
at Microsoft.Web.S ervices2.SoapEn velope.Load(Str eam stream)
at Microsoft.Web.S ervices2.Output Stream.Close()
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)
at XXX.YYY.ZZZ.Web Service.HelloWo rld(HelloWorldR equest helloWorldReque st)

This happens only on one of the users machine and I cannot use VisualStudio
to debug it :(. I am able to save to a file parameters of that web method
and they looks fine. Further more I have create a soap extension that
(SoapLogger : SoapExtension) that should help me with logging what I am
sending and recieving. For that purpose I have overridden ProcessMessage
function where I am serializing message stream to a file. That code works
fine on my machine but on user fails :(. I am still getting same error as
above.

Does anybody knows what I should do to be able to log some debug inforation
that will help me to find solution for above error?

Best regards

Marek S
Mar 28 '07 #1
2 3694
Hello Marek,

From your description, you're getting the following exception when
consuming a certain webservice on a partiuclar client machine, correct?
>>>>>>>>>>>>> >
System.Xml.XmlE xception: There is an unclosed literal string. Line 1,
<<<<<<<<<<<<< <

Based on my experience, such exception is normally caused by some
parameters passed in webmethod contains invalid string. For example, when
you directly pass string parameter that contains XML reserved
characters(such as < & ), it will make the SOAP xml message
corrupted. Here is a web thread discussing on this:

http://forums.microsoft.com/msdn/sho...14221&siteid=1

Also, from your test, you mentioned that the error occured even before soap
extension be able to log the message ,correct? That means the problem
occurs at the very begining (at client) when the runtime try parsing the
serialized soap XML content. Based on the code snippet you provided, the
webmethod's signature is as below:

==============
HelloWorld(Hell oWorldRequest helloWorldReque st)
==============

So the only possible cause if the HelloWorldReque st class(regardles s of
any environment &platform problem), would you provide detail definiation of
this body class. And is that particular problem client always pass some
particular string data into the HelloWorldReque st instance?

In addition, for that problem machine, you can check its .net framework
version and latest service pack install status, compare it with other
working client to see whether there is any difference.

Please feel free to let me know if you have any other finding on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 29 '07 #2
Hello Marek,

How are you doing on this issue, have you got any further progress? Based
on the nature of this issue, it may require complex and low level
throubleshootin g and debugging skills to inspect further into it, I would
suggest you contact CSS for further assistance if you feel it an urgent
issue:

http://msdn.microsoft.com/subscripti...t/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Apr 2 '07 #3

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

Similar topics

1
2367
by: Beenish Sahar Khan | last post by:
I'm using reflection to invoke some methods, now the general patteren of the function defination is private void FunctionName( argument1 , argument2) for some functions i don't need the argument2 but for some i do...is there any way using reflection to invoke the method but omit the last argument in some function definations while for other we use it. regards, Beenish Khan
3
4940
by: trialproduct2004 | last post by:
hi all i am having application which is using two classes. in one class i am creating instance of another class and calling method of that class. what i want is from inner class's method i want to invoke method of outer class. can i use delegates to do this. any help will be appreciated. thanks in advance.
3
6567
by: cartoper | last post by:
I am currently doing some R&D. The objective is to learn how to invoke methods via reflection using the InvokeMember method. The InvokeMember method throws an exception: Method 'ReflectionTest.Originator.AddToA' not found. Here is the code: using System; using System.Diagnostics;
1
5250
by: hazz | last post by:
how do I call a method from CellClick if a user performs a single click on a datagridview row and the same time allowing a double click event to be passed onto CellDoubleClick if the user performs a double click action? As it is now, the CellClick traps the single click event but does not allow a double click to pass through to the CellDoubleClick event. I do have to call a method from the CellClick event so I can't remove that method....
2
1961
by: shanmani | last post by:
Hi, I am developing a .NET application which will invoke the methods from different COM / .NET DLLs. While invoking methods from .NET DLLs, I am encountering the following error. I have also included the detail of the error stack trace and the code that I have written to invoking the methods. I would appreciate if you could let me know the cause of this error and possible workarounds to avoid this situation.
2
3620
by: Polaris431 | last post by:
I have an ASP.NET website that includes a web service in my project as well. The web service is a class within my website and not a separate project. I am trying to call a method in my web service locally on my development PC. If I set cookieless to true in the web.config file and then use the test form in the browser to try out the method, the method fails. I get the following message in the browser: System.InvalidOperationException:...
3
1631
by: Rotsey | last post by:
Hi, I am getting a Exception has been thrown by the target of an invocation error when invoking a method Here is the crux of the code. I realise it could be a few things, any one give me an idea where to start looking.
1
1701
by: hussain123 | last post by:
Hi All, I am invoking a procedure which takes 2 IN parameters and both are dates which are passed as string.In the procedure I am using those 2 IN parameters to query the db and fetch record between those two dates. In java I m doin something like:- String s_dt= "14/03/2006 09:30:30"; String e_dt= "15/04/2008 09:30:30"; String query = "begin ? := pkg.temp_proc(?, ?); end;"; CallableStatement proc = con.prepareCall(query);...
3
1717
by: artev | last post by:
if in a page I have a search form and I want use the method reset() for reinsert the default values, I notice that after a research, for the method reset(), the default values aren't more that first time loaded in the form but that of the form set for the search (I think so); see that the form is inner the same result's page, pheraphs the reset() 'see' how default values only the last form and not those that is loaded initially;
2
1039
by: mironline | last post by:
Dear Friends We have 2 console appllication console 1 method 1 : open console 2 method 2 : save data console 2 :
0
9786
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9641
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10479
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9312
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7741
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6948
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5616
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5778
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
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.