473,473 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Parameter being an attribute, not an element

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 be in the form of:

<MyRequest MyParameter="Value />

When I make a WebMethod in my Web Service, using Visual Studio .Net
2003, like:

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

The Web Service will only accept an XML request in the form of:

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

I cannot make the third party change their XML request. I've been
scouring the Internet and the MSDN for a while, and only came across a
ParameterStyle modifier, which still make the parameters be elements.

Please help!

Thank you in advance,
Marcus Grant

Nov 23 '05 #1
1 791
Sorry about the double post. I was under the impression that the first
post was unsuccessful.

Thanks,
Marcus

Nov 23 '05 #2

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"...
0
by: grantmarcus | last post by:
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
1
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...
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 ...

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.