axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manjula Peiris <manj...@wso2.com>
Subject Re: WS-Policy support
Date Tue, 07 Apr 2009 08:05:20 GMT
Axis2/C Neethi framework handles WS-policy. If you want implement custom
policies you can do that in [1]. For more details see how secpolicy and
rmpolicy is implemented. You can attach polices in services.xml for
service, operation and message.

[1]
https://svn.apache.org/repos/asf/webservices/axis2/trunk/c/neethi/src




On Mon, 2009-04-06 at 16:40 -0700, Vivian Wang wrote:
> Hi All, 
>  
> I am working on using axis2/c to built a web service client. I have a
> few questions regarding WS-policy support in axis2/c. From the manual
> in axis2/c web site, it seems that the WS-policy support is built in
> to the axis2/c. I would like to know the following:
>  
> (1) Are there any documents regarding how to use WS-policy in
> axis2/c? 
>  
> (2) Are there any examples regarding how to use WS-policy in axis2/c? 
>  
> (3) I have a customer presenting me with a WSDL that contains some
> policy definitions and then referenced in operation/binding
> definitions, suppose I can parse the WSDL and extract all the policy
> information, at runtime, how do I use axis2/c to set the related
> policy in a operation/binding when I create a web service client
> (using axis2/c)? Any APIs? 
>  
> The afore mentioned WSDL (shortened to contain only related info)
> is pasted at the end of the message :
>  
> Thanks much in advance!
> Vivian
> =========================================== 
> <wsdl:definitions ....>
>   <wsp:UsingPolicy wsdl:required="true" /> 
>   <wsp:Policy wsu:Id="BN_BN_BatchByIDQueryResponse_Binding">
>       <wsp:ExactlyOne ...>
>       </wsp:ExactlyOne>
>   </wsp:Policy>
>   <wsp:Policy wsu:Id="IF_IF_BatchByIDQueryResponse_In">
>    <xyzAdmin:CentralAdministration
> xmlns:xyzAdmin="http://www.xyz.com/webas/1000/soap/features101/"
> wsp:Optional="true" /> 
>   </wsp:Policy>
> - <wsp:Policy wsu:Id="OP_IF_OP_BatchByIDQueryResponse_In">
>   <xyzcomhnd:enableCommit
> xmlns:xyzcomhnd="http://www.xyz.com/NW05/soap/features/commit/">false</xyzcomhnd:enableCommit>

>   <xyzblock:enableBlocking
> xmlns:xyzblock="http://www.xyz.com/NW05/soap/features/blocking/">true</xyzblock:enableBlocking>

>   </wsp:Policy>
> <wsdl:types>
>    .....
> </wsdl:types>
> ...
> <wsdl:portType name="BatchByIDQueryResponse_In">
>    <wsp:Policy>
>         <wsp:PolicyReference
> URI="#IF_IF_BatchByIDQueryResponse_In" /> 
>  </wsp:Policy>
>    <wsdl:operation name="BatchByIDQueryResponse_In">
>       <wsp:Policy>
>            <wsp:PolicyReference
> URI="#OP_IF_OP_BatchByIDQueryResponse_In" /> 
>      </wsp:Policy>
>          <wsdl:input message="tns:BatchByIDQuery_sync" /> 
>          <wsdl:output message="tns:BatchByIDResponse_sync" /> 
>      <wsdl:fault name="StandardMessageFault"
> message="tns:StandardMessageFault" /> 
>   </wsdl:operation>
>  </wsdl:portType>
>   <wsdl:binding name="BatchByIDQueryResponse_Binding"
> type="tns:BatchByIDQueryResponse_In">
>     <wsp:Policy>
>             <wsp:PolicyReference
> URI="#BN_BN_BatchByIDQueryResponse_Binding" /> 
>      </wsp:Policy>
>          <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
>     <wsdl:operation name="BatchByIDQueryResponse_In">
>              <soap:operation soapAction="" style="document" /> 
>               <wsdl:input>
>                  <soap:body use="literal" /> 
>          </wsdl:input>
>       <wsdl:output>
>                  <soap:body use="literal" /> 
>          </wsdl:output>
>       <wsdl:fault name="StandardMessageFault">
>                   <soap:fault name="StandardMessageFault"
> use="literal" /> 
>          </wsdl:fault>
>      </wsdl:operation>
>  </wsdl:binding>
> ......
> </wsdl:definitions>
>  
> 


Mime
View raw message