Hi, Sanka
you are right. After I use the <policy-subject
identifier="binding:soap12" />, The policy is the first element of
<wsdl:definition>. For each binding, the policy element is
referenced.
<wsdl:binding name="programport_binding"
type="tns:programwsPortType">
<wsp:PolicyReference URI="#UToverHTTP"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
...
Thanks for the help
-jason
Sanka Samaranayake wrote:
Hi Jason,
I think you should specify <policy-subject
identifier="binding:soap12" /> instead of <policy-subject
identifier="binding:programport_binding" />.
Note that <policy-subject
identifier="binding:soap12" /> will attached the specified policies
to all soap12 bindings of your service. If you need to attach the
specified policies to both soap11 and soap12 bindings you should
include both <policy-subject identifier="binding:soap11" /> and
<policy-subject identifier="binding:soap12" /> elements.
You can't attach a policy to a particular binding by setting the
identifier attribute of <policy-subject .. > element to that
binding name. It is a limitation we have at the moment.
Sanka
On Thu, May 8, 2008 at 9:17 PM, jason zhang
< [EMAIL PROTECTED]>
wrote:
Hi, Sanka
This does not work.
My original wsdl is like this
<wsdl:definitions >
...
<wsdl:binding name="programport_binding"
type="tns:programwsPortType">
...
</wsdl:definition>
My service.xml is like this
<serviceGroup>
<service name="programws">
<module ref="rampart" />
...
<parameter name="useOriginalwsdl">false</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<policy-subject
identifier="binding:programport_binding" />
<!-- policy-subject identifier="binding:soap12" /
-->
</wsp:AppliesTo>
<wsp:Policy wsu:Id="UToverHTTP" ...>
</wsp:PolicyAttachment>
...
</serviceGroup>
The generated wsdl does not have policy element at all.
thanks
-jason
Sanka Samaranayake wrote:
If you want to attach a policy to a
particular binding you should do
that in the services.xml as follows.
<service>
<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:AppliesTo>
<policy-subject identifier="binding:soap11" />
<policy-subject identifier="binding:soap12" />
</wsp:AppliesTo>
<wsp:Policy wsu:Id="UToverHTTP" ...> ...
</wsp:Policy>
</wsp:PolicyAttachment>
</service>
HTH
Sanka
--
Sanka Samaranayake
WSO2 Inc.
http://sankas.blogspot.com/
http://www.wso2.org/
--
Sanka Samaranayake
WSO2 Inc.
http://sankas.blogspot.com/
http://www.wso2.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|