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

error end of "wsp:Policy" element in WSDL #886

Closed
LadislavSmid opened this issue Jul 12, 2022 · 8 comments · Fixed by #912
Closed

error end of "wsp:Policy" element in WSDL #886

LadislavSmid opened this issue Jul 12, 2022 · 8 comments · Fixed by #912
Labels

Comments

@LadislavSmid
Copy link

in the current version 1.1.0.30
"wsp:Policy" element is not ending before "wsdl:types" element - the element is closing at the end of the wsdl

<wsp:Policy p10:Id="BasicHttpBinding_IConditionalPrintingService_IConditionalPrintingService_policy" xmlns:p10="wsu">
<wsp:ExactlyOne>
<wsp:All>
<http:BasicAuthentication>
<wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" />
</http:BasicAuthentication>
</wsp:All>
</wsp:ExactlyOne>
<wsdl:types>
...
</wsdl:service>
</wsp:Policy>
</wsdl:definitions>

the error is probably in the class "MetaMessage" rows 72 - 84.
5 elements open but only 4 close

if (_hasBasicAuthentication)
{
writer.WriteStartElement("Policy", Namespaces.WSP_NS);
writer.WriteAttributeString("Id", _xmlNamespaceManager.LookupPrefix(Namespaces.WSU_NS), $"{bindingName}{_service.GeneralContract.Name}_policy");
writer.WriteStartElement("ExactlyOne", Namespaces.WSP_NS);
writer.WriteStartElement("All", Namespaces.WSP_NS);
writer.WriteStartElement("BasicAuthentication", Namespaces.HTTP_NS);
writer.WriteStartElement("wsaw", "UsingAddressing", Namespaces.WSAW_NS);
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndElement();
}

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 12, 2022
@andersjonsson
Copy link
Collaborator

If you feel up for it, please submit a PR with a fix and a unit test that verifies the fix. We'll get it merged as soon as possible

@github-actions github-actions bot removed the stale label Aug 17, 2022
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Sep 16, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@WillTartak
Copy link

This is still happening in 1.1.0.32. Unfortunately, I don't have time to submit a PR. For now I'm rolling back to 1.1.0.29.

@andersjonsson
Copy link
Collaborator

Fixed in 1.1.0.33

@WillTartak
Copy link

I am happy to report I upgraded to 1.1.0.33 and it is working as expected.

@andersjonsson
Copy link
Collaborator

Thank you for confirming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants