You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ru...@tieto.com on 2012/05/30 11:00:53 UTC

FW: Axis2-1.6.2 Client: with Rampart Configuration Policy now results in two UsernameToken entries in SOAP message - previously "No user value in rampart configuration policy"

Dear Specialist:

I still have a serious problem with my Axis2-1.6.2 Client.


1.     Problem one: "No user value in the rampart configuration policy". - overcome (but other problem resulted, see Problem two below)
My original problem was that the client complained "No user value in the rampart configuration policy". - AxisFault was thrown.
I could not find any way to get rid of the message above, although, the SOAP Message created by the client was perfectly valid, as I verified by soapUI, into which it was inserted and sent. (the enclosed WSDL now uses SSL, and I can no longer verify the SOAP Message in soapUI, for issues with SSL in soapUI).
I enclose the client code (which results in "No user value in rampart configuration policy, - GetCustomerCreationClient, axis2.xml is the same as for problem two, except that the passwordcallback tag in OutflowSecurity is not there - not crucial for the problem at hand))
This tells me that Axis2-1.6.2 client for some (unnecessary?) reason failed, although the message produced was perfectly valid.
It was not even necessary for the web service to be up and running, the Axis2-1.6.2 client failed in itself, before contacting it.

I have tried several versions of Axis2: 1.6.0, (1.6.1 - other issue involving neethi-3.x), 1.6.2, with the same result.
Several years ago, I created a Axis2-1.4.1 client using similar client code, the wsdl, however was somewhat different and was created in a .NET system. Then, at that time, it was not at all necessary to insert any Rampartconfig, (etc.. see below) object in the client, and it worked very well.

Please advice me, in case you have the knowledge, how to proceed to solve this problem finally.

This problem was overcome  by following the article reference ("Web Services Security with Apache Rampart - Part 2 Message Level Security, Nandana Mihindukulasooriya, dated 26th Mar, 2008) pointed to me by Hasini Gunasinghe hasi7786@gmail.com<ma...@gmail.com>, .
After the insertion in the client Java code of a section instantiating a Rampartconfig and Policy object, Problem One was overcome.
However, Problem two resulted.



2.     Problem two: two sets of UsernameToken in outgoing SOAP Message
However, a new problem appeared: Now, two sets of UsernameToken entries appeared in the (outgoing) SOAP Message, generated by the client.
I can find no way to remove this doublet - GetCustomerCreationClientExclipseTester.
This is definitely a defective SOAP Message.
I have not been able, despite several changes and variattions,, in any way, sofar, to remove the doublet UsernameToken entry.
The only way to remove it has been to remove the rampartConfig code section in the client, but then Problem one results again.

Please, if you have the knowledge, advice me how to resolve finally this issue.


For your information, my operating system is Windows 7, 64 bit.
The client (both problems) can be run in Eclipse using IBM Java 1.5 (Web Service installed in IBM WebSphere 6.1.0.43) on localhost.

Perhaps some of you have encountered the above problem(s)?
I look forward with great interest to some conclusive advice.

Please find enclosed relevant files and configurations.


Med v�nlig h�lsning, / Best Regards,

Runo Barrdahl, civ ing, tekn lic

Tieto Sweden AB, Financial Services
mail: runo.barrdahl@tieto.com<ma...@tieto.com>
tel (direct): 0709-790 407 / +46-709 790 407
tel (central): 010 481 00 00 / +46-10 481 00 00
fax: 08-86 30 56 / +46-8 86 30 56
web: www.tieto.com<http://www.tieto.com>