This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Copied from https://wsit.dev.java.net/issues/show_bug.cgi?id=1415 When creating a ws-consumer using NetBeans 6.8 for a service using SSL with a username token for authentication, the security is not recgnized by NetBeans as the PolicyReference is not resolved when embedded in a Policy Tag, i.e.: <wsdl:binding name="W_TS_AMU_W10_S0_710_C711" type="tns:WSSE_ECHO"> <wsp:Policy> <wsp:PolicyReference URI="#BN_BN_W_TS_AMU_W10_S0_710_C711"/> </wsp:Policy> Let me give you two examples, one working, one is not working: Working: <wsdl:binding name="W_TS_AMU_W10_S0_710_C711" type="tns:WSSE_ECHO"> <!--wsp:Policy--> <wsp:PolicyReference URI="#BN_BN_W_TS_AMU_W10_S0_710_C711"/> <!--/wsp:Policy--> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="WSSE_ECHO"> <soap:operation style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> Not Working: <wsdl:binding name="W_TS_AMU_W10_S0_710_C711" type="tns:WSSE_ECHO"> <wsp:Policy> <wsp:PolicyReference URI="#BN_BN_W_TS_AMU_W10_S0_710_C711"/> </wsp:Policy> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="WSSE_ECHO"> <soap:operation style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> According to WS Policy 1.5 [1] PolicyReference is an operator and as such is defined within a Policy element (see section 4.33 cited below). <cite> 4.3.3 Policy Operators Policies are used to convey a set of capabilities, requirements, and general characteristics of entities (see 1. Introduction). These are generally expressible as a set of policy alternatives. Policy operators (wsp:Policy, wsp:All and wsp:ExactlyOne elements) are used to group policy assertions into policy alternatives. To compactly express complex policies, policy operators MAY be recursively nested; that is, one or more instances of wsp:Policy, wsp:All, and/or wsp:ExactlyOne MAY be nested within wsp:Policy, wsp:All, and/or wsp:ExactlyOne. The schema outline for the wsp:Policy element in the compact form is as follows: (01) <wsp:Policy … > (02) ( <wsp:Policy …>…</wsp:Policy> | (03) <wsp:ExactlyOne>…</wsp:ExactlyOne> | (04) <wsp:All>…</wsp:All> | (05) <wsp:PolicyReference … >…</wsp:PolicyReference> | (06) … (07) )* (08) </wsp:Policy> </cite> Please correct the behaviour in NetBeans/Metro [1]http://www.w3.org/TR/ws-policy/ [2]http://www.w3.org/TR/ws-policy/#Policy_Operators
Created attachment 98021 [details] WSDL
added me as cc
Thanks for submission, will investigate. NB wsit plugin support for policy references is rather minimal right now, should be upgraded to higher level also wrt support of external references.
d039113, could you please provide a sample with simpler policies to demonstrate the issue? It seems like NetBeans isn't actually able to read your policies in the first place.
I prepared a set of files to reproeduce the issue: 1) broken.wsdl: This wsdl does not work with NetBeans 6.8 2) fixed.wsdl: Similar to the broken.wsdl, but corrected by commenting the wsp:Policy <!--wsp:Policy--> <wsp:PolicyReference URI="#BN_BN_W_TH_AMS_W10_S0_710_C710"/> <!--/wsp:Policy--> 3) WSDLTest.zip: a NetBeans 6.8 project containing a ws-proxy for each of the WSDL files. Please check the WebService References->Edit Web Service Attributes
Created attachment 99069 [details] broken WSDL
Created attachment 99070 [details] corrected WSDL
Created attachment 99071 [details] Sample project
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss