SoapCore icon indicating copy to clipboard operation
SoapCore copied to clipboard

error end of "wsp:Policy" element in WSDL

Open LadislavSmid opened this issue 2 years ago • 3 comments

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(); }

LadislavSmid avatar Jul 12 '22 12:07 LadislavSmid

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

github-actions[bot] avatar Aug 12 '22 03:08 github-actions[bot]

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

andersjonsson avatar Aug 16 '22 13:08 andersjonsson

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

github-actions[bot] avatar Sep 16 '22 04:09 github-actions[bot]

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

github-actions[bot] avatar Sep 30 '22 04:09 github-actions[bot]

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.

WillTartak avatar Oct 25 '22 15:10 WillTartak

Fixed in 1.1.0.33

andersjonsson avatar Oct 27 '22 08:10 andersjonsson

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

WillTartak avatar Nov 03 '22 14:11 WillTartak

Thank you for confirming

andersjonsson avatar Nov 03 '22 14:11 andersjonsson