Mailing List
Home
Forum Home
Maven - Project building tool
Axis - Java SOAP implementation
Lucene - Full-featured text search engine APIs
Cocoon - MVC web framework based on XML/XSL
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
Log4J - A log library
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database error code ...
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Subject: Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Proposal: Adding jar manifest classpath in jar and war plugins
Servlet File Download dialog problem (IE6,Adobe 6 0)
java security AccessControlException: access denied (java io FilePermission
Unsupported major minor version 48 0 problem while running the an
   telope task
Subject: axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
Classpath problem
jsp data into Excel
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
Subject: InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Subject: AXIS: tomcat timeout ?
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
XDoclet, Struts and Maven: Where to start? SOLUTION
Subject: Running junit tests fails
 
WS-Policy

WS-Policy

2007-10-03       - By Sanka Samaranayke

 Back

Hi Jim,

I would be great if you can post the WSDL which you used to generate the stub
so that we see whether we can reproduce the problem.

Thanks,
Sanka


Jim Collins wrote:
> Hi Paul/Sanka,
>
> Thanks for the reply and apologies for taking so long in getting back
> to you.
>  
> I have looked at the Rampart examples and they have a separate policy.
> The policy that I use is part of the WSDL.
>
> I can see in the generated stub that the policy is being set e.g.
>
> (__operation).getMessage(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL
_OUT_VALUE).getPolicyInclude().setPolicy(getPolicy("<wsp:Policy
> xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\">...</wsp:Policy>")
);
>
>
> After generating the Stub I then installed Rampart and was then
> getting errors when I tried to generate the stub again. I got a
> CodeGenerationException
>
> java.lang.RuntimeException: can't serialize the policy ..
>
> I have used Axis1 in the past but I am new to Axis2 and not sure how I
> use the rampart module for just the client  and specify the policy if
> it is part of an existing WSDL.
>
> Thanks
>
> Jim
>
>
> -- -- Original Message -- -- From: "Paul Fremantle" <pzfreo@(protected)>
> To: <axis-user@(protected)>
> Sent: Friday, September 28, 2007 8:00 AM
> Subject: Re: [Axis2] WS-Policy
>
>
>> Probably the best thing would be to look at some of the Rampart
>> samples that are driven by policy. If you can give us some idea of the
>> policy that is being used it might help.
>>
>> Basically, each public policy provided by the remote service requires
>> some config locally. For example, if the policy says "encrypt" then
>> you need to config the keystore. If the policy says
>> "username/password" you need to let rampart have those.
>>
>> Now here's the freaky bit. Rampart also uses policy to *configure* the
>> local items. So you need to give Rampart the local policy as well as
>> the remote policy which is already burnt into your stub. Both will be
>> merged to make a master policy which will make Rampart do the right
>> thing.
>>
>> Paul
>>
>> On 9/28/07, Sanka Samaranayke <ssanka@(protected)> wrote:
>>>
>>> Hi Jim,
>>>
>>> 1) If you want to get WS-Security policy being supported in the
>>> stub, you need to instantiate the stub by giving a
>>> ConfigurationContext obj
>>> which points a repository which contains a rampart mar.
>>>
>>> 2) Then you need to attach rampart specific policies to the
>>> AxisService obj which is used internally by the stub. You can do
>>> that as follows.
>>>
>>> ServiceClient _serviceClient = stub._getServiceClient();
>>> AxisService service = _serviceClient.getAxisService();
>>> service.getPolicyInclude().addPolicy(policy);
>>>
>>> Here the policy object should contain configuration policies of
>>> rampart which are needed to provides security requirements specified by
>>> policy expressions in the service wsdl document.
>>>
>>> For example, if the service requires username token then you need to
>>> attach a policy expression with rampart assertions which specify
>>> Password callback class.
>>>
>>>
>>>
>>> HTH,
>>> Sanka
>>>
>>> 1) First you need to instantiate the stub giving a configuration
>>> context
>>>
>>> Jim Collins wrote:
>>> > Hi,
>>> >
>>> > I am trying to write a Web Service client that accesses a Service
>>> that
>>> > uses WS-Policy. The WSDL is correctly configured with the policy
>>> and I
>>> > was able to generate the client stub and I can see from the source
>>> > that it is adding the policy.
>>> >
>>> > What I am not sure is what I need to do when calling methods on
>>> the on
>>> > the client stub to make sure that it carries out what is in the
>>> policy
>>> > e.g.  sending a token.
>>> >
>>> > Any help would be appreciated.
>>> >
>>> > Thanks
>>> >
>>> > Jim
>>>
>>>
>>> --
>>> Sanka Samaranayake
>>> WSO2 Inc.
>>>
>>> http://www.bloglines.com/blog/sanka
>>> http://www.wso2.org/
>>>
>>>
>>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>>> To unsubscribe, e-mail: axis-user-unsubscribe@(protected)
>>> For additional commands, e-mail: axis-user-help@(protected)
>>>
>>>
>>
>>
>> --
>> Paul Fremantle
>> Co-Founder and VP of Technical Sales, WSO2
>> OASIS WS-RX TC Co-chair
>>
>> blog: http://pzf.fremantle.org
>> paul@(protected)
>>
>> "Oxygenating the Web Service Platform", www.wso2.com
>>
>> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>> To unsubscribe, e-mail: axis-user-unsubscribe@(protected)
>> For additional commands, e-mail: axis-user-help@(protected)
>>
>>
>>
>
>
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
> To unsubscribe, e-mail: axis-user-unsubscribe@(protected)
> For additional commands, e-mail: axis-user-help@(protected)
>
>


--
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: axis-user-unsubscribe@(protected)
For additional commands, e-mail: axis-user-help@(protected)