简体   繁体   English

WCF响应无效方法

[英]WCF response from void method

I am trying to access WCF service. 我正在尝试访问WCF服务。 Please check image 1 请检查图片1 图片1

Please check image 2 of how to implement the service. 请检查如何实施服务的图像2。 图片2

The method is void and it says it writtens Workspaceid in the response which i am looking for. 该方法无效,它说它在我正在寻找的响应中写了Workspaceid。

This is how i am implementing 这就是我实施的方式

  CreativeAssetServiceClient creativeAssetServiceClient = new CreativeAssetServiceClient();
 creativeAssetServiceClient.CreateWorkspace(token, creativeTags, filenameWithoutExtension, filenameWithoutExtension, file, ref folder);

I am able to create the workspace but the workspaceid is coming in response and i dont know how to get the response because the method is void. 我能够创建工作空间,但工作空间ID即将响应,并且我不知道如何获取响应,因为该方法无效。 I tried to convert void into string but it does not work. 我试图将void转换为字符串,但不起作用。 Can anyone tell me how can i get the response workspaceid. 谁能告诉我如何获取响应workspaceid。 Help would be appreciated .Thanks 帮助将不胜感激。谢谢

WorkspaceId is being returned in "folder" variable. WorkspaceId将在“文件夹”变量中返回。 Note: folder variable is marked with ref keyword. 注意:文件夹变量用ref关键字标记。 In WCf, ref keyword indicates that data is returned from service. 在WCf中,ref关键字指示从服务返回数据。 so in this case folder variable which is workspace id is returened as reponse from service. 因此,在这种情况下,作为工作区ID的文件夹变量将重新设置为服务响应。

WorkspaceId是一个ref参数,因此您的数据将在文件夹 param中。

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

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