Link to home
Start Free TrialLog in
Avatar of ksfok
ksfok

asked on

ASP.NET partner XML response

I am working on a web site that should give a Url where a partner site can submit a Itemlevel status Response.
It includes validating entire message , validating sender etc . etc..
This url can be a page which can process cXML response or a webservice which simply receives XmlDocument and do the needful.
NOTE:- partner is not expecting any response from it , its just one way sending.

Please advise how to implement the above with ASP.NET

Thanks

Avatar of sanjeewaj
sanjeewaj
Flag of Sri Lanka image

Hi
You can create an ASP .NET web service project and create a web method to take input parameters of primitive types such as int, string etc.  Then call this web method via HTTP GET.

If you need to send an xml document you could send it via a string param.  

There could be a better way.  Hope this helps.

Sanjeewa
Example Web Method:
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
 
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    public Service () {
 
        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }
 
    [WebMethod]
    public void NoReturnWebMethod(int value1, int value2, string identification)
    {
        int val1 = value1;
        int val2 = value2;
        string username = identification;
        //Do some work.
    }
    
}
 
How to call the web method:
http://localhost/WebService/Service.asmx/NoReturnWebMethod?value1=1&value2=2&identification=sanjeewa

Open in new window

Avatar of ksfok
ksfok

ASKER

Should this WS be hosted as a separate web site? Or could it be added to an existent one? Please advise how either way.

Also what should be done about authentication and security?
ASKER CERTIFIED SOLUTION
Avatar of sanjeewaj
sanjeewaj
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ksfok

ASKER

Please continue with authentication and security?
This article provides info on WS-Security.

http://www.devx.com/security/Article/15634