简体   繁体   English

如何设置SOAP Web服务

[英]How do i set up a SOAP webservice

First off a little context, I work for a channel manager company that builds custom endpoints for their clients to talk to. 首先,我在一家渠道管理公司工作,该公司为客户与他们建立对话的自定义端点。 We currently mostly code in c#. 我们目前主要使用c#进行编码。

This is the first time we are connecting with a client that asked us to support a soap web service. 这是我们第一次与要求我们支持Soap Web服务的客户建立联系。

Sadly, we don't have previous experience in this and I can't find any concrete explanations to what it looks like to support a SOAP call. 遗憾的是,我们没有这方面的经验,并且我无法找到支持SOAP调用的具体解释。

Currently, it looks like that I have to simply use text processing methods to run through the received XML and parse it in a non-generic way. 当前,看来我只需要简单地使用文本处理方法来处理接收到的XML,并以非通用的方式对其进行解析。

But this feels like there should be a more straightforward approach since the protocol is almost 20 years old. 但这感觉应该有一种更直接的方法,因为该协议已有近20年的历史了。

For almost every search result I only get examples of what the XML looks like, but what I'm interested in, is what I need to implement in my application to host an endpoint for the client to successfully post and receive a SOAP message from. 对于几乎每个搜索结果,我仅获得XML外观的示例,但我感兴趣的是我需要在应用程序中实现的内容,以承载用于客户端的端点,以便客户端成功发布和接收SOAP消息。 And if there is a way to do this without something like XmlWriters/Readers. 并且如果没有XmlWriters / Readers之类的东西可以做到这一点。

Anything to help me get on my way mary is appreciated! 凡能帮助我上路的我都会感激玛丽!

Greetings, Davey 问候,戴维

WCF is the least outdated library for offering SOAP. WCF是提供SOAP的最不老的库。

When you can define the contracts then you're in luck, that's just writing a C# interface. 当您可以定义合同时,您很幸运,这就是编写C#接口。

But when necessary you can also import WSDL specifications and generate C# from that. 但是,如果需要,您还可以导入W​​SDL规范并从中生成C#。

it looks like that I have to simply use text processing methods to run through the received XML and parse it 看起来我只需要简单地使用文本处理方法来处理接收到的XML并对其进行解析

Don't even consider that. 甚至不要考虑。 Everything is under control of schemas. 一切都在架构的控制之下。 And you will also have to generate valid return packages. 而且,您还必须生成有效的退货包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM