简体   繁体   中英

WCF Service with Windows Foundation

After some looking around, I'm getting the feeling that this approach isn't the best one for the issue I'm trying to resolve, but figured I'd have one last attempt at trying to find a resolution here before I move on to a new approach.


I have the current service layout below and I am trying to achieve the following:

  • Initial request will have a value in the query string and then the rest of the data will be sent up inside a HTML form post application/x-www-form-urlencode
  • The CsvLookup will extract information from the posted form data, carry out some processing on it and then return a JSON formatted response to the calling client
  • The goal with using WF is that, once we have written the activities, we can simply swap out the CsvLookup activity for an SQL DB lookup or something else later on down the line without needed to change any code on the server, the data we receive on this service will always be in the same format and will always be expected to be sent back in the same format as well, it is the intermediary stuff we're hoping to address with this approach

顺序服务


As you can see above, at the moment I have all the variables declared individually within this service and inside the activity I have them declared as such.

public InArgument<string> AccessEmail { get; set; }
public InArgument<Guid> PackageId { get; set; }
public InArgument<string> OwnerEmail { get; set; }
public InArgument<string> Ip { get; set; }
public OutArgument<string> Response { get; set; }

My question is hopefully a fairly straight forward on; Is it possible to assign a service variable to accept a form encoded post of data, or do all the variables need to be assigned individually?

Currently when using WcfTestTool , when I connect to the service, I see all the variables listed one after the other for me to declare, really, I want to declare one value for the query string and another for the main form data.

经过深入研究,我发现默认情况下,这种设置主要是针对SOAP调用的,因此要获得我想要的功能,使用标准WCF服务似乎是一个更好的主意然后在配置文件中控制功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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