Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi Guys,

 

I have been finding for this answer for quite some time but fail.

My question is that can we control that xml output from a web service?

 

Let me explain

 

I have a small method like this in my web service

 

      public decimal AddNumbers(decimal lnNumber1, decimal lnNumber2)   {

           return lnNumber1 + lnNumber2; 

     }

 

After data is keyed in, i automatically get this format.

 

<?xml version="1.0" ?> 

<decimal xmlns="http://tempuri.org/">32.12</decimal> 

 

So here, can i change the xml format in a web service?

 

Maybe i want this format

 

<?xml version="1.0" ?> 

<number1> 2 </number1>
<number2> 3 </number2>
<results> 5 </results>

 

This is just a sample, i want to do something like this, but it seems web service doesnt allow me to do this.

 

I hope someone can provide me with some useful links,suggesstions or codes on how to do this..

 

thank you very very much for any help

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...