Hi Axis User. I am getting the below error in the client code when I try to invoke the service with WS-Security Rampart. I am using Asix2-1.5 and Rampart-1.4
XMLStreamException "the prefix ==> Already exists for namespace in “urn:com1” " when WS-Security Rampart is engaged for Axis 2 web-services Attached are the error log file (stacktrace) & client code. I am using XML import in the schema. I am able to successfully test the Rampart policy samples without any issue. I am getting error when I add rampart in our existing service which has complex schema. Has this error occurred due to xml import? Below is my XSD hierarchy service.wsdl -- <wsdl:types> <xsd:import namespace="urn:chl" schemaLocation="../schema/hub_channel.xsd" /> - in <xsd:import namespace="urn:msg" schemaLocation="../schema/hub_message.xsd" /> - out </wsdl:types> hub_channel.xsd(urn:chl) imports the below scheams. <xsd:import namespace="urn:com1" schemaLocation="hub_common.xsd" /> <xsd:import namespace="urn:usr" schemaLocation="hub_user.xsd" /> hub_message.xsd(urn:msg) import <xsd:import namespace="urn:com1" schemaLocation="hub_common.xsd" /> Can you please help on this issue? I will really appreciate you. I have been trying for last 1 week to resolve it. I couldn’t resolve it. I searched in Axis User, people encountered the same. I don't think it's resolved. Here is the link: http://www.mail-archive.com/axis-user@ws.apache.org/msg40661.html In the forum, one of the user Richard mentioned Rampart devs would like to acknowledge the problem and maybe even fix it One user debugged the issue and added the below comments in the forum "I debugged the code and observed that, in the serialize method of the XML node POJO (generated by WSDL2JAVA), the "MTOMAwareXMLStreamWriter xmlWriter" parameter gets an instance of MTOMAwareOMBuilder if WS-Security is enabled. Whereas, without WS-Security it gets an instance of org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer which uses MTOMXMLStreamWriter which in turn uses com.ctc.wstx.sw.SimpleNsStreamWriter to serialize the response. I also tried using AXIS 1.4 without any success. Any idea how can this problem can be solved? Is there a way to let Rampart know which serializer should be used? Am I missing any configuration details of Rampart? " Thanks Srini Maran http://www.nabble.com/file/p26083056/Error1.rtf Error1.rtf http://www.nabble.com/file/p26083056/Client.rtf Client.rtf -- View this message in context: http://www.nabble.com/-Axis2--with-Rampart----XMLStreamException-%22the-prefix-%3D%3D%3E-Already-exists-for-namespace-tp26083056p26083056.html Sent from the Axis - User mailing list archive at Nabble.com.