Hi ,
I am going to call BPEL Service from Java  that using Rampart policy.

This is how I did that.

                    *final String  EPR =
configuration.getFirstProperty(AppFactoryConstants.BPS_SERVER_URL) +
"ApplicationCreation";

                    try {

                        ServiceClient client = new ServiceClient(
ServiceReferenceHolder.getInstance().getConfigContextService().getClientConfigContext(),
null);

                        // Set the endpoint address
                        client.getOptions().setTo(new
EndpointReference(EPR));
                        client.engageModule("rampart");
                        client.engageModule("addressing");
                        String userName =
configuration.getFirstProperty(AppFactoryConstants.SERVER_ADMIN_NAME);
                        String password =
configuration.getFirstProperty(AppFactoryConstants.SERVER_ADMIN_PASSWORD);
                        client.getOptions().setUserName(userName);
                        client.getOptions().setPassword(password);


                        String configs =
CarbonUtils.getCarbonConfigDirPath();

client.getOptions().setProperty(RampartMessageData.KEY_RAMPART_POLICY,
loadPolicy(configs + "/appfactory/bpel-policy.xml"));

                        client.sendRobust(getPayload(applicationInfoBean));



                    } catch (Exception e) {
                        log.error(e);
                    }*


but thing is that , it says

*org.apache.axis2.AxisFault: Missing wsse:Security header in request*


thanks
Harsha Thirimanna
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to