Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

My experience with web services is slim and I'm trying to understand this a little bit more. I have done for instance a web service using visual studio. In order to use it, I add a web service reference in my projects and this creates a proxy and the use is pretty simple. Does this use SOAP?

I ask this because i will be now facing a web service that i must communicate using SOAP with attachements and i'm trying to understand the concept behind this and the difference to what i have done so far. Will the proxy still be viable or do i need to create the XML by hand and post it to the web service?

This concepts still confuse and so any help is appreciated.

EDIT: I'm not developing the service, i will be just using it.

share|improve this question
3  
Who insists that you must use SOAP? –  Jim G. May 30 '12 at 11:36
    
If your just using it then cant you ask the supplier? (or read their documentation) –  Tom Squires May 31 '12 at 10:29
    
I have their documentation, but although it provides an input example (xml) it does not explain the concepts behind it. I'm trying to understand them before passing on to the coding itself. –  seth May 31 '12 at 13:19

1 Answer 1

The "Add web service reference" was a feature included in the first Visual Studio.NET (2002). As far as I recall, this default way of consuming web services does not deal with attachments. I think that you can create extensions that can handle attachments, but I think it gets a little hairy.

Since then a new communication framework, WCF, has been included in the .NET framework. This is a lot better at consuming a range of different types of services. I would suggest that you start by investigating this framework, and learn how you can consume a SOAP web service using this framework. I don't know how this copes with attachments in SOAP, but I think that it can handle them.

share|improve this answer
    
WCF, while it has its quirks and complexities, is a lot easier to work with than the old ASMX model. I used Base64 for attachments in a .NET 2.0 project. A bit clumsy but it worked. I haven't had this requirement for a WCF project yet so I don't know if it handles it better or not. –  jfrankcarr May 30 '12 at 12:05
    
I think when the question specifically refers to attachments, I think that this refers to a stream payload being transmitted outside the scope of the SOAP envelope, not a Base64 encoded string inside the SOAP envelope itself. I did work on a solution that did that, but it is almost 10 years ago, so I cannot in any way remember the details (and I wasn't involved in the particulars of carrying this stream either). –  Pete May 30 '12 at 12:12
    
I remember trying the streaming first and that didn't work for my situation (which involved encrypted content) so I switched to using Base64. –  jfrankcarr May 30 '12 at 13:15
    
See my updated question please. I will not be developing the service, just using it. –  seth May 31 '12 at 9:36

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.