473,324 Members | 2,002 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,324 software developers and data experts.

Parameter as Attribute, Not Element

Hello All,

How can I make a C# web service accept a parameter as an attribute of
the requesting XML instead of an element?

I need to write an interface for a third party, which will call my web
service in the form of:

<MyRequest MyParameter="Value">

When writing web service code with C# (Visual Studio .Net 2003), I have
a function of:

[WebMethod]
public int MyRequest( int MyParameter )
{
return 0;
}

And that function only accept an XML request in the form of:

<MyRequest>
<MyParameter>Value</MyParameter>
<MyRequest>

Searching through the Internet and the MSDN, I can only find reference
to a ParameterStyle, but that still uses elements for parameters.

Please help!

Thank you in advance,
Marcus Grant

Nov 23 '05 #1
0 749

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

Similar topics

0
by: Ingrid | last post by:
Am I right in thinking that datatyping at element level ie <xs:element name="num" type="xs:integer"> and specifying a choice of attribute values ie <xs:attribute name="kind"> <xs:simpleType>...
2
by: J Krugman | last post by:
I have a form with a couple of submit buttons, plus a "pseudolink" that is also supposed to submit the form; the submitted form data feeds to a CGI script. The two submit buttons have the name...
0
by: Alexandre T. | last post by:
Hi, I am currently using xsd.exe to generate C# classes from XSDs. Sample XSD file: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault=" qualified"...
1
by: grantmarcus | last post by:
Hello All, How do you make a C# Web Service use an attribute of an XML request as a parameter instead of an element? I need to write an interface for a third party where the XML request will...
1
by: arnold | last post by:
Hi, I've been knocking my head against the wall trying to create an XSL transform to perform "normalizations" of a set of XML files that have a common structure. % XML file before transform
3
by: patrizio.trinchini | last post by:
Hi, how can remove sibling elements based on the value of an attribute ? For instance, gven the XML document: <root> <parentElment> <testElement name="A"> <removableElement/>
3
by: Jon | last post by:
I have an xml document like so... <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:ng="http://newsgator.com/schema/extensions"> <channel> <title></title> <link></link>...
10
by: SQL Server | last post by:
I am writing a function which will take two parameters. One the field to be returned from a table and second parameter is the ID of the record to be returned. Problem is it's not returning the...
7
by: mrdancu | last post by:
Hi I am very new to XSLT and have the following problem: I would like to use a parameters value for the path to an attribute in my select query. For example: I have an attribute named "pi" for...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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.