WCF: Policies residing in secondary WSDL documents (imported using a wsdl:import element) are not resolved properly. - by AlexanderJ

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 899335 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/17/2014 10:05:29 PM
Access Restriction Public

Description

During importing a service endpoint (VS and svcutil.exe) custom policies can be handled by policy importers ( http://msdn.microsoft.com/en-us/library/ms730284(v=vs.110).aspx ).
However, this only works for policies included in the same WSDL document and identified via the wsu:ID attribute.

Policies residing in secondary WSDL documents (imported using a wsdl:import element) are not resolved properly.

If the policy is identified using a name attribute, svcutil.exe will issue a warning:

"
Warning: Unreachable policy detected.
A WS-Policy element embedded in WSDL is missing a fragment identifier. This policy cannot be referenced by any WS-PolicyAttachment mechanisms.
XPath://wsdl:definitions[@targetNamespace='http://schemas.acme.com/ws/2014/03/interoperability/policies']/wsdl:definitions[@name='CI_Policies']
"

Even if the policy comes with an wsu:Id attribute, it will not be found, as policies are obviously only searched in the WSDL document with the wsp:PolicyReference element. (While the name-issue might be neglect, this seems to be an actual bug!)

Note: the policy is embedded in a secondary WSDL containing a wsp:Policy element - not a distinct policy file.


Support of referencing policies in external files and by name is part of the WS-Policy standard:
http://www.w3.org/TR/ws-policy/#Policy_Identification

This is necessary for interoperability, e.g. with Java, Metro:
https://metro.java.net/guide/ch19.html#policy-references
Example 19.1. (same document, using wsu:Id) is supported by WCF, example 19.3 ff is not.
Note that other Java implementations don't have the option to choose how to reference a policy!

Sign in to post a comment.
Posted by Erica [MSFT] on 7/23/2014 at 6:49 PM
Hi AlexanderJ-

Thanks for reporting this issue against WCF.

At this point of time WCF only supports policies included in the same WSDL file and identified via the wsu:ID attribute.

Unfortunately, we are not seeing large customer demand supporting policies residing in secondary WSDL documents, so I will be resolving this bug as "Wont Fix".

If this is a blocking issue for you, please contact Microsoft Customer Support: http://support.microsoft.com/contactus/

Thanks,
Erica
Microsoft Program Manager
Posted by Microsoft on 6/17/2014 at 10:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/ph/1117.