Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OperationContract(IsOneWay = true) still generates the <wsdl:output #493

Closed
gsaggu opened this issue Jun 18, 2020 · 7 comments
Closed

OperationContract(IsOneWay = true) still generates the <wsdl:output #493

gsaggu opened this issue Jun 18, 2020 · 7 comments

Comments

@gsaggu
Copy link

gsaggu commented Jun 18, 2020

hi,
does anyone have an idea why setting the operation service as void and IsOneWay = true generates the <wsdl: output> under operation. Is there a way to avoid the Output from WSDL

public interface IResponseService { [OperationContract(IsOneWay = true)] void SaveResponse(SaveResponseModel inputModel); }

<wsdl:operation name="SaveResponse"> <wsdl:input wsam:Action="https://rc-api-qual.agconnect.org/IResponseService/SaveResponse" message="tns:IResponseService_SaveResponse_InputMessage"/> <wsdl:output wsam:Action="https://rc-api-qual.agconnect.org/IResponseService/SaveResponseResponse" message="tns:IResponseService_SaveResponse_OutputMessage"/> </wsdl:operation>

@gsaggu
Copy link
Author

gsaggu commented Jun 22, 2020

any help here would be appreciated guys! :( kind of stuck here with .net Core 3.1. I tried same service in WCF legacy style. it works as expected and the wsdl generation also doesn't include any OUTPUT

@gsaggu
Copy link
Author

gsaggu commented Jun 22, 2020

my modal and service contract as follows

  [Serializable]
   [DataContract ]
   public class SaveResponseModel
   {
       [DataMember(IsRequired = true)]
       public int request_id { get; set; } = 0;
     
       [DataMember (IsRequired = true ,EmitDefaultValue = false)]
       public string status { get; set; }
       
       [DataMember(IsRequired = false, EmitDefaultValue = false)]
       public string error_message { get; set; }
   }

   [ServiceContract()  ]
   public interface IResponseService
   {
       [OperationContract(IsOneWay = true)]
       void SaveResponse(SaveResponseModel inputModel);
   }

@gsaggu
Copy link
Author

gsaggu commented Jun 23, 2020

@kotovaleksandr please, if you can help me out here would be highly appreciated

@kotovaleksandr
Copy link
Member

Hi @gsaggu !
Check on latest commit:
c5753b0

@gsaggu
Copy link
Author

gsaggu commented Jun 24, 2020

@kotovaleksandr thansk alot :) it looks good

adding your fix If(!operation.IsOneWay) on line 562 (MetaBodywriter.cs) and line 969 (MetaWCFBodyWriter.cs) under AddBinding method makes it perfect

WSDL is also now validated by https://www.wsdl-analyzer.com/

can you pull this fix to your latest release, again thanks a lot man :) you made my day

@kotovaleksandr
Copy link
Member

Please check on latest nuget package https://www.nuget.org/packages/SoapCore/1.1.0.1-beta

@gsaggu
Copy link
Author

gsaggu commented Jun 24, 2020

this is awesome :) thanks really appreciate your help

@gsaggu gsaggu closed this as completed Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants