开发者

receive xml file as a parameter to a .net web service

My company is currently looking into bringing a new piece of third party software in for online ordering. The software does not handle pricing so they are requesting the pricing information from a web service. Their software is passing an XML file as a parameter, and expecting an XML file as a response. I would think that returning an XML file would be pretty straight forward, but I cannot think of a way to receive an XML file as a parameter. Has anyone done this, or am I missing something really obvious?开发者_如何学Python


Possibly obvious - an XML "file" can be represented by a String.

Edit to Answer Comment

The string is the XML file, so all you need to do is deserialize it into the classes created from the XSD:

Dim xmlString As String = GetStringFromVendor()
Dim xmlClass As New CoolXMLClass
Dim serializer As New Xml.Serialization.XmlSerializer(GetType(CoolXMLClass))
xmlClass = serializer.Deserialize(New StringReader(xmlString))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜