Nandana,
Your example services looks like mine except for the inclusion of the
rampart encryption stuff and the fact that I pass the x509 certificate
in the message.
I write both a services.xml and OSCARS.wsdl and then use wsdl2java. As
a side effect a new services.xml and OSCARS.wsdl are written to a
resources directory. The new services.xml has no policy information,
but the new OSCARS.wsdl does have the correct policyReference elements.
We include the original files in our aar, not the generated ones.
Unfortunately my generated client Stub only includes the binding-level
policy for the _operation.getMessage MESSAGE_LABEL_IN_VALUE, and does
not even include an _operation for MESSAGE_LABEL_OUT_VALUE. It looks
like wsdl2java didn't recognize the <wsp:PolicyReference
URI="#signedMsgPolicy"/> and just dropped the input element.
At least when I included the policy in each input element, it generated
the OUT_VALUE operation.
How did you create the SimpleServiceStub? It says it was auto-generated
from WSDL, but you did not include a WSDL in the example. Does the
wsdl2java included in axis 1.4.1 work out of the box or does it need to
become "rampart aware" in some way?
I'll try to run your example in my tomcat environment and see what happens.
Mary
Nandana Mihindukulasooriya wrote:
Hi Mary,
Has anyone had success in attaching ws-policy at the message level
in the xml.services file? I am trying to get the request messages
signed and time stamped and the response messages just time stamped.
I just tested this scenario with Axis2 1.4.1 and Rampart nightly build
and worked as expected for me. I have attached the service [1] that I
tested for your reference. I also included the SOAP messages for each of
the scenarios I have tested. However in the response also, time stamp
will be signed.
I have followed Nandana's tutorial at https://wso2.org/library/3786
and used the following PolicyAttachement element
The service seems to just ignore the signedParts. E.g when I send it
a non-signed body it does not reject the message. Just to see what
was happening, I tried attaching the policy to the response message
and it did not sign the response.
When you attach the policies as you have described above using the
services.xml, do they appear on the generated WSDL ?
thanks,
nandana
[1] -
https://wso2.org/repos/wso2/people/nandana/demo-service/demo-service.zip
--
Nandana Mihindukulasooriya
WSO2 inc.
http://nandana83.blogspot.com/
http://www.wso2.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]