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

support for FaultContractAttribute in service definition wsdl generated by XmlSerializer #987

Conversation

edgridin
Copy link
Contributor

@edgridin edgridin commented Jan 8, 2024

To achieve similar behavior with DataContract serializer, it will be ensured, that the naming of fault contract message ends with suffix Fault - if the class ends with Fault, the name remains, otherwise the suffix is added.

For each specified FaultContract attribute

  • an element is added
    <xsd:element name="OperationFault" nillable="true" type="tns:OperationFault" />

  • a corresponding complex type is specified

      <xsd:complexType name="OperationFault">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="1" name="Code" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Message" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
  • fault is added after input and output messages under portType -> operation
    <wsdl:fault name="OperationFault" message="tns:IServiceWithFaultContracts_GetEnum_OperationFault_FaultMessage" />

  • fault is added after input and output messages under binding -> operation

      <wsdl:fault name="OperationFault">
        <soap:fault use="literal" name="OperationFault" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" />
      </wsdl:fault>

@edgridin
Copy link
Contributor Author

hi @andersjonsson ,
sorry for disturbing, I know, we all are busy with other projects, but maybe you could take a look at this PR?
Thank you in advance.

best regards,
Ed

Copy link
Collaborator

@andersjonsson andersjonsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I don't know enough about Faults to be sure but it looks fine to me 😅

@andersjonsson andersjonsson merged commit 50ea01e into DigDes:develop Jan 19, 2024
3 of 4 checks passed
@edgridin
Copy link
Contributor Author

thank you @andersjonsson !
I don't know that much about Github, but do you think, it could be possible, to have kind of continuous delivery? So that a PR merged in develop would automatically publish a new package version on Nuget?
Would save some time for you and other maintainers, don't you think?

Best regards,
Eduard

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

Successfully merging this pull request may close these issues.

2 participants