Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 70585 invoked from network); 15 May 2008 09:46:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 09:46:33 -0000 Received: (qmail 98439 invoked by uid 500); 15 May 2008 09:46:22 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 98420 invoked by uid 500); 15 May 2008 09:46:22 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 98407 invoked by uid 99); 15 May 2008 09:46:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 02:46:22 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.146.188.94] (HELO web86101.mail.ird.yahoo.com) (217.146.188.94) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 15 May 2008 09:45:23 +0000 Received: (qmail 41433 invoked by uid 60001); 15 May 2008 09:45:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=btinternet.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=AXTDhD5HLE6EP+SQ9Xq+4uAy0zIT5f6rb+YaksVbUF9P5L4w1ciFYmgYEtFjfhdFaHEP2gTsQX6n4so++Y5xvqerW4V0ns7aulVQSAURzdQeKZwi/yzj0ehVp9dNh+yfe52oXuzd89gWlVTqlJ0x2sXOzD2/reewCwmy27JNKd8=; X-YMail-OSG: 38vAZSIVM1nTgJFiH.unielJlpY7eO71l4DX3J5noUcPqkW4BpSTlrinGHIs_BXPvJZd5UcNW_y92WXK01qixRTbK.Ua3s03j4i7bstoCk0x0WSinc561MHhIkw- Received: from [212.183.134.129] by web86101.mail.ird.yahoo.com via HTTP; Thu, 15 May 2008 09:45:44 GMT X-Mailer: YahooMailRC/902.40 YahooMailWebService/0.7.185 Date: Thu, 15 May 2008 09:45:44 +0000 (GMT) From: RICHARD FEATHERSTONE Subject: Re: XMLStreamException "the prefix ==> Already exists for namespace" when WS-Security Rampart is engaged for Axis 2 web-services To: axis-user@ws.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1512870510-1210844744=:40414" Message-ID: <865686.40414.qm@web86101.mail.ird.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-1512870510-1210844744=:40414 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I also encountered this problem the other week. Due to time constraints I c= ouldn't look into it properly but tracked it down to the service response. = We only require ws-security on the inbound from the service so I edited the= modules.xml in rampart to remove the outbound security and this circumvent= s the problem.=0A=0AIt may help short term and I'll be watching this thread= to find out what the issue is.=0A=0AR=0A=0A=0A=0A----- Original Message --= --=0AFrom: Darshan Jawalebhoi =0ATo: a= xis-user@ws.apache.org=0ASent: Thursday, 15 May, 2008 9:02:14 AM=0ASubject:= XMLStreamException "the prefix =3D=3D> Already exists for namespace" when = WS-Security Rampart is engaged for Axis 2 web-services=0A=0A=0AHi,=0A =0AI = tried to incorporate the WS-Security (using Rampart 1.3 module) feature to = my existing set of web-services. I am using AXIS 2 1.3. The java classes ar= e generated using WSDL2JAVA. =0A =0AI get the following error in server log= s while serialization of the certain responses (all those which contain man= y "X" nodes under the "X-List" node) node since the time WS-Security has be= en enabled:=0A =0A*********************************************************= *******************************************************************=0A =0A1= 2:22:22,344 ERROR [OMSourcedElementImpl] Could not get parser from data sou= rce for element =0A{http://services.mydomain.com/ws/schema/classificationse= rvice}getInstructorListResponse=0Ajavax.xml.stream.XMLStreamException: the = prefix =3D=3D> Already exists for namespace =3D=3D> =0Ahttp://services.myd= omain.com/ws/schema/common/credentials=0A at org.apache.axis2.databi= nding.utils.writer.MTOMAwareOMBuilder.getOMNamespace(MTOMAwareOMBuilder.jav= a:72)=0A at org.apache.axis2.databinding.utils.writer.MTOMAwareOMBui= lder.writeStartElement(MTOMAwareOMBuilder.java:92)=0A at com.mydomai= n.services.ws.schema.common.credentials.Credentials.serialize(Credentials.j= ava:177)=0A at com.mydomain.services.ws.schema.common.credentials.Cr= edentialsList.serialize(CredentialsList.java:170)=0A at com.mydomain= .services.ws.schema.common.instructor.Instructor.serialize(Instructor.java:= 626)=0A at com.mydomain.services.ws.schema.common.instructor.Instruc= tors.serialize(Instructors.java:169)=0A at com.mydomain.services.ws.= schema.classificationservice.GetInstructorListResponse.serialize=0A(GetInst= ructorListResponse.java:226)=0A at com.mydomain.services.ws.schema.c= lassificationservice.GetInstructorListResponse$1.serialize=0A(GetInstructor= ListResponse.java:128)=0A at org.apache.axis2.databinding.ADBDataSou= rce.getReader(ADBDataSource.java:96)=0A at org.apache.axiom.om.impl.= llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:129)=0A= at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(O= MSourcedElementImpl.java:152)=0A at org.apache.axiom.om.impl.llom.OM= SourcedElementImpl.getFirstOMChild(OMSourcedElementImpl.java:755)=0A = at org.apache.axiom.om.impl.llom.OMNavigator._getFirstChild(OMNavigator.ja= va:141)=0A at org.apache.axiom.om.impl.llom.OMNavigator.updateNextNo= de(OMNavigator.java:113)=0A at org.apache.axiom.om.impl.llom.OMNavig= ator.next(OMNavigator.java:96)=0A at org.apache.axiom.om.impl.llom.O= MStAXWrapper.updateNextNode(OMStAXWrapper.java:1007)=0A at org.apach= e.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.java:998)= =0A at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrappe= r.java:923)=0A at org.apache.axiom.om.impl.builder.StAXOMBuilder.nex= t(StAXOMBuilder.java:153)=0A at org.apache.axiom.om.impl.dom.NodeImp= l.build(NodeImpl.java:447)=0A at org.apache.axiom.om.impl.dom.Docume= ntImpl.build(DocumentImpl.java:479)=0A at org.apache.rampart.util.Ax= is2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:130)=0A at org.ap= ache.rampart.RampartMessageData.(RampartMessageData.java:150)=0A = at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:58)=0A = at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:= 64)=0A at org.apache.axis2.engine.Phase.invoke(Phase.java:292)=0A = at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)=0A = at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)=0A = at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeB= usinessLogic=0A(AbstractInOutSyncMessageReceiver.java:45)=0A at org.= apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageRecei= ver.java:96)=0A at org.apache.axis2.engine.AxisEngine.receive(AxisEn= gine.java:145)=0A at org.apache.axis2.transport.http.HTTPTransportUt= ils.processHTTPPostRequest(HTTPTransportUtils.java:275)=0A at org.ap= ache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)=0A = at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)=0A = at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)=0A = at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica= tionFilterChain.java:290)=0A at org.apache.catalina.core.Application= FilterChain.doFilter(ApplicationFilterChain.java:206)=0A at com.mydo= main.util.log.performance.filter.RequestIdentifierFilter.doFilter(RequestId= entifierFilter.java:60)=0A at org.apache.catalina.core.ApplicationFi= lterChain.internalDoFilter(ApplicationFilterChain.java:235)=0A at or= g.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha= in.java:206)=0A at org.springframework.orm.hibernate3.support.OpenSe= ssionInViewFilter.doFilterInternal=0A(OpenSessionInViewFilter.java:198)=0A = at org.springframework.web.filter.OncePerRequestFilter.doFilter(Once= PerRequestFilter.java:75)=0A at org.apache.catalina.core.Application= FilterChain.internalDoFilter(ApplicationFilterChain.java:235)=0A at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC= hain.java:206)=0A at org.jboss.web.tomcat.filters.ReplyHeaderFilter.= doFilter(ReplyHeaderFilter.java:96)=0A at org.apache.catalina.core.A= pplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)=0A = at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicat= ionFilterChain.java:206)=0A at org.apache.catalina.core.StandardWrap= perValve.invoke(StandardWrapperValve.java:230)=0A at org.apache.cata= lina.core.StandardContextValve.invoke(StandardContextValve.java:175)=0A = at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securi= tyAssociationValve.java:179)=0A at org.jboss.web.tomcat.security.Jac= cContextValve.invoke(JaccContextValve.java:84)=0A at org.apache.cata= lina.core.StandardHostValve.invoke(StandardHostValve.java:128)=0A at= org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1= 04)=0A at org.jboss.web.tomcat.service.jca.CachedConnectionValve.inv= oke(CachedConnectionValve.java:156)=0A at org.apache.catalina.core.S= tandardEngineValve.invoke(StandardEngineValve.java:109)=0A at org.ap= ache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)=0A = at org.apache.coyote.http11.Http11Processor.process(Http11Processor.ja= va:844)=0A at org.apache.coyote.http11.Http11Protocol$Http11Connecti= onHandler.process(Http11Protocol.java:580)=0A at org.apache.tomcat.u= til.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)=0A at java.lang= .Thread.run(Thread.java:595)=0A =0A****************************************= ***************************************************************************= *********=0A =0AConsequently, the error received on in the web-service resp= onse is:=0A =0A************************************************************= ****************************************************************=0A =0Aorg.= apache.axis2.AxisFault: Error in extracting message properties=0A = at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java= :70)=0A at org.apache.axis2.engine.Phase.invoke(Phase.java:2= 92)=0A at org.apache.axis2.engine.AxisEngine.invoke(AxisEngi= ne.java:212)=0A at org.apache.axis2.engine.AxisEngine.send(A= xisEngine.java:377)=0A at org.apache.axis2.receivers.Abstrac= tInOutSyncMessageReceiver.invokeBusinessLogic=0A(AbstractInOutSyncMessageRe= ceiver.java:45)=0A at org.apache.axis2.receivers.AbstractMes= sageReceiver.receive(AbstractMessageReceiver.java:96)=0A at = org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)=0A = at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPos= tRequest(HTTPTransportUtils.java:275)=0A at org.apache.axis2= .transport.http.AxisServlet.doPost(AxisServlet.java:120)=0A = at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)=0A = at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)=0A = at org.apache.catalina.core.ApplicationFilterChain.internalDo= Filter(ApplicationFilterChain.java:290)=0A at org.apache.cat= alina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)= =0A at com.mydomain.util.log.performance.filter.RequestIdent= ifierFilter.doFilter(RequestIdentifierFilter.java:60)=0A at = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio= nFilterChain.java:235)=0A at org.apache.catalina.core.Applic= ationFilterChain.doFilter(ApplicationFilterChain.java:206)=0A = at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doF= ilterInternal=0A(OpenSessionInViewFilter.java:198)=0A at org= .springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFil= ter.java:75)=0A at org.apache.catalina.core.ApplicationFilte= rChain.internalDoFilter(ApplicationFilterChain.java:235)=0A = at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt= erChain.java:206)=0A at org.jboss.web.tomcat.filters.ReplyHe= aderFilter.doFilter(ReplyHeaderFilter.java:96)=0A at org.apa= che.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilter= Chain.java:235)=0A at org.apache.catalina.core.ApplicationFi= lterChain.doFilter(ApplicationFilterChain.java:206)=0A at or= g.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.jav= a:230)=0A at org.apache.catalina.core.StandardContextValve.i= nvoke(StandardContextValve.java:175)=0A at org.jboss.web.tom= cat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:= 179)=0A at org.jboss.web.tomcat.security.JaccContextValve.in= voke(JaccContextValve.java:84)=0A at org.apache.catalina.cor= e.StandardHostValve.invoke(StandardHostValve.java:128)=0A at= org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1= 04)=0A at org.jboss.web.tomcat.service.jca.CachedConnectionV= alve.invoke(CachedConnectionValve.java:156)=0A at org.apache= .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)=0A = at org.apache.catalina.connector.CoyoteAdapter.service(Coyot= eAdapter.java:241)=0A at org.apache.coyote.http11.Http11Proc= essor.process(Http11Processor.java:844)=0A at org.apache.coy= ote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.ja= va:580)=0A at org.apache.tomcat.util.net.JIoEndpoint$Worker.= run(JIoEndpoint.java:447)=0A at java.lang.Thread.run(Thread.= java:595)=0ACaused by: org.apache.rampart.RampartException: Error in extrac= ting message properties=0A at org.apache.rampart.RampartMess= ageData.<init>(RampartMessageData.java:290)=0A at org.apa= che.rampart.MessageBuilder.build(MessageBuilder.java:58)=0A = at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)= =0A ... 35 more=0ACaused by: org.apache.ws.security.WSSecuri= tyException: Error in converting SOAP Envelope to Document; nested exceptio= n is: =0A org.apache.axiom.om.OMException: javax.xml.stream.= XMLStreamException=0A at org.apache.rampart.util.Axis2Util.g= etDocumentFromSOAPEnvelope(Axis2Util.java:157)=0A at org.apa= che.rampart.RampartMessageData.<init>(RampartMessageData.java:150)=0A = ... 37 more=0ACaused by: org.apache.axiom.om.OMException: java= x.xml.stream.XMLStreamException=0A at org.apache.axiom.om.im= pl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)=0A at = org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:447)=0A = at org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:= 479)=0A at org.apache.rampart.util.Axis2Util.getDocumentFrom= SOAPEnvelope(Axis2Util.java:130)=0A ... 38 more=0ACaused by:= javax.xml.stream.XMLStreamException=0A at org.apache.axiom.= om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.java:1000)=0A = at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper= .java:923)=0A at org.apache.axiom.om.impl.builder.StAXOMBuil= der.next(StAXOMBuilder.java:153)=0A =0A************************************= ***************************************************************************= *************=0A =0AI debugged the code and observed that, in the serialize= method of the XML node POJO (generated by WSDL2JAVA), the "MTOMAwareXMLStr= eamWriter xmlWriter" parameter gets an instance of MTOMAwareOMBuilder if W= S-Security is enabled.=0A =0AWhereas, without WS-Security it gets an instan= ce of org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer whic= h uses MTOMXMLStreamWriter which in turn uses com.ctc.wstx.sw.SimpleNsStrea= mWriter to serialize the response.=0A =0AI also tried using AXIS 1.4 withou= t any success.=0A =0AAny 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? =0A =0ADarshan Jawalebhoi=0Ahttp://curio= usdeveloper.blogspot.com=0A =0ADISCLAIMER =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Th= is e-mail may contain privileged and confidential information which is the = property of Persistent Systems Ltd. It is intended only for the use of the = individual or entity to which it is addressed. If you are not the intended = recipient, you are not authorized to read, retain, copy, print, distribute = or use this message. If you have received this communication in error, plea= se notify the sender and delete all copies of this message. Persistent Syst= ems Ltd. does not accept any liability for virus infected mails. --0-1512870510-1210844744=:40414 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

I also encountered this problem the other week. Due to time constra= ints I couldn't look into it properly but tracked it down to the service re= sponse. We only require ws-security on the inbound from the service so I ed= ited the modules.xml in rampart to remove the outbound security and this ci= rcumvents the problem.

=0A

 

=0A

It may help short term and = I'll be watching this thread to find out what the issue is.

=0A

 =

=0A

R

=0A


=0A
----- Original Message ----
From: = Darshan Jawalebhoi <darshan_jawalebhoi@persistent.co.in>
To: axis-= user@ws.apache.org
Sent: Thursday, 15 May, 2008 9:02:14 AM
Subject: X= MLStreamException "the prefix =3D=3D> Already exists for namespace" when= WS-Security Rampart is engaged for Axis 2 web-services

=0A=0A=0A
=0A

Hi,

=0A

 

=0A

I tried = to incorporate the WS-Security (using Rampart 1.3 module) feature to my exi= sting set of web-services. I am using AXIS 2 1.3. The java classes are gene= rated using WSDL2JAVA.

=0A

 

=0A

I get the following error in server logs while serialization of t= he certain responses (all those which contain many "X" nodes under the "X-L= ist" node) node since the time WS-Security has been enabled:

=0A

 

=0A

****************************= ***************************************************************************= *********************

=0A

 

=0A

12:22:22,344 ERROR [OMSourcedElementImpl] Could not get parser from= data source for element

=0A

=0A

{http://services.mydomain.com/ws/schema/classificationservice}getInst= ructorListResponse

=0A

javax.xml.stream.XMLStreamExc= eption: the prefix =3D=3D>  Already exists for namespace =3D=3D>=

=0A

=0A

http://services.my= domain.com/ws/schema/common/credentials

=0A

 &n= bsp;      at org.apache.axis2.databinding.utils.wr= iter.MTOMAwareOMBuilder.getOMNamespace(MTOMAwareOMBuilder.java:72)

=0A        at org.apache= .axis2.databinding.utils.writer.MTOMAwareOMBuilder.writeStartElement(MTOMAw= areOMBuilder.java:92)

=0A

    &n= bsp;   at com.mydomain.services.ws.schema.common.credentials.Cred= entials.serialize(Credentials.java:177)

=0A

 &n= bsp;      at com.mydomain.services.ws.schema.commo= n.credentials.CredentialsList.serialize(CredentialsList.java:170)

=0A

        at com.mydomai= n.services.ws.schema.common.instructor.Instructor.serialize(Instructor.java= :626)

=0A

       = at com.mydomain.services.ws.schema.common.instructor.Instructors.serialize= (Instructors.java:169)

=0A

    &= nbsp;   at com.mydomain.services.ws.schema.classificationservice.= GetInstructorListResponse.serialize

=0A

=0A

(GetInstructorListResponse.java:226)

=0A

        at com.mydomain.services.ws= .schema.classificationservice.GetInstructorListResponse$1.serialize

=0A<= P class=3DMsoNormal>

=0A

(GetInstructorListResponse.= java:128)

=0A

      &n= bsp; at org.apache.axis2.databinding.ADBDataSource.getReader(ADBDataSource.= java:96)

=0A

      &nb= sp; at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(O= MSourcedElementImpl.java:129)

=0A

   =      at org.apache.axiom.om.impl.llom.OMSourcedElementI= mpl.forceExpand(OMSourcedElementImpl.java:152)

=0A

&= nbsp;       at org.apache.axiom.om.impl.llom.= OMSourcedElementImpl.getFirstOMChild(OMSourcedElementImpl.java:755)

=0A<= P class=3DMsoNormal>        at org.apach= e.axiom.om.impl.llom.OMNavigator._getFirstChild(OMNavigator.java:141)

= =0A

        at org.a= pache.axiom.om.impl.llom.OMNavigator.updateNextNode(OMNavigator.java:113)=0A

        at org= .apache.axiom.om.impl.llom.OMNavigator.next(OMNavigator.java:96)

=0A

        at org.apache.a= xiom.om.impl.llom.OMStAXWrapper.updateNextNode(OMStAXWrapper.java:1007)

= =0A

        at org.a= pache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.java:99= 8)

=0A

        at= org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:923)=0A

        at org= .apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:153)=0A

        at org.= apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:447)

=0A

        at org.apache.axiom= .om.impl.dom.DocumentImpl.build(DocumentImpl.java:479)

=0A

        at org.apache.rampart.uti= l.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:130)

=0A

        at org.apache.rampa= rt.RampartMessageData.<init>(RampartMessageData.java:150)

=0A

        at org.apache.ra= mpart.MessageBuilder.build(MessageBuilder.java:58)

=0A

        at org.apache.rampart.handler= .RampartSender.invoke(RampartSender.java:64)

=0A

&nb= sp;       at org.apache.axis2.engine.Phase.in= voke(Phase.java:292)

=0A

    &nb= sp;   at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.jav= a:212)

=0A

       = ; at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)

=0A

        at org.apache.= axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic

=0A=

=0A

(AbstractInOutSyncMessageR= eceiver.java:45)

=0A

     &= nbsp;  at org.apache.axis2.receivers.AbstractMessageReceiver.receive(A= bstractMessageReceiver.java:96)

=0A

  &nbs= p;     at org.apache.axis2.engine.AxisEngine.receive(Ax= isEngine.java:145)

=0A

     = ;   at org.apache.axis2.transport.http.HTTPTransportUtils.process= HTTPPostRequest(HTTPTransportUtils.java:275)

=0A

&nb= sp;       at org.apache.axis2.transport.http.= AxisServlet.doPost(AxisServlet.java:120)

=0A

 &= nbsp;      at javax.servlet.http.HttpServlet.servi= ce(HttpServlet.java:710)

=0A

    = ;    at javax.servlet.http.HttpServlet.service(HttpServlet.j= ava:803)

=0A

      &nb= sp; at org.apache.catalina.core.ApplicationFilterChain.inte= rnalDoFilter(ApplicationFilterChain.java:290)

=0A

        at org.apac= he.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.jav= a:206)

=0A

   =      at com.mydomain.util.log.performance.filter.Reques= tIdentifierFilter.doFilter(RequestIdentifierFilter.java:60)

=0A      &nbs= p; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl= icationFilterChain.java:235)

=0A

        at org.apache.catalina.cor= e.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)=0A

     &nb= sp;  at org.springframework.orm.hibernate3.support.OpenSessionI= nViewFilter.doFilterInternal

=0A

=0A

(OpenSessionInViewFilter.java:198)

=0A

&nbs= p;       at org.springframework.web.filter.On= cePerRequestFilter.doFilter(OncePerRequestFilter.java:75)

=0A

        at org= .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi= lterChain.java:235)

=0A

 = ;       at org.apache.catalina.core.Applicati= onFilterChain.doFilter(ApplicationFilterChain.java:206)

=0A

        a= t org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter= .java:96)

=0A

  &nb= sp;     at org.apache.catalina.core.ApplicationFilterCh= ain.internalDoFilter(ApplicationFilterChain.java:235)

=0A

        at = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC= hain.java:206)

=0A

 &nbs= p;      at org.apache.catalina.core.Standar= dWrapperValve.invoke(StandardWrapperValve.java:230)

=0A

        at org.apache.catalina.core.= StandardContextValve.invoke(StandardContextValve.java:175)

=0A

        at org.jboss.web.to= mcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java= :179)

=0A

       = at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.= java:84)

=0A

      &nb= sp; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.= java:128)

=0A

      &n= bsp; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve= .java:104)

=0A

      &= nbsp; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(Cach= edConnectionValve.java:156)

=0A

   &n= bsp;    at org.apache.catalina.core.StandardEngineValve.invo= ke(StandardEngineValve.java:109)

=0A

  &nb= sp;     at org.apache.catalina.connector.CoyoteAdapter.= service(CoyoteAdapter.java:241)

=0A

  &nbs= p;     at org.apache.coyote.http11.Http11Processor.proc= ess(Http11Processor.java:844)

=0A

   =      at org.apache.coyote.http11.Http11Protocol$Http11C= onnectionHandler.process(Http11Protocol.java:580)

=0A

        at org.apache.tomcat.util.net.= JIoEndpoint$Worker.run(JIoEndpoint.java:447)

=0A

&nb= sp;       at java.lang.Thread.run(Thread.java= :595)

=0A

 

=0A

********= ***************************************************************************= *****************************************

=0A

 =

=0A

Consequently, the error received on in the w= eb-service response is:

=0A

 

=0A

*************************************************************= ***************************************************************

=0A

 

=0A

org.apache.axis2.AxisFaul= t: Error in extracting message properties

=0A

 =             &nb= sp;  at org.apache.rampart.handler.RampartSender.invoke(RampartSender.= java:70)

=0A

      &nb= sp;         at org.apache.axis2.eng= ine.Phase.invoke(Phase.java:292)

=0A

  &nb= sp;            = at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)

=0A         &n= bsp;      at org.apache.axis2.engine.AxisEngine.se= nd(AxisEngine.java:377)

=0A

    =             at org.a= pache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic<= /P>=0A

=0A

(AbstractInOutSyncMe= ssageReceiver.java:45)

=0A

    &= nbsp;           at org.ap= ache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceive= r.java:96)

=0A

      &= nbsp;         at org.apache.axis2.e= ngine.AxisEngine.receive(AxisEngine.java:145)

=0A

&n= bsp;            = ;   at org.apache.axis2.transport.http.HTTPTransportUtils.process= HTTPPostRequest(HTTPTransportUtils.java:275)

=0A

&nb= sp;            =    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServ= let.java:120)

=0A

     &nbs= p;          at javax.servlet.h= ttp.HttpServlet.service(HttpServlet.java:710)

=0A

&n= bsp;            = ;   at javax.servlet.http.HttpServlet.service(HttpServlet.java:80= 3)

=0A

       &nb= sp;        at org.apache= .catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha= in.java:290)

=0A

  =             &nb= sp; at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application= FilterChain.java:206)

=0A

&nb= sp;            =    at com.mydomain.util.log.performance.filter.RequestIdentifierF= ilter.doFilter(RequestIdentifierFilter.java:60)

=0A

        &nbs= p;       at org.apache.catalina.core.Applicat= ionFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

= =0A

      = ;          at org.apache.catal= ina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

=0A

    &n= bsp;           at = org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilter= Internal

=0A

=0A

(OpenSessio= nInViewFilter.java:198)

=0A

    =             at org.s= pringframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte= r.java:75)

=0A

      &= nbsp;         at or= g.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF= ilterChain.java:235)

=0A

&nbs= p;            &= nbsp;  at org.apache.catalina.core.ApplicationFilterChain.doFilter(App= licationFilterChain.java:206)

=0A

           &nb= sp;    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doF= ilter(ReplyHeaderFilter.java:96)

=0A

           &= nbsp;    at org.apache.catalina.core.ApplicationFilterChain.= internalDoFilter(ApplicationFilterChain.java:235)

=0A

        &n= bsp;       at org.apache.catalina.core.Applic= ationFilterChain.doFilter(ApplicationFilterChain.java:206)

=0A

       = ;         at org.apache.cata= lina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

=0A=

         =        at org.apache.catalina.core.StandardCo= ntextValve.invoke(StandardContextValve.java:175)

=0A

            &n= bsp;   at org.jboss.web.tomcat.security.SecurityAssociationValve.= invoke(SecurityAssociationValve.java:179)

=0A

 =             &nb= sp;  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCont= extValve.java:84)

=0A

     =            at org.apache.= catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

=0A         &n= bsp;      at org.apache.catalina.valves.ErrorRepor= tValve.invoke(ErrorReportValve.java:104)

=0A

 &= nbsp;           &nbs= p;  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(C= achedConnectionValve.java:156)

=0A

   = ;             a= t org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j= ava:109)

=0A

      &nb= sp;         at org.apache.catalina.= connector.CoyoteAdapter.service(CoyoteAdapter.java:241)

=0A

           &= nbsp;    at org.apache.coyote.http11.Http11Processor.process= (Http11Processor.java:844)

=0A

   &nb= sp;            at or= g.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http1= 1Protocol.java:580)

=0A

    &nbs= p;           at org.apach= e.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

=0A

          =       at java.lang.Thread.run(Thread.java:595)

= =0A

Caused by: org.apache.rampart.RampartException: Err= or in extracting message properties

=0A

  =             &nb= sp; at org.apache.rampart.RampartMessageData.&lt;init>(RampartMessag= eData.java:290)

=0A

     &n= bsp;          at org.apache.ra= mpart.MessageBuilder.build(MessageBuilder.java:58)

=0A

            =     at org.apache.rampart.handler.RampartSender.invoke(Rampa= rtSender.java:64)

=0A

     =            ... 35 more=0A

Caused by: org.apache.ws.security.WSSecurityExcept= ion: Error in converting SOAP Envelope to Document; nested exception is: =0A

        &= nbsp;       org.apache.axiom.om.OMException: = javax.xml.stream.XMLStreamException

=0A

  =             &nb= sp; at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2U= til.java:157)

=0A

     &nbs= p;          at org.apache.ramp= art.RampartMessageData.&lt;init>(RampartMessageData.java:150)

=0A=

         =        ... 37 more

=0A

Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamExce= ption

=0A

       =          at org.apache.axiom.om.imp= l.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)

=0A

           &nbs= p;    at org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImp= l.java:447)

=0A

      =           at org.apache.axiom.= om.impl.dom.DocumentImpl.build(DocumentImpl.java:479)

=0A

           &nb= sp;    at org.apache.rampart.util.Axis2Util.getDocumentFromS= OAPEnvelope(Axis2Util.java:130)

=0A

  &nbs= p;             = ... 38 more

=0A

Caused by: javax.xml.stream.XMLStrea= mException

=0A

      &= nbsp;         at org.apache.axiom.o= m.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.java:1000)

=0A

         &nb= sp;      at org.apache.axiom.om.impl.llom.OMStAXWr= apper.next(OMStAXWrapper.java:923)

=0A

  &= nbsp;           &nbs= p; at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav= a:153)

=0A

 

=0A

*******= ***************************************************************************= ******************************************

=0A

 = ;

=0A

I debugged the code and observed that, in the = serialize method of the XML node POJO (generated by WSDL2JAVA), the "MTOMAw= areXMLStreamWriter xmlWriter"  parameter gets an instance of MTOMAware= OMBuilder if WS-Security is enabled.

=0A

 

= =0A

Whereas, without WS-Security it gets an instance of= org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer which use= s MTOMXMLStreamWriter which in turn uses com.ctc.wstx.sw.SimpleNsStreamWrit= er to serialize the response.

=0A

 

=0A

I also tried using AXIS 1.4 without any success.

= =0A

 

=0A

Any idea how can = this problem can be solved? Is there a way to let Rampart know which serial= izer should be used? Am I missing any configuration details of Rampart? =0A

 

=0A

Darshan Jawalebh= oi

=0A

http://curiousdeveloper.blogspot.com

=0A

 

=0A

DISCLAIMER =3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D This e-mail may contain privileged and confidential info= rmation which is the property of Persistent Systems Ltd. It is intended onl= y for the use of the individual or entity to which it is addressed. If you = are not the intended recipient, you are not authorized to read, retain, cop= y, print, distribute or use this message. If you have received this communi= cation in error, please notify the sender and delete all copies of this mes= sage. Persistent Systems Ltd. does not accept any liability for virus infec= ted mails.


--0-1512870510-1210844744=:40414--