Hi Glenard, I think I've gotten this corrected - but only for the Axis2 1.2 release code, and there's not yet a Rampart build available for that Axis2. I'll try to backport the fix to 1.1.1 this weekend. The Axis2 1.2 fix is at http://www.sosnoski.com/jibx-wiki/space/axis2-jibx
- Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Glenard Loy wrote: > Here's what's in my binding.xml: > > <binding xmlns:tns="http://ws.memberclicks.com/types/xsd" > force-classes="true"> > > <namespace uri="http://ws.memberclicks.com/types/xsd" > default="elements"/> > > <mapping abstract="true" > class="com.mc.persistence.bean.event.EventBean" > type-name="tns:EventInfo"> > <value name="event_id" field="eventId"/> > <value name="org_id" field="orgId"/> > <value name="name" field="name" usage="optional"/> > <value name="tickler" field="tickler" usage="optional"/> > <value name="description" field="description" usage="optional"/> > <value name="start_date" field="startDate" usage="optional"/> > <value name="end_date" field="endDate" usage="optional"/> > <value name="time" field="time" usage="optional"/> > <value name="location" field="location" usage="optional"/> > <value name="contact_name" field="contactName" usage="optional"/> > <value name="contact_email" field="contactEmail" usage="optional"/> > <value name="contact_phone" field="contactPhone" usage="optional"/> > <value name="display_start_date" field="displayStartDate" > usage="optional"/> > <value name="display_end_date" field="displayEndDate" > usage="optional"/> > <value name="forum_id" field="forumId" usage="optional"/> > <value name="form_id" field="formId" usage="optional"/> > <value name="time_zone_id" field="timeZoneId" usage="optional"/> > <value name="time_zone_calendar_id" field="timeZoneCalendarId" > usage="optional"/> > <value name="active" field="active" usage="optional"/> > </mapping> > > </binding> > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Dennis > Sosnoski > Sent: Tuesday, May 15, 2007 7:30 AM > To: JiBX users > Subject: Re: [jibx-users] Error in JiBX marshalling with Rampart > > Hi Glenard, > > I have found one issue that may be effecting JiBX marshalling with > Rampart. I'm looking at fixing that, but I'm wondering if your problem > is related. Can you show the bindings that you're using for this data? > > - Dennis > > Dennis M. Sosnoski > SOA and Web Services in Java > Training and Consulting > http://www.sosnoski.com - http://www.sosnoski.co.nz > Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 > > > > Glenard Loy wrote: > >> I tried the new axis2-jibx-1.1.1b.jar and I'm still getting the same error >> as before. Thanks. >> >> >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Dennis >> Sosnoski >> Sent: Wednesday, April 25, 2007 5:01 PM >> To: JiBX users >> Subject: Re: [jibx-users] Error in JiBX marshalling with Rampart >> >> I did find an error in the JiBX code which may have been responsible for >> your problem. Try the patched axis2-jibx-1.1.1b.jar available at >> http://www.sosnoski.com/jibx-wiki/space/axis2-jibx to see if that works. >> The fix is also in the nightly, but I'm not sure how well the Rampart >> code is tracking the Axis2 code (so how compatible the Rampart nightly >> is with the Axis2 nightly). >> >> - Dennis >> >> Dennis M. Sosnoski >> SOA and Web Services in Java >> Training and Consulting >> http://www.sosnoski.com - http://www.sosnoski.co.nz >> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 >> >> >> >> Glenard Loy wrote: >> >> >>> When I'm debugging the code and looking at the root cause of the >>> > exception > >>> being thrown, I see "Namespace URI has not been declared". I'm not sure >>> which class is creating that message though. I will try the nightly >>> >>> >> builds >> >> >>> of Axis2 and Rampart and see what happens. Thanks for your response. >>> >>> >>> -----Original Message----- >>> From: [EMAIL PROTECTED] >>> [mailto:[EMAIL PROTECTED] On Behalf Of Dennis >>> Sosnoski >>> Sent: Friday, April 20, 2007 8:01 PM >>> To: JiBX users >>> Subject: Re: [jibx-users] Error in JiBX marshalling with Rampart >>> >>> Hi Glenard, >>> >>> I don't know of any errors of this type. Can you give some specifics on >>> where you're seeing the "Namespace URI has not been declared" exception? >>> That probably means some sort of state conflict, where either the StAX >>> writer or the JiBX code is somehow confused about the state of the XML >>> that has been written. This is a complicated area, since JiBX normally >>> expects to have full control over the output (where it knows a namespace >>> has been declared because it just wrote it). In the Axis2 environment, >>> it needs to cooperate with the Axis2 kernel code and the generated >>> linkage code in order to make sure all the namespaces involved in a >>> message are handled properly. >>> >>> It's possible the 1.2 code in progress will work better for this >>> purpose, since I know there have been some namespace-related changes in >>> AXIOM. Can you try the nightly builds of both Axis2 and Rampart? >>> Unfortunately, I don't think the next formal release of Rampart will be >>> available until after the Axis2 1.2 release - which means it'll be too >>> late to fix any problems that relate to the Axis2 code itself. >>> >>> - Dennis >>> >>> Dennis M. Sosnoski >>> SOA and Web Services in Java >>> Training and Consulting >>> http://www.sosnoski.com - http://www.sosnoski.co.nz >>> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 >>> >>> >>> >>> Glenard Loy wrote: >>> >>> >>> >>>> When I try to use the Rampart 1.1 module I get an error when trying to >>>> return an array of beans or a single bean. The code runs fine when >>>> >>>> >>>> >>> rampart >>> >>> >>> >>>> is not engaged. I'm using the axis2-jibx-1.1.1a.jar. When I try to >>>> > look > >>>> further into the exception I see the following: "java.io.IOException: >>>> Namespace URI has not been declared." Is this a known bug or do I have >>>> something configured incorrectly? I'm fairly new to axis2 and JiBX so >>>> >>>> >> any >> >> >>>> help would be greatly appreciated. Thanks. >>>> >>>> Glenard >>>> >>>> >>>> Here is the log from the server side: >>>> ====================================================================== >>>> ERROR [04-16-07 11:00:11,235] >>>> impl.llom.OMSourcedElementImpl.getDirectReader():122 : Could not get >>>> >>>> >>>> >>> parser >>> >>> >>> >>>> from data source for element {http://ws.memberclicks.com/xsd}event_list >>>> javax.xml.stream.XMLStreamException: Error in JiBX marshalling >>>> at >>>> org.apache.axis2.jibx.JiBXDataSource.serialize(JiBXDataSource.java:150) >>>> at >>>> org.apache.axis2.jibx.JiBXDataSource.getReader(JiBXDataSource.java:187) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourced > >> >> >>> >>> >>> >>>> ElementImpl.java:119) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElem > >> >> >>> >>> >>> >>>> entImpl.java:142) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getFirstOMChild(OMSourced > >> >> >>> >>> >>> >>>> ElementImpl.java:693) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMNavigator._getFirstChild(OMNavigator.java:15 > >> >> >>> >>> >>> >>>> 6) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMNavigator.updateNextNode(OMNavigator.java:12 > >> >> >>> >>> >>> >>>> 8) >>>> at >>>> org.apache.axiom.om.impl.llom.OMNavigator.next(OMNavigator.java:109) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMStAXWrapper.updateNextNode(OMStAXWrapper.jav > >> >> >>> >>> >>> >>>> a:961) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.jav > >> >> >>> >>> >>> >>>> a:950) >>>> at >>>> org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:913) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:111) > >> >> >>> >>> >>> >>>> at >>>> org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469) >>>> at >>>> org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476) >>>> at >>>> >>>> >>>> >>>> > org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java > >> >> >>> >>> >>> >>>> :107) >>>> at >>>> >>>> > org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:146) > >>>> at >>>> org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56) >>>> at >>>> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59) >>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:382) >>>> at >>>> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) >>>> at >>>> >>>> >>>> >>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) >>> >>> >>> >>>> at >>>> >>>> >>>> >>>> > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstract > >> >> >>> >>> >>> >>>> InOutSyncMessageReceiver.java:48) >>>> at >>>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) >>>> at >>>> >>>> >>>> >>>> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT > >> >> >>> >>> >>> >>>> TPTransportUtils.java:328) >>>> at >>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) >>>> at >>>> >>>> >>>> >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760) >>> >>> >>> >>>> at >>>> >>>> >>>> >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >>> >>> >>> >>>> at >>>> > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > >>>> at >>>> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) >>>> at >>>> >>>> > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259) > >>>> at >>>> >>>> > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > >>>> at >>>> jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) >>>> at >>>> >>>> >>>> >>>> > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > >> >> >>> >>> >>> >>>> ) >>>> at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) >>>> DEBUG [04-16-07 11:00:11,235] transport.http.AxisServlet.doPost():268 : >>>> org.apache.axis2.AxisFault: Error in extracting message properties; >>>> >>>> >> nested >> >> >>>> exception is: >>>> org.apache.rampart.RampartException: Error in extracting >>>> >>>> >>>> >>> message >>> >>> >>> >>>> properties >>>> ====================================================================== >>>> >>>> Here's the log on the client side: >>>> ====================================================================== >>>> Exception in thread "main" org.apache.axis2.AxisFault: Error in >>>> >>>> >> extracting >> >> >>>> message properties >>>> at >>>> >>>> >>>> >>>> > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio > >> >> >>> >>> >>> >>>> n.java:271) >>>> at >>>> >>>> >>>> >>>> > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOpera > >> >> >>> >>> >>> >>>> tion.java:202) >>>> at >>>> >>>> >>>> >>>> > com.mc.ws.webmgmt.WebMgmtServiceStub.getEventList(WebMgmtServiceStub.java:31 > >> >> >>> >>> >>> >>>> 7) >>>> at >>>> dev.test.ws.UserServiceTest.getEventListTest(UserServiceTest.java:320) >>>> at >>>> > dev.test.ws.UserServiceTest.main(UserServiceTest.java:124) > >>>> Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Error in >>>> extracting message properties; nested exception is: >>>> org.apache.rampart.RampartException: Error in extracting >>>> >>>> >>>> >>> message >>> >>> >>> >>>> properties >>>> at >>>> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65) >>>> at org.apache.axis2.engine.Phase.invoke(Phase.java:382) >>>> at >>>> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522) >>>> at >>>> >>>> >>>> >>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655) >>> >>> >>> >>>> at >>>> >>>> >>>> >>>> > org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstract > >> >> >>> >>> >>> >>>> InOutSyncMessageReceiver.java:48) >>>> at >>>> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) >>>> at >>>> >>>> >>>> >>>> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT > >> >> >>> >>> >>> >>>> TPTransportUtils.java:328) >>>> at >>>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) >>>> at >>>> >>>> >>>> >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760) >>> >>> >>> >>>> at >>>> >>>> >>>> >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853) >>> >>> >>> >>>> at >>>> > jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) > >>>> at >>>> jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) >>>> at >>>> >>>> > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259) > >>>> at >>>> >>>> > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541) > >>>> at >>>> jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) >>>> at >>>> >>>> >>>> >>>> > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428 > >> >> >>> >>> >>> >>>> ) >>>> at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) >>>> Caused by: org.apache.rampart.RampartException: Error in extracting >>>> >>>> >>>> >>> message >>> >>> >>> >>>> properties >>>> at >>>> >>>> > org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:294) > >>>> at >>>> org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56) >>>> at >>>> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59) >>>> ... 16 more >>>> Caused by: org.apache.ws.security.WSSecurityException: Error in >>>> >>>> >> converting >> >> >>>> SOAP Envelope to Document; nested exception is: >>>> org.apache.axiom.om.OMException: >>>> javax.xml.stream.XMLStreamException >>>> at >>>> >>>> >>>> >>>> > org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java > >> >> >>> >>> >>> >>>> :121) >>>> at >>>> >>>> > org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:146) > >>>> ... 18 more >>>> Caused by: org.apache.axiom.om.OMException: >>>> javax.xml.stream.XMLStreamException >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:194) > >> >> >>> >>> >>> >>>> at >>>> org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469) >>>> at >>>> org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476) >>>> at >>>> >>>> >>>> >>>> > org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java > >> >> >>> >>> >>> >>>> :107) >>>> ... 19 more >>>> Caused by: javax.xml.stream.XMLStreamException >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.jav > >> >> >>> >>> >>> >>>> a:952) >>>> at >>>> org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:913) >>>> at >>>> >>>> >>>> >>>> > org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:111) > >> >> >>> >>> >>> >>>> ... 22 more >>>> >>>> at org.apache.axis2.AxisFault.<init>(AxisFault.java:159) >>>> ... 5 more >>>> ====================================================================== >>>> >>>> Here's part of the wsdl: >>>> ====================================================================== >>>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> attributeFormDefault="qualified" >>>> elementFormDefault="qualified" >>>> targetNamespace="http://ws.memberclicks.com/xsd"> >>>> >>>> <xs:element name="getEventList"> >>>> <xs:complexType> >>>> <xs:sequence> >>>> <xs:element name="orgId" type="xs:string"/> >>>> <xs:element name="username" type="xs:string"/> >>>> <xs:element name="password" type="xs:string"/> >>>> </xs:sequence> >>>> </xs:complexType> >>>> </xs:element> >>>> <xs:element name="getEventListResponse"> >>>> <xs:complexType> >>>> <xs:sequence> >>>> <xs:element name="event_list" >>>> >>>> >> type="tns:EventInfo" >> >> >>>> minOccurs="0" maxOccurs="unbounded"/> >>>> </xs:sequence> >>>> </xs:complexType> >>>> </xs:element> >>>> >>>> </xs:schema> >>>> ====================================================================== >>>> >>>> Here's the rampart configuration from the axis2.xml: >>>> ====================================================================== >>>> <module ref="rampart" /> >>>> >>>> <parameter name="InflowSecurity"> >>>> <action> >>>> <items>Timestamp</items> >>>> </action> >>>> </parameter> >>>> >>>> <parameter name="OutflowSecurity"> >>>> <action> >>>> <items>Timestamp</items> >>>> </action> >>>> </parameter> >>>> ====================================================================== >>>> >>>> >>>> >>>> > ------------------------------------------------------------------------- > >>>> This SF.net email is sponsored by DB2 Express >>>> Download DB2 Express C - the FREE version of DB2 express and take >>>> control of your XML. No limits. Just data. Click to get it now. >>>> http://sourceforge.net/powerbar/db2/ >>>> _______________________________________________ >>>> jibx-users mailing list >>>> jibx-users@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/jibx-users >>>> >>>> >>>> >>>> >>>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> jibx-users mailing list >>> jibx-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jibx-users >>> >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> jibx-users mailing list >>> jibx-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jibx-users >>> >>> >>> >>> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> jibx-users mailing list >> jibx-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jibx-users >> >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users