Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Regarding my question, I need to consume service and do some manipulation from what i get. This includes two questions for me, basically:

1) What kind of service is that?

I dont know what kind of service is that, how do i define it, i only have a link in this form: www.somesite.com/web/pages/xml/extractxml.aspx?argument1=vaue&argument2=value. So if i navigate to this thru the browser I'm promp'ed with xml file download. What kind of sercie is that? Is this SOAP?

2) Another question is, if i know what kind of service is this, how do I consume it?

Thanks in advance

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

First of all from your url - if that's the format of the url then you can not call it a so called 'service', but it's true that aspx page can return you xml, now the thing is how do you like to get the xml ('consume') through C#/VB code behind or client side with ajax, both are easy, I am giving you one short example with jQuery ajax way, you can figure out the rest -

$.ajax({
    type: "POST",
    url: "www.somesite.com/web/pages/xml/extractxml.aspx",
    data: "{'argument1': 'value','argument2':'value'}",
    contentType: "application/xml; charset=utf-8",
    dataType: "xml",
    success: function(msg) {
        //do work
    }
});    
share|improve this answer
    
can you give example of c# server side code? –  Shkipper Nov 23 '12 at 11:57
add comment

It looks like custom page returning XML based on given parameters. I doubt it follows any web service principles. It looks like you would need to create your own tool to process returned XML.

I think you should contact someone from that sites administration and maybe they could tell you more.

If this would be SOAP webservice, you can add it to as reference in Visual Studio, and it will generate apropriate code to access it and you can consume it through c# code. Please refer to WCF specs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.