So I am starting a project that I am having to interact with a 3rd parties web services using SOAP Protocol. This is the first time I am using SOAP, is it a correct assumption to say that SOAP's protocol is a wrapper around XML w开发者_Go百科ith a couple required elements (Header, Body...etc.)?
If using VS 2008, is the easiest approach to defining my XML using the System.XML.Linq library?
Finally, if I don't have access to the 3rd parties source code, what are the questions I want to find out from the 3rd party to figure out how to construct my XML for their web services to consume? Or is the only way for them to provide examples/precise details?
Thanks,
SOAP is, technically, a specialization or subset of XML. You are correct in your findings that SOAP requires certain elements.
In .NET, I'd argue that the best way to define a SOAP interface is to use WCF and simply let your Service Contract define your SOAP interface for you. No need to hack XML directly.
As far as being a client/consumer of a SOAP web service, if the service provides a WSDL file, you can create a service reference in your visual studio project and let the IDE generate a client proxy class for you.
精彩评论