users@glassfish.java.net

How to declare wsp:Policy in external file and reference from wsit- config?

From: <glassfish_at_javadesktop.org>
Date: Tue, 27 Oct 2009 10:45:41 PDT

I'd like to extract the wsp:Policy declarations from our many wsit config files into a global wsit policy file that they will all reference. Is this possible?


No matter what combination of URI I've come up with, I get this error: "Failed to find policy referenced by URI".

I've tried importing the file using an <import location=.... /> statement but it has no effect.

I don't know if it's a namespace issue, or if it's how I'm declaring the policy in the external file, or if it's a problem with the URI.


Here's a snip of my WSIT config:

<definitions>
...
<binding name="SampleWsSecurityPortBinding" type="tns:SampleWsSecurityBean">
   <wsp1:PolicyReference URI="Blah_PortBindingPolicy.xml#Blah_PortBindingPolicy"/>
   ...
</definitions>


And here's the external file in the same directory as the wsit config file: Blah_PortBindingPolicy.xml:

<policies>
<wsp1:Policy wsu:Id="Blah_PortBindingPolicy">
...
</wsp1:Policy>

... other policies ...

</policies>


Thanks!
-Silas
[Message sent by forum member 'smitty22s' (silas.smith_at_ngc.com)]

http://forums.java.net/jive/thread.jspa?messageID=369516