axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivian Wang <vivianwan...@yahoo.com>
Subject Re: WS-Policy support
Date Wed, 08 Apr 2009 23:04:06 GMT

Hi Manjula,

Thanks for your reply. But I am working on the web service client side, so it's still not
clear to me that how I should handle ws-policies either defined in WSDL or in some other seperate
files. Can you elaborate the following:

(1) Is it possible to attach the ws-policy settings on the client side like in the ws client
policy file?  

(2) Also, when I parse a WSDL, how do I know if a ws-policy is a WS security policy or other
CUSTOM policy? Do I need to differentiate the different kinds of policies? 

(3) Is there a general way to handle ws-policies defined in a WSDL (like the one in the WSDL
is pasted here at the end of my message)? As you can see, ws-policies are defined and then
referenced in portType, operation and binding definitions in the WSDL. How do I apply these
at run time when I send out the web service call?

I mean, what I am trying to build is a generic web service client that can handle different
kinds of  WSDLs (web servers), so I DO NOT use a particular WSDL to generate  the client
stub code. I need a more generic way to handle WS-policy definitions and references in any
kind of WSDLs.

Thanks!
Vivian



----- Original Message ----
From: Manjula Peiris <manjula@wso2.com>
To: Apache AXIS C User List <axis-c-user@ws.apache.org>
Cc: axis-c-dev@ws.apache.org
Sent: Tuesday, April 7, 2009 1:05:20 AM
Subject: Re: WS-Policy support

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