473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

XML as parameter in webservice

I have written two simple webservice functions and trying
to consume them through a client piece. Both the
webservice functions have similar signature.
--------------------------------------------------------
public string quoteNew(System.Xml.XmlNode passedXML)

and

public string EmitXml(System.Xml.XmlNode passedXML)

---------------------------------------------------------

These two functions are defined in the same namespace and
same class.

So, in the client piece I have written code to acces these
webservices as:
-----------------------------------------------------------
--------
System.Xml.XmlDocument myDoc = new XmlDocument();

myDoc.Load("someXMl.XMl");

AccessWebServ.AttemptII.AttemptII ws = new
AccessWebServ.AttemptII.AttemptII();

string xmlOut1 = ws.EmitXml(myDoc.DocumentElement);
string xmlOut2 = ws.quoteNew(myDoc.DocumentElement);
-----------------------------------------------------------
----------

When I debug, I am seeing only EmitXml gets proper xml
passed 100% of the time and quoteNew gets xml with error
filled properties for node (especially Node.InnerXml is
filled with error message).

I get this even if I try one call at a time. I am using
VS.NET Professional evaluation version on windows 2000
server.

Any suggestions to resolve this problem?

Thank you.
Nov 11 '05 #1
1 3621
I apologize, but I don't have time to look at this in more detail, and I'll
be out for a few days. Have you posted this to the web services group?

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Srini" <us****@hotmail.com> wrote in message
news:0f****************************@phx.gbl...
For the two webServices, I am using same client
application. Also, I have both the webServices in the same
nameSpace and same class. So, I have added only one web
reference for both webServices in my client application. I
am using debug mode to see the flow and parameters passed.
When control gets into EmitXML, the parameter passedXML
shows all correct values (I am interested in innerXML
property and it shows that correctly). However, for the
same XML, when control comes into quoteNew all the
properties of passedXML show error. Here is the snapshot
of passedXML properties when control is on the first
executable statement of quoteNew:

- passedXML {System.Xml.XmlElement}
System.Xml.XmlNode
+ [System.Xml.XmlElement] {System.Xml.XmlElement}
System.Xml.XmlElement
System.Object {System.Xml.XmlElement}
System.Object
Attributes error: cannot obtain value
System.Xml.XmlAttributeCollection
BaseURI error: cannot obtain value string
ChildNodes error: cannot obtain value
System.Xml.XmlNodeList
Document error: cannot obtain value
System.Xml.XmlDocument
FirstChild error: cannot obtain value
System.Xml.XmlNode
HasChildNodes error: cannot obtain value
bool
InnerText error: cannot obtain value
string
InnerXml error: cannot obtain value
string
IsContainer error: cannot obtain value
bool
IsReadOnly error: cannot obtain value
bool
Item <cannot view indexed property>
System.Xml.XmlElement
Item <cannot view indexed property>
System.Xml.XmlElement
LastChild error: cannot obtain value
System.Xml.XmlNode
LastNode error: cannot obtain value
System.Xml.XmlLinkedNode
LocalName error: cannot obtain value
string
Name error: cannot obtain value string
NamespaceURI error: cannot obtain value
string
NextSibling error: cannot obtain value
System.Xml.XmlNode
NodeType error: cannot obtain value
System.Xml.XmlNodeType
NullNode error: cannot obtain value
System.Xml.XmlNode
OuterXml error: cannot obtain value
string
OwnerDocument error: cannot obtain value
System.Xml.XmlDocument
+ parentNode {System.Xml.XmlDocumentFragment}
System.Xml.XmlNode
ParentNode error: cannot obtain value
System.Xml.XmlNode
Prefix error: cannot obtain value string
PreviousSibling error: cannot obtain value
System.Xml.XmlNode
Value error: cannot obtain value string
XmlLang error: cannot obtain value string
XmlSpace error: cannot obtain value
System.Xml.XmlSpace
XPLocalName error: cannot obtain value
string
XPNodeType error: cannot obtain value
System.Xml.XPath.XPathNodeType
Since I am using same XML for both the services, why is
quoteNew not receiving proper properies?

Thanks for your help.
-----Original Message-----
Can you elaborate on the error? Are you 100% your

application is not
returning well-formed XML?

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

"Srini" <us****@hotmail.com> wrote in message
news:03****************************@phx.gbl...
I have written two simple webservice functions and trying to consume them through a client piece. Both the
webservice functions have similar signature.
-------------------------------------------------------- public string quoteNew(System.Xml.XmlNode passedXML)

and

public string EmitXml(System.Xml.XmlNode passedXML)

-------------------------------------------------------- -
These two functions are defined in the same namespace and same class.

So, in the client piece I have written code to acces these webservices as:
-------------------------------------------------------- --- --------
System.Xml.XmlDocument myDoc = new XmlDocument();

myDoc.Load("someXMl.XMl");

AccessWebServ.AttemptII.AttemptII ws = new
AccessWebServ.AttemptII.AttemptII();

string xmlOut1 = ws.EmitXml(myDoc.DocumentElement);
string xmlOut2 = ws.quoteNew(myDoc.DocumentElement);
-------------------------------------------------------- --- ----------

When I debug, I am seeing only EmitXml gets proper xml
passed 100% of the time and quoteNew gets xml with error
filled properties for node (especially Node.InnerXml is
filled with error message).

I get this even if I try one call at a time. I am using
VS.NET Professional evaluation version on windows 2000
server.

Any suggestions to resolve this problem?

Thank you.

.

Nov 11 '05 #2

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

Similar topics

0
by: cem marifet | last post by:
I am trying to pass in a value of null to a webservice parameter. I 've tried xsi:nil="true" attribute on the parameter tag. But it is not recognizing the value as null. Is there any thing else...
0
by: K Altsj? | last post by:
If passing a DataSet to a web method for update using ADO.NET and the update fails, the parameter list may get corrupt. The following code example consists of a Web Service and a consumer console...
5
by: Pete Hearn | last post by:
Hello All, New to the whole C#/Webservice/ADO.NET thing, so apologies in advance if this is a daft question! I have a webservice which returns a dataset - no problem there and all very...
9
by: Martin | last post by:
Hi all, I have a Webservice in C#, I call this webservice function with a parameter as String object (named pMessage) In the function the String object pMessage will be set to corresp. messsage....
6
by: placek | last post by:
Hi all. I would like to create two web services: - The first one - ImportData - should take as an input parameter a XML document and return an integer saying if passed XML document was valid...
1
by: Tarlanim | last post by:
Hi, i'm looking for a way to pass parameter from a HTML-File to a XML-File. In HTML-File i have a reference to XML-File and i want to use the parametre from the HTML-File in XML-File (Parameter...
0
by: Sivajee Akula | last post by:
Hello All, I am trying to consume a .NET Service from Adobe LiveCycle Workflow. The service deals with complex objects. I am getting the following exception at the time of invocation of the...
4
by: =?Utf-8?B?QmlsbEF0V29yaw==?= | last post by:
Hi, We recently converted a 1.1 project to 2.0 and this included a webservice which accepted XML for one of the parameters. Since converting to 2.0 I am getting the following message: --- A...
1
by: santoshsri | last post by:
Hi All, My C# web application calls a webservice to process a report. It sends XMLs as parameter and in response gets an XML node which stores Binay datatype bin.base64. It makes an instance of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.