Flash 8 and CXF Webservices

2008-02-06 Thread Vespa, Anthony J
Hello,

Previously I was interested in some Flex and CXF projects - but I'm
wondering has anyone been doing or worked on any projects with CXF
and/or webservices with Flash 8 or 9 as a front end?  I'd be interested
in your experiences/loves/hates etc.

Thanks!

Tony


RE: Flex and CXF

2008-01-23 Thread Vespa, Anthony J
I have only done some basic Flex work in the past myself, which is why I
am soliciting experiences.

-Original Message-
From: Sergey Beryozkin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 23, 2008 10:04 AM
To: cxf-user@incubator.apache.org
Subject: Re: Flex and CXF

My understanding is that for Flex (or indeed Silverlight and similar
technologies) to work with a given service all that needs to be done is,
in case of Flex, to have some MXML[1] created (tools would do it
typically) which would link to a service, but for the purpose of the
demo it can be done manually. And Flex server side libs should be added
to a runtime classpath of a given application.

Have you done some Flex before ? It would be interesting to know what
need to be dome to FLEX-ify, say, a basic JAX-RS demo.

Cheers, Sergey

[1] http://en.wikipedia.org/wiki/MXML

- Original Message - 
From: "Vespa, Anthony J" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, January 23, 2008 2:09 PM
Subject: Flex and CXF


Just curious if anyone has experiences (good/bad/other) working with
Flex and web services in CXF?  Any input on pitfalls or approaches is
appreciated.

Thx,

Tony


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland


RE: JSON and JAX-RS

2008-01-23 Thread Vespa, Anthony J
Well it turned out that I had too many jaxb jars in my classpath so now
the xmlseealso works, but I get this odd exception as an invalid
namespace - I'm not quite sure why I'm getting it though, do I need to
specify another namespace somewhere?  At this point, I'm not specifying
it anywhere - my bean.xml looks like...

(for this service>




  

  

And the exception


INFO: Interceptor has thrown exception, unwinding now
java.lang.IllegalStateException: Invalid JSON namespace:
http://www.w3.org/2001/XMLSchema-instance
at
org.codehaus.jettison.mapped.MappedNamespaceConvention.getJSONNamespace(
MappedNamespaceConvention.java:148)
at
org.codehaus.jettison.mapped.MappedNamespaceConvention.createAttributeKe
y(MappedNamespaceConvention.java:136)
at
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeAttribute(Mapped
XMLStreamWriter.java:89)
at
com.sun.xml.bind.v2.runtime.output.XMLStreamWriterOutput.attribute(XMLSt
reamWriterOutput.java:133)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.attribute(XMLSerializer.java:4
31)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.j
ava:676)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeI
tem(ArrayElementNodeProperty.java:65)
at
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListB
ody(ArrayElementProperty.java:168)
at
com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(Array
ERProperty.java:152)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInf
oImpl.java:322)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializ
er.java:589)
at
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInf
oImpl.java:312)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java
:490)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:328
)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:1
75)
at
org.apache.cxf.jaxrs.provider.JSONProvider.writeTo(JSONProvider.java:90)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRS
OutInterceptor.

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 23, 2008 10:28 AM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: JSON and JAX-RS

On Tuesday 22 January 2008, Vespa, Anthony J wrote:
> Interesting.  Would that mean I would have to use seekAlso and list
> all of the objects that could possibly be returned - I have currently
> about six types of custom objects.  What if I was returning a type
> like a boolean or just a string?

You should be fine. (although, you probably need to wrapper them with a 
JAXBElement to get the element name)   I think all the stuff that maps 
to straight xsd schema types are always part of the created JAXBContext.

The stuff you need to be careful of are the things that would be 
generated from the xjc. 

Dan


>
> 
>
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Tue 1/22/2008 5:31 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: JSON and JAX-RS
>
>
>
>
> Well, looking at the code, it seems to create a new JAXBContext for
> each top level type, which really sucks.   IMO, it should use our
> JAXBDatabinding in some way which would allow it/you to configure
> things via spring or something so one one JAXBContext is created/used
> that would have all the required types in it.   Actually, checking if
> there is an ObjectFactory in the package and creating the context
> based on that would also go a long way to helping.
>
> That said,  with JAXB 2.1, you can probably add an @XmlSeeAlso
> annation on the wsResponse that points to the wsMessage to make the
> JAXBContext for the wsResponse be able to marshal the wsMessage as
> well.
>
> Dan
>
> On Tuesday 22 January 2008, Vespa, Anthony J wrote:
> > So I spent some time playing with JAX-RS and I seem to have
> > encountered an issue.
> >
> > I can return single objects from my service as JSON (standard Java
> > types as well as my custom objects) but if I try to return my
> > wrapper object which contains an anytype generic list, I get an
> > exception.
> >
> > Effectively I have an object called wsResponse that, in this case,
> > is returning an array of messages (wsMessage) - I have decorated
> > both objects with the XMLType.  I am looking into this exception and
> > see references to JAXB; is it possible to get around this?
> >
> >
> >
> > Jan 22, 2008 4:45:26 PM
> > org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor ha

Flex and CXF

2008-01-23 Thread Vespa, Anthony J
Just curious if anyone has experiences (good/bad/other) working with
Flex and web services in CXF?  Any input on pitfalls or approaches is
appreciated.

Thx,

Tony


RE: JSON and JAX-RS

2008-01-22 Thread Vespa, Anthony J
Interesting.  Would that mean I would have to use seekAlso and list all of the 
objects that could possibly be returned - I have currently about six types of 
custom objects.  What if I was returning a type like a boolean or just a string?



From: Daniel Kulp [mailto:[EMAIL PROTECTED]
Sent: Tue 1/22/2008 5:31 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: JSON and JAX-RS




Well, looking at the code, it seems to create a new JAXBContext for each
top level type, which really sucks.   IMO, it should use our
JAXBDatabinding in some way which would allow it/you to configure things
via spring or something so one one JAXBContext is created/used that
would have all the required types in it.   Actually, checking if there
is an ObjectFactory in the package and creating the context based on
that would also go a long way to helping. 

That said,  with JAXB 2.1, you can probably add an @XmlSeeAlso annation
on the wsResponse that points to the wsMessage to make the JAXBContext
for the wsResponse be able to marshal the wsMessage as well.

Dan


On Tuesday 22 January 2008, Vespa, Anthony J wrote:
> So I spent some time playing with JAX-RS and I seem to have
> encountered an issue.
>
> I can return single objects from my service as JSON (standard Java
> types as well as my custom objects) but if I try to return my wrapper
> object which contains an anytype generic list, I get an exception.
>
> Effectively I have an object called wsResponse that, in this case, is
> returning an array of messages (wsMessage) - I have decorated both
> objects with the XMLType.  I am looking into this exception and see
> references to JAXB; is it possible to get around this?
>
>
>
> Jan 22, 2008 4:45:26 PM
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
> INFO: Available content types for response is: application/json,
> Jan 22, 2008 4:45:26 PM
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
> INFO: Response EntityProvider is:
> org.apache.cxf.jaxrs.provider.JSONProvider
> Jan 22, 2008 4:45:26 PM
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
> INFO: Response content type is: application/json
> javax.xml.bind.MarshalException
>  - with linked exception:
> [javax.xml.bind.JAXBException: class com.cbs.bos.data.ws.wsMessage nor
> any of its super class is known to this context.]
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:2
>95 )
> at
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java
>:1 48)
> at
> org.apache.cxf.jaxrs.provider.JSONProvider.writeTo(JSONProvider.java:9
>0) at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAX
>RS OutInterceptor.java:99)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rC hain.java:208)
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outg
>oi ngChainInterceptor.java:74)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rC hain.java:208)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
>ti onObserver.java:78)
> at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD
>es tination.java:79)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
>er vletController.java:264)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
>ol ler.java:123)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXF
>Se rvlet.java:170)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFS
>er vlet.java:152)
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>ca tionFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>lt erChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>lv e.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>lv e.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>va
>
> :128)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>va
>
> :102)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>e. java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd

RE: JSON and JAX-RS

2008-01-22 Thread Vespa, Anthony J
I did try that, and I get the same error. 

-Original Message-
From: Beryozkin, Sergey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 22, 2008 5:14 PM
To: cxf-user@incubator.apache.org
Subject: RE: JSON and JAX-RS

Hi

org.apache.cxf.jaxrs.provider.JSONProvider checks XMLRootElement
annotations.
Would it make a difference if you annotate both wsResponse and wsMessage
classes with this annotation ?

Cheers, Sergey



-Original Message-
From: Vespa, Anthony J [mailto:[EMAIL PROTECTED] 
Sent: 22 January 2008 21:48
To: cxf-user@incubator.apache.org
Subject: JSON and JAX-RS

So I spent some time playing with JAX-RS and I seem to have encountered
an issue.

I can return single objects from my service as JSON (standard Java types
as well as my custom objects) but if I try to return my wrapper object
which contains an anytype generic list, I get an exception.

Effectively I have an object called wsResponse that, in this case, is
returning an array of messages (wsMessage) - I have decorated both
objects with the XMLType.  I am looking into this exception and see
references to JAXB; is it possible to get around this?



Jan 22, 2008 4:45:26 PM
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
INFO: Available content types for response is: application/json,
Jan 22, 2008 4:45:26 PM
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
INFO: Response EntityProvider is:
org.apache.cxf.jaxrs.provider.JSONProvider
Jan 22, 2008 4:45:26 PM
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
INFO: Response content type is: application/json
javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: class com.cbs.bos.data.ws.wsMessage nor
any of its super class is known to this context.]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:295
)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:1
48)
at
org.apache.cxf.jaxrs.provider.JSONProvider.writeTo(JSONProvider.java:90)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRS
OutInterceptor.java:99)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:208)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outgoi
ngChainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:208)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:78)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
tination.java:79)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.java:264)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:123)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
rvlet.java:170)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFSer
vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland


JSON and JAX-RS

2008-01-22 Thread Vespa, Anthony J
So I spent some time playing with JAX-RS and I seem to have encountered
an issue.

I can return single objects from my service as JSON (standard Java types
as well as my custom objects) but if I try to return my wrapper object
which contains an anytype generic list, I get an exception.

Effectively I have an object called wsResponse that, in this case, is
returning an array of messages (wsMessage) - I have decorated both
objects with the XMLType.  I am looking into this exception and see
references to JAXB; is it possible to get around this?



Jan 22, 2008 4:45:26 PM
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
INFO: Available content types for response is: application/json,
Jan 22, 2008 4:45:26 PM
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
INFO: Response EntityProvider is:
org.apache.cxf.jaxrs.provider.JSONProvider
Jan 22, 2008 4:45:26 PM
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor handleMessage
INFO: Response content type is: application/json
javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: class com.cbs.bos.data.ws.wsMessage nor
any of its super class is known to this context.]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:295
)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:1
48)
at
org.apache.cxf.jaxrs.provider.JSONProvider.writeTo(JSONProvider.java:90)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRS
OutInterceptor.java:99)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:208)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outgoi
ngChainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:208)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:78)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
tination.java:79)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.java:264)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:123)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
rvlet.java:170)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFSer
vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)


RE: Snapshot JAR file

2008-01-22 Thread Vespa, Anthony J
It does seem to work now in my IDE.  Thanks. =)

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 22, 2008 11:32 AM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Snapshot JAR file

On Tuesday 22 January 2008, Vespa, Anthony J wrote:
> I hadn't heard any more on this..I know it seems like a minor thing,
> just wondering if this will be fixed for the 2.0.4 release.

You tell me  :-) The release candidates are at:
http://people.apache.org/~dkulp/stage_cxf/2.0.4-incubator/
(Seriously, it should be fixed)


I'm still double checking them right now.   If my checks look ok, I'll
be 
calling the vote later today.

Dan


>
> -Original Message-----
> From: Vespa, Anthony J
> Sent: Tuesday, January 15, 2008 2:52 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: Snapshot JAR file
>
> Thanks for looking into this, I just thought it was me being crazy at
> first. =)
>
> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 15, 2008 1:33 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Snapshot JAR file
>
>
> Yep.  Bug in shade plugin.I've just fixed it, but it will require
> a new release of the shade plugin to get it working.   :-(
>
> Dan
>
> On Tuesday 15 January 2008, Daniel Kulp wrote:
> > OK.   Looks like a bug in the latest shade plugin.Using unzip, I
> > see:
> >
> >
> >  Length   MethodSize  Ratio   Date   Time   CRC-32Name
> >   --  --- -         --
> >0  Defl:N2   0%  01-13-08 19:17    META-INF
> > ...
> >
> > but for a javadoc jar, I see:
> >  Length   MethodSize  Ratio   Date   Time   CRC-32Name
> >   --  --- -         --
> >0  Stored0   0%  01-13-08 19:18  0000  META-INF/
> >
> > Looks like the dirs are being stored as files.   Not good.   I'll
> > dig into it.
> >
> > Dan
> >
> > On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> > > Sorry for not including more info, my bad.
> > >
> > > I'm grabbing the zip version of the nightly 2.1 snapshot and just
> > > unpacking the .jar and dropping it into my lib dir.  I noticed
> > > this occurred with the last 2 or 3 snapshots of 2.1.
> > >
> > > -Original Message-
> > > From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, January 15, 2008 12:36 PM
> > > To: cxf-user@incubator.apache.org
> > > Cc: Vespa, Anthony J
> > > Subject: Re: Snapshot JAR file
> > >
> > >
> > > Tony,
> > >
> > > Are you grabbing the jar from a maven dependency (like cxf-bundle)
> > > or by
> > >
> > > downloading the distribution and unpacking it?   Also, 2.1 or
> > > 2.0.4? Just wanted to know where to start looking.
> > >
> > > Dan
> > >
> > > On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> > > > Hello,
> > > >
> > > > Odd question - I feel like I am missing something obvious.  For
> > > > some reason, my IDE (intelliJ 7) won't recognize the snapshot of
> > > > the main CXF jar, and I can't use winzip to open it.  I can
> > > > extract single files from it.  I think the IDE code analyzer
> > > > can't decompress it either - am I missing something obvious?
> > > >
> > > > Not a huge issue, just a minor nit - things compile fine.
> > > >
> > > > -Tony



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: Snapshot JAR file

2008-01-22 Thread Vespa, Anthony J
I hadn't heard any more on this..I know it seems like a minor thing,
just wondering if this will be fixed for the 2.0.4 release.

-Original Message-
From: Vespa, Anthony J 
Sent: Tuesday, January 15, 2008 2:52 PM
To: cxf-user@incubator.apache.org
Subject: RE: Snapshot JAR file

Thanks for looking into this, I just thought it was me being crazy at
first. =)

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 1:33 PM
To: cxf-user@incubator.apache.org
Subject: Re: Snapshot JAR file


Yep.  Bug in shade plugin.I've just fixed it, but it will require a 
new release of the shade plugin to get it working.   :-(

Dan


On Tuesday 15 January 2008, Daniel Kulp wrote:
> OK.   Looks like a bug in the latest shade plugin.Using unzip, I
> see:
>
>
>  Length   MethodSize  Ratio   Date   Time   CRC-32Name
>   --  --- -         --
>0  Defl:N2   0%  01-13-08 19:17    META-INF
> ...
>
> but for a javadoc jar, I see:
>  Length   MethodSize  Ratio   Date   Time   CRC-32Name
>   --  --- -         --
>0  Stored0   0%  01-13-08 19:18    META-INF/
>
> Looks like the dirs are being stored as files.   Not good.   I'll dig
> into it.
>
> Dan
>
> On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> > Sorry for not including more info, my bad.
> >
> > I'm grabbing the zip version of the nightly 2.1 snapshot and just
> > unpacking the .jar and dropping it into my lib dir.  I noticed this
> > occurred with the last 2 or 3 snapshots of 2.1.
> >
> > -Original Message-
> > From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 15, 2008 12:36 PM
> > To: cxf-user@incubator.apache.org
> > Cc: Vespa, Anthony J
> > Subject: Re: Snapshot JAR file
> >
> >
> > Tony,
> >
> > Are you grabbing the jar from a maven dependency (like cxf-bundle)
> > or by
> >
> > downloading the distribution and unpacking it?   Also, 2.1 or 2.0.4?
> > Just wanted to know where to start looking.
> >
> > Dan
> >
> > On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> > > Hello,
> > >
> > > Odd question - I feel like I am missing something obvious.  For
> > > some reason, my IDE (intelliJ 7) won't recognize the snapshot of
> > > the main CXF jar, and I can't use winzip to open it.  I can
> > > extract single files from it.  I think the IDE code analyzer can't
> > > decompress it either - am I missing something obvious?
> > >
> > > Not a huge issue, just a minor nit - things compile fine.
> > >
> > > -Tony



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: Issues with JSON based Service and Jettison

2008-01-17 Thread Vespa, Anthony J
Jervis, I actually got it working end to end - once I added the namespace as a 
property in my jettison settings of my beans.xml - it works quite nicely and 
even deals with my wrapper/anytypes.

Out of curiousity, there have been some oblique mentions here and there of 
having the incoming JSON parsed out into mapped variables, eg I have a JSON 
object named message with message: { id:1, name=foo} and a web service that 
takes id and name as params and outputs JSON - it seems from your previous 
emails this is not possible?  That only the jettison system will work with one 
argumenet?  Is this true of jax-rs as well?

Thanks again for your guidance  - it helped me a lot with the issues I was 
having.  Once I get things settled, I'll try to write up a workable example for 
inclusion.

-Tony

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 16, 2008 10:25 PM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison

You got 'Invalid URL/Verb combination. Verb: POST Path: /message' exception 
when the combination of "Verb: POST" and "Path: /message" did not find a method 
from your service. Not sure why though as your service looks alright. You may 
want to paste out the initialization information when your server is starting 
up, it normally says sth like below:

2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method getBook to resource /books/{id} and verb GET
2008-1-17 11:23:08 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be 
http://localhost:9080/xmlwrapped
2008-1-17 11:23:08 org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
buildServiceFromClass
INFO: Creating Service {http://book.acme.com}BookServiceService from class 
org.apache.cxf.customer.book.BookService
2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method updateBook to resource /books/{id} and verb PUT
2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method getBooks to resource /books and verb GET
2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method getAnotherBook to resource /books/another/{id} and verb GET
2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method addBook to resource /books and verb POST
2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method getBook to resource /books/{id} and verb GET
2008-1-17 11:23:08 org.apache.cxf.binding.http.strategy.JRAStrategy map
INFO: Mapping method deleteBook to resource /books/{id} and verb DELETE
2008-1-17 11:23:08 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:9080/json


> -----Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月17日 0:05
> To: cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> So after some thought and tweaking I adjusted my JSON service, but I am
> getting the 'Invalid URL/Verb combination. Verb: POST Path: /message'
> exception.
> 
> My service looks like this:
> 
> @WebService(targetNamespace = "http://com.cbs.bos.ws.json";)
> public interface BoardService {
> @Post
> @HttpResource(location = "/message")
> public wsResponse getMessage(
> @WebParam(name = "message")wsMessage message);
> 
> }
> 
> I am using this javascript:
> 
> var json = {"wsMessage":{"messageId":"1"}};
> 
> new Ajax.Request($F('url'), {
> asynchronous: false,
> method: 'post',
> contentType: 'application/json',
> postBody: Object.toJSON(json),
> onSuccess: function(transport,jsonFromHeaders)
> 
> and in my beans.xml, I have this:
> 
> 
>  implementor="com.cbs.bos.ws.json.BoardServiceImpl"
> address="/jBoardService"
> bindingUri="http://apache.org/cxf/binding/http";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> javax.xml.stream.XMLInputFactory
> 
> 
> 
> http://BoardService.json.bos.cbs.com/";
> value="jBoardService"/>
> http://BoardServiceImpl.json.bos.cbs.com/";
> value="jBoardServiceImpl"/>
> 
> 
> 
> 
> 
> javax.xml.stream.XMLOutputFactory
> 
> 
> 
> http://BoardService.json.bos.cbs.com/";
> value="jBoardService"/>
> http://BoardServiceImpl.json.bos.cbs.com/";
> value="jBoardServiceImpl"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: Liu, Jervis [ma

RE: Issues with JSON based Service and Jettison

2008-01-17 Thread Vespa, Anthony J
Hi Benson,

Thank you for the insights.  I feel quite honestly like I'm swimming
through Jello a bit, as I cannot find an end to end JSON/CXF/Jettison
example, so I'm gleaming info from past mails on the mailing list and
some general common sense - I certainly believe it could be my error in
so much that I have not configured something correctly - or my way of
thinking about the problem incorrectly.  I'm having issues even trying
to test simple cases.

In any event, I'll keep plugging.

-Tony



-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 17, 2008 9:12 AM
To: cxf-user@incubator.apache.org
Cc: [EMAIL PROTECTED]
Subject: RE: Issues with JSON based Service and Jettison


On Thu, 2008-01-17 at 09:06 -0500, Vespa, Anthony J wrote:
> Hi Jervis,
> 
> I was able to get past that part yesterday - but I seem to be having
> some more problems with just the general namespace.

Anthony,

A general caveat. You are combining Aegis with JSON, which is not a
heavily tested combination. You are using the 'just like JAXB'
annotations on Aegis, instead of the primary Aegis idea, which is
mapping XML files. You may have problems, and you'll have to be willing
to create isolated test cases and attach them to JIRA entries.

If you are just experimenting, you might want to use .aegis.xml files
(or even consider JAXB), rather than plough this furrow.

--benson




RE: Issues with JSON based Service and Jettison

2008-01-17 Thread Vespa, Anthony J
Hi Jervis,

I was able to get past that part yesterday - but I seem to be having
some more problems with just the general namespace.

I can submit the data in but it is being marshalled out incorrectly and
exceptionin - I believe I have set up the xml attributes correctly on
each of my objecrs, there are akin to:

@XmlType(name = "wsResponse", namespace = "http://json.ws.bos.cbs.com/";,
extensibleElements=false)

At the top of each of my objects or entity classes.  This exception
seems to occur after each attempt to loadf data into my objects prior to
writing the output.  Effectively I am using Eclipselink to access my db,
which then populates the objects, and values for those objects get put
into a wrapper class, but the exeception now happens outbound and I'm
not sure why.  I'm taking a look through the source but can't really
determine what about my stuff is breaking it.

Jan 16, 2008 2:45:34 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: Invalid JSON
namespace: http://json.ws.bos.cbs.com/
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:
209)
at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:74)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(
AbstractOutDatabindingInterceptor.java:95)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInter
ceptor.java:68)
at
org.apache.cxf.binding.xml.interceptor.XMLMessageOutInterceptor.handleMe
ssage(XMLMessageOutInterceptor.java:71)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:207)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outgoi
ngChainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:207)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:78)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
tination.java:79)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.java:264)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:123)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
rvlet.java:170)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFSe
rvlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: Invalid JSON namespace:
http://json.ws.bos.cbs.com/
at
org.codehaus.jettison.mapped.MappedNamespaceConvention.getJSONNamespace(
MappedNamespaceConvention.java:148)
at
org.codehaus.jettison.mapped.MappedNamespaceConvention.createKey(MappedN
amespaceConvention.java:155)
at
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeStartElement(Map
pedXMLStreamWriter.java:220)
at
com.sun.xml.bind.v2.runtime.output.XMLStreamWriterOutput.beginStartTag(X
MLStreamWriterOutput.java:70)
at
com.sun.xml.bind.v2.runtime.output.NamespaceContextImpl$Element.startEle
ment(NamespaceContextImpl.java:428)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.endNamespaceDecls(XMLSerialize
r.java:254)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.j
ava:612)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementB
eanInfoImpl.java:93)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementB
eanInfoImpl.java:127)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBea
nInfoImpl.java:244)
at
co

RE: Issues with JSON based Service and Jettison

2008-01-16 Thread Vespa, Anthony J
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:148)
at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.java:416)
at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:188)


-Original Message-
From: Vespa, Anthony J 
Sent: Wednesday, January 16, 2008 11:05 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison

So after some thought and tweaking I adjusted my JSON service, but I am getting 
the 'Invalid URL/Verb combination. Verb: POST Path: /message' exception.

My service looks like this:

@WebService(targetNamespace = "http://com.cbs.bos.ws.json";)
public interface BoardService {
@Post
@HttpResource(location = "/message")
public wsResponse getMessage(
@WebParam(name = "message")wsMessage message);

}

I am using this javascript:

var json = {"wsMessage":{"messageId":"1"}};

new Ajax.Request($F('url'), {
asynchronous: false,
method: 'post',
contentType: 'application/json',
postBody: Object.toJSON(json),
onSuccess: function(transport,jsonFromHeaders)

and in my beans.xml, I have this:


http://apache.org/cxf/binding/http";>









javax.xml.stream.XMLInputFactory



http://BoardService.json.bos.cbs.com/"; value="jBoardService"/>
http://BoardServiceImpl.json.bos.cbs.com/"; 
value="jBoardServiceImpl"/>





javax.xml.stream.XMLOutputFactory



http://BoardService.json.bos.cbs.com/"; value="jBoardService"/>
http://BoardServiceImpl.json.bos.cbs.com/"; 
value="jBoardServiceImpl"/>












-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 12:32 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison

First of all, you need to set wrapped style to false, wrapped style true won't 
work with JSON (I noticed that you already set wrapped to false). What happened 
is Jettison reads input stream to a W3C Document, then this W3C Document is 
used to create a new XMLInputStream. From this point on, the following CXF 
interceptors will presume they are deal with a normal XML input e.g. the XML 
section embedded in a soap body.  

Let's take a concrete example. An inputstream of 
"{"acme.Book":{"acme.name":"CXF in Action "}}" is transferred to a 
org.w3c.dom.Document of CXF in Action by Jettison 
first, then the Document object will be marshaled to a Book object. The wrapper 
I am talking about is referring to the operation name wrapper of doc-lit 
wrapped style. For example, if you set wrapped style to true, in order to 
marshal the Document to Book object successfully, the Document's content need 
to be CXF in Action instead. 

Cheers,
Jervis

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月14日 21:32
> To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> Hrm, could you explain a bit more please?
> 
> I was under the impression from various examples that JSON would behave
> like REST, eg I pass a request in a URL and the response comes back as a
> JSON output (eg I have a method called getMessage and it takes 3 params)
> so I pass it message/1/2/3/ and the output is in JSON forma- by the request
> wrapper you mean that I would need to pass it one object (say, a hashmap)
> and unwrap that object, as that is how the JSON inbound request is
> represented, correct?  I was under the perhaps mistaken impression that
> JSON was extracting the values from the inbound JSON array and matching
> them with the arguments via Jettison.
> 
> 
> 
> From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> Sent: Sun 1/13/2008 5:00 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> 
> 
> According to the stack trace, it looks like your service method has more than
> one parameters. The CXF HTTP binding requires that the service method can
> only have one input parameters. For example, following is invalid:
> 
> @Put
> @HttpResource(location = "/books/{id}")
> void updateBook(@WebParam(name = "Book")Book c, int id);
> 
> Hope this helps,
> Jervis
> 
> > -Original Message-
> > From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> > Sent: 2008?1?13? 10:33
> > To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> > Subject: RE: Issues with JSON based Service and Jettison
> >
> > I actually tried the jax_rs samples a week or two back and it caused quite 

RE: Issues with JSON based Service and Jettison

2008-01-16 Thread Vespa, Anthony J
So after some thought and tweaking I adjusted my JSON service, but I am getting 
the 'Invalid URL/Verb combination. Verb: POST Path: /message' exception.

My service looks like this:

@WebService(targetNamespace = "http://com.cbs.bos.ws.json";)
public interface BoardService {
@Post
@HttpResource(location = "/message")
public wsResponse getMessage(
@WebParam(name = "message")wsMessage message);

}

I am using this javascript:

var json = {"wsMessage":{"messageId":"1"}};

new Ajax.Request($F('url'), {
asynchronous: false,
method: 'post',
contentType: 'application/json',
postBody: Object.toJSON(json),
onSuccess: function(transport,jsonFromHeaders)

and in my beans.xml, I have this:


http://apache.org/cxf/binding/http";>









javax.xml.stream.XMLInputFactory



http://BoardService.json.bos.cbs.com/"; value="jBoardService"/>
http://BoardServiceImpl.json.bos.cbs.com/"; 
value="jBoardServiceImpl"/>





javax.xml.stream.XMLOutputFactory



http://BoardService.json.bos.cbs.com/"; value="jBoardService"/>
http://BoardServiceImpl.json.bos.cbs.com/"; 
value="jBoardServiceImpl"/>












-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 12:32 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison

First of all, you need to set wrapped style to false, wrapped style true won't 
work with JSON (I noticed that you already set wrapped to false). What happened 
is Jettison reads input stream to a W3C Document, then this W3C Document is 
used to create a new XMLInputStream. From this point on, the following CXF 
interceptors will presume they are deal with a normal XML input e.g. the XML 
section embedded in a soap body.  

Let's take a concrete example. An inputstream of 
"{"acme.Book":{"acme.name":"CXF in Action "}}" is transferred to a 
org.w3c.dom.Document of CXF in Action by Jettison 
first, then the Document object will be marshaled to a Book object. The wrapper 
I am talking about is referring to the operation name wrapper of doc-lit 
wrapped style. For example, if you set wrapped style to true, in order to 
marshal the Document to Book object successfully, the Document's content need 
to be CXF in Action instead. 

Cheers,
Jervis

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月14日 21:32
> To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> Hrm, could you explain a bit more please?
> 
> I was under the impression from various examples that JSON would behave
> like REST, eg I pass a request in a URL and the response comes back as a
> JSON output (eg I have a method called getMessage and it takes 3 params)
> so I pass it message/1/2/3/ and the output is in JSON forma- by the request
> wrapper you mean that I would need to pass it one object (say, a hashmap)
> and unwrap that object, as that is how the JSON inbound request is
> represented, correct?  I was under the perhaps mistaken impression that
> JSON was extracting the values from the inbound JSON array and matching
> them with the arguments via Jettison.
> 
> 
> 
> From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> Sent: Sun 1/13/2008 5:00 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> 
> 
> According to the stack trace, it looks like your service method has more than
> one parameters. The CXF HTTP binding requires that the service method can
> only have one input parameters. For example, following is invalid:
> 
> @Put
> @HttpResource(location = "/books/{id}")
> void updateBook(@WebParam(name = "Book")Book c, int id);
> 
> Hope this helps,
> Jervis
> 
> > -Original Message-
> > From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> > Sent: 2008?1?13? 10:33
> > To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> > Subject: RE: Issues with JSON based Service and Jettison
> >
> > I actually tried the jax_rs samples a week or two back and it caused quite a
> > few issues with our codebase, as well as generally not working - it would
> > also require re-writes of all services, but even just re-writing one I get
> > exceptions and other issues - there was also some odd behavior, like not
> > being able to pass any data type but a String, for example, as any
> > arguement.
> >
> > Has anyone got a good detailed example of getting JSON to work f

RE: Snapshot JAR file

2008-01-15 Thread Vespa, Anthony J
Thanks for looking into this, I just thought it was me being crazy at
first. =)

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 1:33 PM
To: cxf-user@incubator.apache.org
Subject: Re: Snapshot JAR file


Yep.  Bug in shade plugin.I've just fixed it, but it will require a 
new release of the shade plugin to get it working.   :-(

Dan


On Tuesday 15 January 2008, Daniel Kulp wrote:
> OK.   Looks like a bug in the latest shade plugin.Using unzip, I
> see:
>
>
>  Length   MethodSize  Ratio   Date   Time   CRC-32Name
>   --  --- -         --
>0  Defl:N2   0%  01-13-08 19:17    META-INF
> ...
>
> but for a javadoc jar, I see:
>  Length   MethodSize  Ratio   Date   Time   CRC-32Name
>   --  --- -         --
>0  Stored0   0%  01-13-08 19:18    META-INF/
>
> Looks like the dirs are being stored as files.   Not good.   I'll dig
> into it.
>
> Dan
>
> On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> > Sorry for not including more info, my bad.
> >
> > I'm grabbing the zip version of the nightly 2.1 snapshot and just
> > unpacking the .jar and dropping it into my lib dir.  I noticed this
> > occurred with the last 2 or 3 snapshots of 2.1.
> >
> > -Original Message-
> > From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, January 15, 2008 12:36 PM
> > To: cxf-user@incubator.apache.org
> > Cc: Vespa, Anthony J
> > Subject: Re: Snapshot JAR file
> >
> >
> > Tony,
> >
> > Are you grabbing the jar from a maven dependency (like cxf-bundle)
> > or by
> >
> > downloading the distribution and unpacking it?   Also, 2.1 or 2.0.4?
> > Just wanted to know where to start looking.
> >
> > Dan
> >
> > On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> > > Hello,
> > >
> > > Odd question - I feel like I am missing something obvious.  For
> > > some reason, my IDE (intelliJ 7) won't recognize the snapshot of
> > > the main CXF jar, and I can't use winzip to open it.  I can
> > > extract single files from it.  I think the IDE code analyzer can't
> > > decompress it either - am I missing something obvious?
> > >
> > > Not a huge issue, just a minor nit - things compile fine.
> > >
> > > -Tony



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: Snapshot JAR file

2008-01-15 Thread Vespa, Anthony J
Sorry for not including more info, my bad.

I'm grabbing the zip version of the nightly 2.1 snapshot and just
unpacking the .jar and dropping it into my lib dir.  I noticed this
occurred with the last 2 or 3 snapshots of 2.1.

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 12:36 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Snapshot JAR file


Tony,

Are you grabbing the jar from a maven dependency (like cxf-bundle) or by

downloading the distribution and unpacking it?   Also, 2.1 or 2.0.4?
Just wanted to know where to start looking.

Dan


On Tuesday 15 January 2008, Vespa, Anthony J wrote:
> Hello,
>
> Odd question - I feel like I am missing something obvious.  For some
> reason, my IDE (intelliJ 7) won't recognize the snapshot of the main
> CXF jar, and I can't use winzip to open it.  I can extract single
> files from it.  I think the IDE code analyzer can't decompress it
> either - am I missing something obvious?
>
> Not a huge issue, just a minor nit - things compile fine.
>
> -Tony



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Snapshot JAR file

2008-01-15 Thread Vespa, Anthony J
Hello,

Odd question - I feel like I am missing something obvious.  For some
reason, my IDE (intelliJ 7) won't recognize the snapshot of the main CXF
jar, and I can't use winzip to open it.  I can extract single files from
it.  I think the IDE code analyzer can't decompress it either - am I
missing something obvious?

Not a huge issue, just a minor nit - things compile fine.

-Tony


RE: Issues with JSON based Service and Jettison

2008-01-15 Thread Vespa, Anthony J
I actually hadn't thought about it in that way, Benson.  Generally,
we're looking to build some flexible libraries and services that will be
inter-operable amongst different applications, so we may have to support
calls from other libraries (like YUI, for example) for JSON format.  I'm
just doing some experimenting now, as nothing is written in stone as of
yet.

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 7:18 AM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: RE: Issues with JSON based Service and Jettison


On Tue, 2008-01-15 at 00:32 -0500, Liu, Jervis wrote:
> First of all, you need to set wrapped style to false, wrapped style
true won't work with JSON (I noticed that you already set wrapped to
false). What happened is Jettison reads input stream to a W3C Document,
then this W3C Document is used to create a new XMLInputStream. From this
point on, the following CXF interceptors will presume they are deal with
a normal XML input e.g. the XML section embedded in a soap body.  
> 
> Let's take a concrete example. An inputstream of
"{"acme.Book":{"acme.name":"CXF in Action "}}" is transferred to a
org.w3c.dom.Document of CXF in Action by
Jettison first, then the Document object will be marshaled to a Book
object. The wrapper I am talking about is referring to the operation
name wrapper of doc-lit wrapped style. For example, if you set wrapped
style to true, in order to marshal the Document to Book object
successfully, the Document's content need to be CXF in Action instead. 
> 

Anthony: is the reverse of this what you originally imagined that the
JavaScript support might do?





RE: Issues with JSON based Service and Jettison

2008-01-15 Thread Vespa, Anthony J
Interesting - I'm going to try a few things, mayhap I am missing missing on my 
end.

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 15, 2008 12:32 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison

First of all, you need to set wrapped style to false, wrapped style true won't 
work with JSON (I noticed that you already set wrapped to false). What happened 
is Jettison reads input stream to a W3C Document, then this W3C Document is 
used to create a new XMLInputStream. From this point on, the following CXF 
interceptors will presume they are deal with a normal XML input e.g. the XML 
section embedded in a soap body.  

Let's take a concrete example. An inputstream of 
"{"acme.Book":{"acme.name":"CXF in Action "}}" is transferred to a 
org.w3c.dom.Document of CXF in Action by Jettison 
first, then the Document object will be marshaled to a Book object. The wrapper 
I am talking about is referring to the operation name wrapper of doc-lit 
wrapped style. For example, if you set wrapped style to true, in order to 
marshal the Document to Book object successfully, the Document's content need 
to be CXF in Action instead. 

Cheers,
Jervis

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月14日 21:32
> To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> Hrm, could you explain a bit more please?
> 
> I was under the impression from various examples that JSON would behave
> like REST, eg I pass a request in a URL and the response comes back as a
> JSON output (eg I have a method called getMessage and it takes 3 params)
> so I pass it message/1/2/3/ and the output is in JSON forma- by the request
> wrapper you mean that I would need to pass it one object (say, a hashmap)
> and unwrap that object, as that is how the JSON inbound request is
> represented, correct?  I was under the perhaps mistaken impression that
> JSON was extracting the values from the inbound JSON array and matching
> them with the arguments via Jettison.
> 
> 
> 
> From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> Sent: Sun 1/13/2008 5:00 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
> 
> 
> 
> According to the stack trace, it looks like your service method has more than
> one parameters. The CXF HTTP binding requires that the service method can
> only have one input parameters. For example, following is invalid:
> 
> @Put
> @HttpResource(location = "/books/{id}")
> void updateBook(@WebParam(name = "Book")Book c, int id);
> 
> Hope this helps,
> Jervis
> 
> > -Original Message-
> > From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> > Sent: 2008?1?13? 10:33
> > To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> > Subject: RE: Issues with JSON based Service and Jettison
> >
> > I actually tried the jax_rs samples a week or two back and it caused quite a
> > few issues with our codebase, as well as generally not working - it would
> > also require re-writes of all services, but even just re-writing one I get
> > exceptions and other issues - there was also some odd behavior, like not
> > being able to pass any data type but a String, for example, as any
> > arguement.
> >
> > Has anyone got a good detailed example of getting JSON to work from end
> > to end, with submitting a JSON formatted input into a service, and getting
> > appropriate output, with a configuration through beans.xml?  I can get
> the
> > simple examples to work with some futzing around, but I'm doing to send
> > some complex input back and forth  I've scanned through the mailing list
> > and searched the web, but I haven't found much info - the docs for jettison
> > tend to give the same general example and I need something specific - or
> at
> > least a hard enough push to know if it is a configuration issue, or if I am
> > trying to do something that is either crazy or not supported.
> >
> > 
> >
> > From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> > Sent: Sat 1/12/2008 11:36 AM
> > To: cxf-user@incubator.apache.org
> > Subject: RE: Issues with JSON based Service and Jettison
> >
> >
> >
> > Grab a latest snapshot of CXF, check out the
> > samples\jax_rs\content_negotiation demo. The spring configuration can
> be
> > found in [1]. An example of using JSON to do post can be found in system
> > t

RE: Issues with JSON based Service and Jettison

2008-01-14 Thread Vespa, Anthony J
Hrm, could you explain a bit more please?
 
I was under the impression from various examples that JSON would behave like 
REST, eg I pass a request in a URL and the response comes back as a JSON output 
(eg I have a method called getMessage and it takes 3 params) so I pass it 
message/1/2/3/ and the output is in JSON forma- by the request wrapper you mean 
that I would need to pass it one object (say, a hashmap) and unwrap that 
object, as that is how the JSON inbound request is represented, correct?  I was 
under the perhaps mistaken impression that JSON was extracting the values from 
the inbound JSON array and matching them with the arguments via Jettison.



From: Liu, Jervis [mailto:[EMAIL PROTECTED]
Sent: Sun 1/13/2008 5:00 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison



According to the stack trace, it looks like your service method has more than 
one parameters. The CXF HTTP binding requires that the service method can only 
have one input parameters. For example, following is invalid:

@Put
@HttpResource(location = "/books/{id}")
void updateBook(@WebParam(name = "Book")Book c, int id);

Hope this helps,
Jervis

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008?1?13? 10:33
> To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
>
> I actually tried the jax_rs samples a week or two back and it caused quite a
> few issues with our codebase, as well as generally not working - it would
> also require re-writes of all services, but even just re-writing one I get
> exceptions and other issues - there was also some odd behavior, like not
> being able to pass any data type but a String, for example, as any
> arguement.
>
> Has anyone got a good detailed example of getting JSON to work from end
> to end, with submitting a JSON formatted input into a service, and getting
> appropriate output, with a configuration through beans.xml?  I can get the
> simple examples to work with some futzing around, but I'm doing to send
> some complex input back and forth  I've scanned through the mailing list
> and searched the web, but I haven't found much info - the docs for jettison
> tend to give the same general example and I need something specific - or at
> least a hard enough push to know if it is a configuration issue, or if I am
> trying to do something that is either crazy or not supported.
>
> 
>
> From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> Sent: Sat 1/12/2008 11:36 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
>
>
>
> Grab a latest snapshot of CXF, check out the
> samples\jax_rs\content_negotiation demo. The spring configuration can be
> found in [1]. An example of using JSON to do post can be found in system
> test:
> trunk\systests\src\test\java\org\apache\cxf\systest\jaxrs\JAXRSClientServer
> BookTest.java
>
> [1]. http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html
>
> Cheers,
> Jervis
>
> > -Original Message-
> > From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> > Sent: 2008?1?12? 1:43
> > To: cxf-user@incubator.apache.org
> > Subject: Issues with JSON based Service and Jettison
> >
> > Hello,
> >
> > I cannot seem to get a JSON based servive to work properly.  Does
> anyone
> > have a complete end to end example using the spring config to set up
> > jettison?  Ideally I want to be able to use a post or a get to a service
> > using JSON both on request and response.
> >
> > I am accessing the service via /message/ABC123DEF456/4
> > I am using Jettison and am getting the following exceptions:
> >
> > Jan 11, 2008 12:36:27 PM
> > org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
> > INFO: AttachmentInInterceptor skipped in HTTP GET method
> > Jan 11, 2008 12:36:27 PM
> > org.apache.cxf.binding.http.interceptor.DispatchInterceptor
> > handleMessage
> > INFO: Invoking GET on /message/ABC123DEF456/4
> > Jan 11, 2008 12:36:27 PM
> > org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
> > handleMessage
> > INFO: URIParameterInterceptor handle message on path
> > [/message/ABC123DEF456/4] with content-type [null]
> > Jan 11, 2008 12:36:27 PM org.apache.cxf.phase.PhaseInterceptorChain
> > doIntercept
> > INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: SINGLE_PART_REQUIRED
> > at
> > org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handle
> > Mess

RE: New snapshot, new anyType

2008-01-14 Thread Vespa, Anthony J
Great!  We will give it a try today!
 
-Tony



From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Sun 1/13/2008 9:59 PM
To: Vespa, Anthony J
Cc: cxf-user
Subject: New snapshot, new anyType



Anthony,

I checked in and snapshotted the missing part of the anyType support.

The JavaScript code will now try to turn the XML for an xs:anyType
element into something useful.

If it has a complex type in the schema, it will be unpacked into an
object.

If it is a basic type, it will be converted to the appropriate
JavaScript type.

Only if both of those fail will you find a DOM Node waiting for you.






RE: Issues with JSON based Service and Jettison

2008-01-13 Thread Vespa, Anthony J
Hrm...so how would one implement JSON services with more than one parameter?  
Is it not possible in CXF?



From: Liu, Jervis [mailto:[EMAIL PROTECTED]
Sent: Sun 1/13/2008 5:00 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison



According to the stack trace, it looks like your service method has more than 
one parameters. The CXF HTTP binding requires that the service method can only 
have one input parameters. For example, following is invalid:

@Put
@HttpResource(location = "/books/{id}")
void updateBook(@WebParam(name = "Book")Book c, int id);

Hope this helps,
Jervis

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008?1?13? 10:33
> To: cxf-user@incubator.apache.org; cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
>
> I actually tried the jax_rs samples a week or two back and it caused quite a
> few issues with our codebase, as well as generally not working - it would
> also require re-writes of all services, but even just re-writing one I get
> exceptions and other issues - there was also some odd behavior, like not
> being able to pass any data type but a String, for example, as any
> arguement.
>
> Has anyone got a good detailed example of getting JSON to work from end
> to end, with submitting a JSON formatted input into a service, and getting
> appropriate output, with a configuration through beans.xml?  I can get the
> simple examples to work with some futzing around, but I'm doing to send
> some complex input back and forth  I've scanned through the mailing list
> and searched the web, but I haven't found much info - the docs for jettison
> tend to give the same general example and I need something specific - or at
> least a hard enough push to know if it is a configuration issue, or if I am
> trying to do something that is either crazy or not supported.
>
> 
>
> From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> Sent: Sat 1/12/2008 11:36 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Issues with JSON based Service and Jettison
>
>
>
> Grab a latest snapshot of CXF, check out the
> samples\jax_rs\content_negotiation demo. The spring configuration can be
> found in [1]. An example of using JSON to do post can be found in system
> test:
> trunk\systests\src\test\java\org\apache\cxf\systest\jaxrs\JAXRSClientServer
> BookTest.java
>
> [1]. http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html
>
> Cheers,
> Jervis
>
> > -Original Message-
> > From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> > Sent: 2008?1?12? 1:43
> > To: cxf-user@incubator.apache.org
> > Subject: Issues with JSON based Service and Jettison
> >
> > Hello,
> >
> > I cannot seem to get a JSON based servive to work properly.  Does
> anyone
> > have a complete end to end example using the spring config to set up
> > jettison?  Ideally I want to be able to use a post or a get to a service
> > using JSON both on request and response.
> >
> > I am accessing the service via /message/ABC123DEF456/4
> > I am using Jettison and am getting the following exceptions:
> >
> > Jan 11, 2008 12:36:27 PM
> > org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
> > INFO: AttachmentInInterceptor skipped in HTTP GET method
> > Jan 11, 2008 12:36:27 PM
> > org.apache.cxf.binding.http.interceptor.DispatchInterceptor
> > handleMessage
> > INFO: Invoking GET on /message/ABC123DEF456/4
> > Jan 11, 2008 12:36:27 PM
> > org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
> > handleMessage
> > INFO: URIParameterInterceptor handle message on path
> > [/message/ABC123DEF456/4] with content-type [null]
> > Jan 11, 2008 12:36:27 PM org.apache.cxf.phase.PhaseInterceptorChain
> > doIntercept
> > INFO: Interceptor has thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: SINGLE_PART_REQUIRED
> > at
> > org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handle
> > Message(URIParameterInInterceptor.java:82)
> > at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > hain.java:207)
> > at
> > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
> > onObserver.java:78)
> > at
> > org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
> > tination.java:79)
> > at
> > org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
>

RE: Issues with JSON based Service and Jettison

2008-01-12 Thread Vespa, Anthony J
I actually tried the jax_rs samples a week or two back and it caused quite a 
few issues with our codebase, as well as generally not working - it would also 
require re-writes of all services, but even just re-writing one I get 
exceptions and other issues - there was also some odd behavior, like not being 
able to pass any data type but a String, for example, as any arguement.
 
Has anyone got a good detailed example of getting JSON to work from end to end, 
with submitting a JSON formatted input into a service, and getting appropriate 
output, with a configuration through beans.xml?  I can get the simple examples 
to work with some futzing around, but I'm doing to send some complex input back 
and forth  I've scanned through the mailing list and searched the web, but I 
haven't found much info - the docs for jettison tend to give the same general 
example and I need something specific - or at least a hard enough push to know 
if it is a configuration issue, or if I am trying to do something that is 
either crazy or not supported.



From: Liu, Jervis [mailto:[EMAIL PROTECTED]
Sent: Sat 1/12/2008 11:36 AM
To: cxf-user@incubator.apache.org
Subject: RE: Issues with JSON based Service and Jettison



Grab a latest snapshot of CXF, check out the samples\jax_rs\content_negotiation 
demo. The spring configuration can be found in [1]. An example of using JSON to 
do post can be found in system test: 
trunk\systests\src\test\java\org\apache\cxf\systest\jaxrs\JAXRSClientServerBookTest.java

[1]. http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

Cheers,
Jervis

> -Original Message-----
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2008?1?12? 1:43
> To: cxf-user@incubator.apache.org
> Subject: Issues with JSON based Service and Jettison
>
> Hello,
>
> I cannot seem to get a JSON based servive to work properly.  Does anyone
> have a complete end to end example using the spring config to set up
> jettison?  Ideally I want to be able to use a post or a get to a service
> using JSON both on request and response.
>
> I am accessing the service via /message/ABC123DEF456/4
> I am using Jettison and am getting the following exceptions:
>
> Jan 11, 2008 12:36:27 PM
> org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
> INFO: AttachmentInInterceptor skipped in HTTP GET method
> Jan 11, 2008 12:36:27 PM
> org.apache.cxf.binding.http.interceptor.DispatchInterceptor
> handleMessage
> INFO: Invoking GET on /message/ABC123DEF456/4
> Jan 11, 2008 12:36:27 PM
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
> handleMessage
> INFO: URIParameterInterceptor handle message on path
> [/message/ABC123DEF456/4] with content-type [null]
> Jan 11, 2008 12:36:27 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: SINGLE_PART_REQUIRED
> at
> org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handle
> Message(URIParameterInInterceptor.java:82)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:207)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
> onObserver.java:78)
> at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
> tination.java:79)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
> vletController.java:264)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
> ler.java:123)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
> rvlet.java:170)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFSer
> vlet.java:152)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> lv
> e.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:109)
> at
> org.apache.catalina.connect

Issues with JSON based Service and Jettison

2008-01-11 Thread Vespa, Anthony J
Hello,

I cannot seem to get a JSON based servive to work properly.  Does anyone
have a complete end to end example using the spring config to set up
jettison?  Ideally I want to be able to use a post or a get to a service
using JSON both on request and response.

I am accessing the service via /message/ABC123DEF456/4
I am using Jettison and am getting the following exceptions:

Jan 11, 2008 12:36:27 PM
org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
INFO: AttachmentInInterceptor skipped in HTTP GET method
Jan 11, 2008 12:36:27 PM
org.apache.cxf.binding.http.interceptor.DispatchInterceptor
handleMessage
INFO: Invoking GET on /message/ABC123DEF456/4
Jan 11, 2008 12:36:27 PM
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor
handleMessage
INFO: URIParameterInterceptor handle message on path
[/message/ABC123DEF456/4] with content-type [null]
Jan 11, 2008 12:36:27 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: SINGLE_PART_REQUIRED
at
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handle
Message(URIParameterInInterceptor.java:82)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:207)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:78)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
tination.java:79)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.java:264)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:123)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
rvlet.java:170)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFSer
vlet.java:152)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Jan 11, 2008 12:36:27 PM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.IllegalStateException: Invalid JSON namespace:
http://cxf.apache.org/bindings/xformat
at
org.codehaus.jettison.mapped.MappedNamespaceConvention.getJSONNamespace(
MappedNamespaceConvention.java:148)
at
org.codehaus.jettison.mapped.MappedNamespaceConvention.createKey(MappedN
amespaceConvention.java:155)
at
org.codehaus.jettison.mapped.MappedXMLStreamWriter.writeStartElement(Map
pedXMLStreamWriter.java:220)
at
org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:182)
)


I set up my jettison properties in my beans.xml as such following other
examples on this list:

http://apache.org/cxf/binding/http";>





 



javax.xml.stream.XMLInputFactory



http://BoardService.json.bos.cbs.com/";
value="jBoardService"/>
http://BoardServiceImpl.json.bos.cbs.com/";
value="jBoardServiceImpl"/>





javax.xml.stream.XMLOutputFactory



http://BoardService.json.bos.cbs.com/";
value="jBoardService"/>
http://BoardServiceImpl.json.bos.cbs.com/";
value="jBoardServiceImpl"/>













RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Vespa, Anthony J
Actually, got that to work in my bean declaration so now it appears in
the WSDL.

Is there a list of these types of lists/properties somewhat that can be
used?  I tried browsing the DTD and doing some searching but have found
it is more trial and error.

-Original Message-
From: Vespa, Anthony J 
Sent: Thursday, January 10, 2008 10:22 AM
To: Benson Margulies
Cc: cxf-user
Subject: RE: New 2.1 snapshot with anyType fix

So the aegis.xml looks similar to my beans.xml, so I could do maybe
something like this in the endpoint:








 
com.bos.cbs.data.ws.wsMessageBoard








-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 10:12 AM
To: Vespa, Anthony J
Cc: cxf-user
Subject: RE: New 2.1 snapshot with anyType fix


On Thu, 2008-01-10 at 10:05 -0500, Vespa, Anthony J wrote:
> Out of curiousity, are there examples or docs of the overrideTypeList
> usage?  I did a few web services and looked in the mailing list
archives
> and can't seem to find references to how to use it.

The best place to look right now in CXF is the
file ./rt/javascript/src/test/resources/AegisBeans.xml
 in the source tree. There is probably doc on the old XFire site,
related to exception subclasses.

I've made the process a lot simpler, but I haven't updated doc or that
file yet.




RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Vespa, Anthony J
So the aegis.xml looks similar to my beans.xml, so I could do maybe
something like this in the endpoint:








 
com.bos.cbs.data.ws.wsMessageBoard








-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 10:12 AM
To: Vespa, Anthony J
Cc: cxf-user
Subject: RE: New 2.1 snapshot with anyType fix


On Thu, 2008-01-10 at 10:05 -0500, Vespa, Anthony J wrote:
> Out of curiousity, are there examples or docs of the overrideTypeList
> usage?  I did a few web services and looked in the mailing list
archives
> and can't seem to find references to how to use it.

The best place to look right now in CXF is the
file ./rt/javascript/src/test/resources/AegisBeans.xml
 in the source tree. There is probably doc on the old XFire site,
related to exception subclasses.

I've made the process a lot simpler, but I haven't updated doc or that
file yet.




RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Vespa, Anthony J
I shall give it a spin directly.  Thank you!

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 9:29 AM
To: Vespa, Anthony J; cxf-user
Subject: New 2.1 snapshot with anyType fix

I posted a snapshot which at least should succeed in delivering a DOM
Node for each anyType'ed item.

I will work on using xsi:type to deliver more useful objects but not
today.




RE: JS Generation Progress

2008-01-09 Thread Vespa, Anthony J
Hrm, ok I think I undertand.  For the aegis databinding, do you mean creating 
some sort of aegis.xml for the service to include the type?  I may have fudged 
up an XML annotation as I am not exposing MessageBoard per se, but 
wsMessageBoard .as the anyrype that is held in this case, our wsResponse 
object.  I will look into it in the AM.
 
Thanks!
 



From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Wed 1/9/2008 6:53 PM
To: Vespa, Anthony J
Cc: Claydon, Barnaby; cxf-user
Subject: Re: JS Generation Progress




On Wed, 2008-01-09 at 16:55 -0500, Vespa, Anthony J wrote:
> Hi Benson,
>
> Well it looks like we made quite a bit of progress today.  We can now
> send requests and they go into the services and behave as they are
> supposed to.  Unfortunately, it looks like the responses are coming back
> as null objects.

There's only one xsi:type in your entire response: the one for the
anyType element. It calls out {http://soap.ws.bos.cbs.com/}MessageBoard.

That type isn't in your WSDL. You need to add the class corresponding to
that type into the override type list when creating your
AegisDatabinding so that it is in the WSDL, and then the JavaScript will
know what to do with it.

I should work out some way to make it more obvious when this happens,
like a 'throw' or some sort of tombstone you can see.

I know that at one point I threatened, in this case, to just put the DOM
reference into the structure where you could find it for this sort of
thing, but I apparently repented of that idea.










RE: CXF and JSON

2007-12-21 Thread Vespa, Anthony J
I am playing around with the regular JSON samples but I am getting back some 
weird output - essentially I am getting the values as a big 'block' of text 
with none of the keys present.

Some of the complexity in my app is that I have some XML Types defined in the 
objects I am returning that are in the namespace of my SOAP services.

My config looks like this in beans.xml


http://apache.org/cxf/binding/http";>



 
  
 



-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 20, 2007 10:00 PM
To: cxf-user@incubator.apache.org
Subject: RE: CXF and JSON

I would encourage you to try CXF JSR-311 (JAX-RS) implementation instead. It is 
standard based (CXF HTTP binding is not standard based), and the development 
activities around CXF JSR-311 are much more active. 

CXF JSR-311 (JAX-RS) demo: samples\restful_jaxrs
System test: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/

And they all work! :-)

Docs: http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

Let me know if you run into any problems.

Cheers,
Jervis

> -Original Message-
> From: Willem Jiang [mailto:[EMAIL PROTECTED]
> Sent: 2007年12月21日 7:02
> To: cxf-user@incubator.apache.org
> Subject: Re: CXF and JSON
> 
> Hi ,
> You can find the example in the CXF_KIT/samples/restful_http_binding
> 
> Willem.
> Vespa, Anthony J wrote:
> > I'm considering implementing (or re-implementing) a service from
> > REST/SOAP to JSON.  I'm wondering if someone has a workable example
> (the
> > docs I've found are a bit sparse) in terms of how to configure my
> > beans.xml and how to set up the SEI.
> >
> > Thanks!
> >
> >


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


RE: CXF and JSON

2007-12-21 Thread Vespa, Anthony J
Is it possible to actually use JSON as an input to a service vs forming a URL?  
Is that even possible outside of CXF?

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 20, 2007 10:00 PM
To: cxf-user@incubator.apache.org
Subject: RE: CXF and JSON

I would encourage you to try CXF JSR-311 (JAX-RS) implementation instead. It is 
standard based (CXF HTTP binding is not standard based), and the development 
activities around CXF JSR-311 are much more active. 

CXF JSR-311 (JAX-RS) demo: samples\restful_jaxrs
System test: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/

And they all work! :-)

Docs: http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

Let me know if you run into any problems.

Cheers,
Jervis

> -Original Message-
> From: Willem Jiang [mailto:[EMAIL PROTECTED]
> Sent: 2007年12月21日 7:02
> To: cxf-user@incubator.apache.org
> Subject: Re: CXF and JSON
> 
> Hi ,
> You can find the example in the CXF_KIT/samples/restful_http_binding
> 
> Willem.
> Vespa, Anthony J wrote:
> > I'm considering implementing (or re-implementing) a service from
> > REST/SOAP to JSON.  I'm wondering if someone has a workable example
> (the
> > docs I've found are a bit sparse) in terms of how to configure my
> > beans.xml and how to set up the SEI.
> >
> > Thanks!
> >
> >


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


CXF and JSON

2007-12-20 Thread Vespa, Anthony J
I'm considering implementing (or re-implementing) a service from
REST/SOAP to JSON.  I'm wondering if someone has a workable example (the
docs I've found are a bit sparse) in terms of how to configure my
beans.xml and how to set up the SEI.

Thanks!


RE: CXF adds JavaScript client-side processing

2007-12-19 Thread Vespa, Anthony J
Is it ok if I send it to your personal address off the list?

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 2:10 PM
To: cxf-user@incubator.apache.org
Subject: RE: CXF adds JavaScript client-side processing

I'll enhance the sample in the next couple of days.

I think you are confirming a suspicion of mine, that I need to make the
generator generate a lot more comments.

In general, for each complex type, there will be an object with get/set
methods for the fields.

Can you share a WSDL? In the interests of getting a user, I could give
you some instructions for it.

--benson 


On Wed, 2007-12-19 at 12:31 -0500, Vespa, Anthony J wrote:
> Actually, could we get a more complex example than "HelloWorld"  -
what
> is the correct approach to set values for a method that queries data?

> 
> In our function scheme, we pass a mix of types, including custom
objects
> that have nested strings / ints in them as well.
> 
> Any guidance is appreciated.
> 
> Thx!
> 
> Tony
> -Original Message-
> From: Benson Margulies [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 19, 2007 10:42 AM
> To: cxf-user
> Subject: CXF adds JavaScript client-side processing
> 
> Hello CXF users,
> 
> For the past several months, we've been working to give CXF support
for
> Javascript clients ... in browsers.
> 
> To be more specific: the goal is to generate JavaScript that
> communicates with an ordinary SOAP web service, described by a WSDL
> file, using a plain old SOAP binding. No REST, no special HTTP
> bindings. 
> 
> There are several kits for this purpose out there. They tend, based on
> email traffic seen here, to have problems dealing the XML contents of
> WS-I-compliant messages, particularly in the areas of namespace and
> their prefixes.
> 
> CXF 2.1 will produce JavaScript clients from either wsdl or java. In
the
> simplest form, you can put the following in your HTML:
> 
> 
> 
> and pull in the JavaScript client. You can also run wsdl2js or java2js
> to generate files that you can serve up.
> 
> This functionality is now available in the most recent 2.1 snapshot.
It
> is described, warts and all, at the following URL.
> 
> http://cwiki.apache.org/CXF20DOC/javascript-clients.html
> 
> We (well, I) believe that this is working well enough to that people
> should be able to get some useful work out of it while giving us
> feedback on issues of taste and correctness.
> 
> So, please download the latest snapshot and give this a try.
> 
> 
> 
> 
> 



RE: CXF adds JavaScript client-side processing

2007-12-19 Thread Vespa, Anthony J
Actually, could we get a more complex example than "HelloWorld"  - what
is the correct approach to set values for a method that queries data?  

In our function scheme, we pass a mix of types, including custom objects
that have nested strings / ints in them as well.

Any guidance is appreciated.

Thx!

Tony
-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 10:42 AM
To: cxf-user
Subject: CXF adds JavaScript client-side processing

Hello CXF users,

For the past several months, we've been working to give CXF support for
Javascript clients ... in browsers.

To be more specific: the goal is to generate JavaScript that
communicates with an ordinary SOAP web service, described by a WSDL
file, using a plain old SOAP binding. No REST, no special HTTP
bindings. 

There are several kits for this purpose out there. They tend, based on
email traffic seen here, to have problems dealing the XML contents of
WS-I-compliant messages, particularly in the areas of namespace and
their prefixes.

CXF 2.1 will produce JavaScript clients from either wsdl or java. In the
simplest form, you can put the following in your HTML:



and pull in the JavaScript client. You can also run wsdl2js or java2js
to generate files that you can serve up.

This functionality is now available in the most recent 2.1 snapshot. It
is described, warts and all, at the following URL.

http://cwiki.apache.org/CXF20DOC/javascript-clients.html

We (well, I) believe that this is working well enough to that people
should be able to get some useful work out of it while giving us
feedback on issues of taste and correctness.

So, please download the latest snapshot and give this a try.







RE: CXF adds JavaScript client-side processing

2007-12-19 Thread Vespa, Anthony J
This looks very interesting and we're going to try it out.


-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 10:42 AM
To: cxf-user
Subject: CXF adds JavaScript client-side processing

Hello CXF users,

For the past several months, we've been working to give CXF support for
Javascript clients ... in browsers.

To be more specific: the goal is to generate JavaScript that
communicates with an ordinary SOAP web service, described by a WSDL
file, using a plain old SOAP binding. No REST, no special HTTP
bindings. 

There are several kits for this purpose out there. They tend, based on
email traffic seen here, to have problems dealing the XML contents of
WS-I-compliant messages, particularly in the areas of namespace and
their prefixes.

CXF 2.1 will produce JavaScript clients from either wsdl or java. In the
simplest form, you can put the following in your HTML:



and pull in the JavaScript client. You can also run wsdl2js or java2js
to generate files that you can serve up.

This functionality is now available in the most recent 2.1 snapshot. It
is described, warts and all, at the following URL.

http://cwiki.apache.org/CXF20DOC/javascript-clients.html

We (well, I) believe that this is working well enough to that people
should be able to get some useful work out of it while giving us
feedback on issues of taste and correctness.

So, please download the latest snapshot and give this a try.







RE: Issue with Java first functions and Arguement Sequence

2007-12-19 Thread Vespa, Anthony J
It's called 

JavaScript Soap Client and is located at:

http://www.codeplex.com/JavaScriptSoapClient/Release/ProjectReleases.asp
x?ReleaseId=1775


-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 9:43 AM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Issue with Java first functions and Arguement Sequence


If the other frontend is doing that, it is doing it wrong and is a bug
in 
that frontend.   Is there any way that frontend can be fixed to generate

proper messages that match the wsdl/schema?  What toolkit is it?

I kind of hate putting major hacks in place to workaround very serious 
flaws in other toolkits, but if there isn't any other way

Dan


On Wednesday 19 December 2007, Vespa, Anthony J wrote:
> I'm having an issue and can't quite find an answer to my query in the
> mailing list archives.  I am doing Java first development and using
> AEGIS Binding am having an issue.  I had written to the list before
> about it but am looking for further suggestions.
>
> The front end client is forming the soap message using a hashmap and
> my concern is that there is the chance that parameters will come in a
> different sequence than that specified in my WSDL.   IF this occurs,
> at best I get wrong results, at worst I get a SoapFault and tons of
> exceptions.  I am flumoxed by this and would like to find a workaround
> as I can't always depend on the various front ends to be constructing
> things in the same order.
>
> Is there any way to force 'by name' parameter resolution?
>
> I have several functions; some taking primitives, some taking objects.
> This is a sample of my WSDL.
>
> The segment of my WSDL looks like
>
> 
> 
> 
> 
> 
>  /> 
> 
>
> And SEI is...
>
> @WebResult(name = "getMessagesResult")
> @WebMethod
> public wsResponse getMessages {
> @WebParam(name = "messageBoardId")Long messageBoardId,
> @WebParam(name = "qualifier")String qualifier,
> @WebParam(name = "omitMessageText")Boolean
> omitMessageText);
>
> Thanks very much!
>
> Tony



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Issue with Java first functions and Arguement Sequence

2007-12-19 Thread Vespa, Anthony J
I'm having an issue and can't quite find an answer to my query in the
mailing list archives.  I am doing Java first development and using
AEGIS Binding am having an issue.  I had written to the list before
about it but am looking for further suggestions.

The front end client is forming the soap message using a hashmap and my
concern is that there is the chance that parameters will come in a
different sequence than that specified in my WSDL.   IF this occurs, at
best I get wrong results, at worst I get a SoapFault and tons of
exceptions.  I am flumoxed by this and would like to find a workaround
as I can't always depend on the various front ends to be constructing
things in the same order.  

Is there any way to force 'by name' parameter resolution?

I have several functions; some taking primitives, some taking objects.
This is a sample of my WSDL.

The segment of my WSDL looks like

 


 
 
 



And SEI is...

@WebResult(name = "getMessagesResult")
@WebMethod
public wsResponse getMessages {
@WebParam(name = "messageBoardId")Long messageBoardId,
@WebParam(name = "qualifier")String qualifier,
@WebParam(name = "omitMessageText")Boolean omitMessageText);

Thanks very much!

Tony




RE: suppress namespace?

2007-12-12 Thread Vespa, Anthony J
I would be interested in this as well for Aegis bindings - it does not
make some of the JS libraries out there too happy.

Question - if you have a high traffic site, wouldn't having something in
the interceptor chain that did this on every response have a performance
impact?  Would it be preferable to have it at a differet layer?  It
could be because I'm thinking of interceptors as analogous to servlet
filters and I've seen perf issues with those under load.

Any chance this would get into a build before the end of the year or mid
Jan?

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 11, 2007 5:29 PM
To: cxf-user@incubator.apache.org
Subject: Re: suppress namespace?


I created a JIRA for this:

https://issues.apache.org/jira/browse/CXF-1291

It's a relatively easy thing to write so it's something that someone 
that's interested getting started with digging into CXF interceptors 
could pick up.

Dan


On Wednesday 21 November 2007, mule1 wrote:
> Is it possible to suppress the namespace in the response elements
> using jaxb? I have the similar issue where customer don't want the
> namespace in the response.
>
> dkulp wrote:
> > With Aegis, defintely no right now.  :-(
> >
> > Aegis always generates qualified schemas so all the elements are
> > namespace qualified.
> >
> > Actually, an "interesting" approach could be to add an interceptor
> > immediately after the StaxOutInterceptor that would wrapper the
> > XMLStreamWriter with a writer that would discard all namespace
> > related events.
> >
> > Dan
> >
> > On Monday 12 November 2007, BrianP wrote:
> >> Is there a way to suppress the namespace in the response?  I have
> >> just a simple webservice set up which uses aegis.  For example, my
> >> output is currently this:
> >>
> >> 
> >>   http://services.mycompany.com";>
> >> http://services.mycompany.com";>item
> >> desc  >> xmlns="http://services.mycompany.com";>1
> >>   
> >>   http://services.mycompany.com";>
> >> http://services.mycompany.com";>item desc
> >> 2  >> xmlns="http://services.mycompany.com";>22 
> >> 
> >>
> >> And I want it to be simply this:
> >>
> >> 
> >>   
> >> item desc
> >> 1
> >>   
> >>   
> >> item desc2
> >> 22
> >>   
> >> 
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727C: 508-380-7194
> > [EMAIL PROTECTED]
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: Different Order of Elements in Soap Request Breaks CXF based SOAP service

2007-12-04 Thread Vespa, Anthony J
Hi Dan,

Thank you for the quick response.

This is Java first development.  I'm wondering if the solution further
down the road for us to do some WSDL first; but since I fill in the
webparam as '   @WebParam(name = "messageId")Long messageId)' is there
anything else I could fill in to that annotation to make it a bit more
flexible?

If I were to make the servivce public accessible it seems unacceptable
that people would get sunch an unintuitive meessage - also why would be
done in a list verses a map of key/value pairs representing the
arguments?

Thanks,

Tony

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 04, 2007 5:07 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Different Order of Elements in Soap Request Breaks CXF
based SOAP service


Tony,

Is this a "java first" case or a "wsdl first" case?

For a java first case, this definitely makes sense.  We generate 
the "contract" from the interface and the ordering DOES matter.   Per 
JAX-WS spec, we generate a  from the method parameters and the

sequence dictates that the information MUST come in that specific order.

Thus, if you change the order of the param, you change the contract.

wsdl first might be a bit more forgiving as long as the @WebParam 
annotation for each param is fully filled in.  We take each element in 
the sequence and try and find the right parameter index based on the 
qnames defined from the WebParam annotations.   Thus, you can move 
things around a bit since the wsdl is the contract, not the SEI 
interface.


Dan



On Tuesday 04 December 2007, Vespa, Anthony J wrote:
> I have a service call that takes three parameters - 2 and 3 are the
> same type (Long) - if I switch the order of 2 and 3, I get this error:
>
>
> http://schemas.xmlsoap.org/soap/envelope/";>
>
>   
>  soap:Server
>  Current state not START_ELEMENT
>   
>
> 
>
> Why does this occur?  I have definied the web method to have WebParams
> and if I swap around the params of any functions it breaks.  This
> seems wrong to me.
>
> Please advise,
>
> Tony



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


WSDL not including embedded object

2007-12-04 Thread Vespa, Anthony J
Hello,

I'm having a small issue - I have a service that returns information
about a user.  The user has a one to many relationship with profile
objects.

Basically, the return from the service is a special object I created
that wraps an array of users (so it comes back as anytype) and cast as
myObject which works,  however, since the Profile object is not
defined in the WSDL, I am having some issues with the javascript client
actually returning the profile objects and having them marshalled up.

How would I go about solving this?

Thanks for any help.

Tony


RE: Interceptors pulling values out of requests

2007-11-21 Thread Vespa, Anthony J
This has nudged me along, thanks. =)

The only question I have remaining is, is there a way to get a list at any 
point that actually has the paramter names?  Basically a map.  Ideally I would 
like to be able to, for any present or future function call, to get the named 
paramters so I could drop those directly into the log.

Thanks for your help!

-Tony

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 20, 2007 10:00 PM
To: Vespa, Anthony J; cxf-user@incubator.apache.org
Subject: RE: Interceptors pulling values out of requests

What does your SEI operation look like? Sth like "void getChannel(Session s, 
long channelD)" ? This should work. The List object you get by using "List body 
= msg.getContent(List.class)" contains Session object and the channelD, they 
are ordered, i.e., body.get(0) always return the Session object and body.get(1) 
returns whatever the second parameter of is. 

If it does not work, most likely it is because you did not put your interceptor 
at the right position: when your interceptor is invoked, the List has not been 
populated yet. You may want to have a quick debug to see if your interceptor is 
invoked right before ServiceInvokerInterceptor.

BTW, you get can method name using following code (take a look at 
org.apache.cxf.interceptor. ServiceInvokerInterceptor and 
org.apache.cxf.service.invoker. AbstractInvoker)

public class MyInterceptor extends AbstractPhaseInterceptor {
  public MyInterceptor () {
super(Phase.INVOKE);
addBefore(ServiceInvokerInterceptor.class.getName());  
  }

  public void handleMessage(final Message message) {
final Exchange exchange = message.getExchange();
BindingOperationInfo bop = exchange.get(BindingOperationInfo.class);
MethodDispatcher md = (MethodDispatcher) 
exchange.get(Service.class).get(MethodDispatcher.class.getName());
Method m = md.getMethod(bop);
.
  }

}

Hope this helps,
Jervis


> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2007年11月21日 0:41
> To: cxf-user@incubator.apache.org; Liu, Jervis
> Subject: RE: Interceptors pulling values out of requests
> 
> 
> Thank you for the information.  It isn't quite solving my issue though.
> 
> What I am trying to do is to log the values in my request stream.  My
> request looks like this:
> 
> 
> http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> 
> 
> 
> 123
> ABC123DEF456
> 
> 1
> 
> 
> 
> 
> 
> The inputs are a custom session class I created, and a long
> 
> I want my interceptor to get out
> 
> -The name of the service
> -The name of the method
> -The session as an object
> -The channel id as an object
> 
> I want to be able to do this all in one interceptor, and I do not want to make
> it a high
> Impact operation as it would be done in every call and written to a log.  I
> tried your example and the body comes through as null always.
> 
> I have been doing this:
> 
> List body = msg.getContent(List.class);
> mySession sess = (mySession)body.get(0);
> 
> 
> Which is not ideal.
> 
> I would like to access the input generically - in so much that I want to pull
> named parameters from a variety of different calls (some called channelId,
> some userId, etc) and I am looking to be able to either sniff for these items
> trivially (they are not always in there) if possible.  There will always be a
> mySession type object that has two fields in it, but I don't know if it will
> always be first.
> 
> So, with this in mind, can you provide more guidence.  I am doing this
> currently in the invoke phase.
> 
> Thanks!
> 
> -Tony
> 
> -Original Message-
> From: Liu, Jervis [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 20, 2007 12:36 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Interceptors pulling values out of requests
> 
> I just updated the wiki page [1], hopefully it is more clear now how to write
> and configure user interceptors. Please let me know if there is anything
> missing or still not clear on this page. I am not sure what type of parameters
> you want to access through interceptors, lets presume you want to access
> the java parameter objects that are used to invoke the SEI operations. For
> example, for an operation whose signature is "String sayHi(String input)",
> you may want to access the value of input before sayHi is invoked. In this
> case, basically what you need to do is:
> 
> 1. Write an interceptor according to the instruction [1].
> 
> 2. The java parameter objects are only available after a certain interceptor.
&g

RE: Interceptors pulling values out of requests

2007-11-20 Thread Vespa, Anthony J

Thank you for the information.  It isn't quite solving my issue though.

What I am trying to do is to log the values in my request stream.  My request 
looks like this:


http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>



123
ABC123DEF456

1





The inputs are a custom session class I created, and a long 

I want my interceptor to get out

-The name of the service
-The name of the method
-The session as an object
-The channel id as an object

I want to be able to do this all in one interceptor, and I do not want to make 
it a high
Impact operation as it would be done in every call and written to a log.  I 
tried your example and the body comes through as null always.

I have been doing this:

List body = msg.getContent(List.class);
mySession sess = (mySession)body.get(0);


Which is not ideal.

I would like to access the input generically - in so much that I want to pull 
named parameters from a variety of different calls (some called channelId, some 
userId, etc) and I am looking to be able to either sniff for these items 
trivially (they are not always in there) if possible.  There will always be a 
mySession type object that has two fields in it, but I don't know if it will 
always be first.

So, with this in mind, can you provide more guidence.  I am doing this 
currently in the invoke phase.

Thanks!

-Tony

-Original Message-
From: Liu, Jervis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 20, 2007 12:36 AM
To: cxf-user@incubator.apache.org
Subject: RE: Interceptors pulling values out of requests

I just updated the wiki page [1], hopefully it is more clear now how to write 
and configure user interceptors. Please let me know if there is anything 
missing or still not clear on this page. I am not sure what type of parameters 
you want to access through interceptors, lets presume you want to access the 
java parameter objects that are used to invoke the SEI operations. For example, 
for an operation whose signature is "String sayHi(String input)", you may want 
to access the value of input before sayHi is invoked. In this case, basically 
what you need to do is:

1. Write an interceptor according to the instruction [1]. 

2. The java parameter objects are only available after a certain interceptor. 
To figure out exactly what phase your interceptor need to sit in, you need to 
understand what happens along the interceptor chain. Basically when the request 
comes in, it is available as an InputStream, then a StaxReader is created in 
StaxInInterceptor to read this InputStream. The flow in the interceptor chain 
keeps moving. If the incoming request is a soap message, the soap headers will 
be stripped off by some intercetors, then the soap body. The content of soap 
body will be marshaled into java objects by either JAXB data binding or Aegis 
data binding by data binding interceptors. Finally the 
ServiceInvokerInterceptor is invoked which will in turn dispatch the request to 
"sayHi". 

In your case, I believe adding your interceptor before 
ServiceInvokerInterceptor should do the trick.

3. The java parameter objects can be accessed from Message. Eg:

public class MyInterceptor extends AbstractPhaseInterceptor {   

public MyInterceptor () {
super(Phase.INVOKE);
}

public void handleMessage(final Message message) {
Object invokee = message.getContent(List.class);
if (invokee == null) {
invokee = message.getContent(Object.class);
}
.
}

} 

To understand more about CXF interceptor chain, I would suggest you do a quick 
debugging to see how the message flows along the interceptor chain. 

[1]. http://cwiki.apache.org/confluence/display/CXF20DOC/Interceptors

Cheers,
Jervis

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: 2007年11月20日 3:55
> To: cxf-user@incubator.apache.org
> Subject: Interceptors pulling values out of requests
> 
> Hello,
> 
> I'm writing a webservice with Aegis Bindings and would like to write an
> interceptor to collect certain information - eg I want to look for
> specific values in the incoming XML (the paramter values to the
> functions in the SEI) - though I have followed some of the examples we
> can't quite get at what we need.
> 
> Has anyone tried this before?
> 
> What is the best phase to use to get this info?
> 
> What objects can I grab and traverse to get me what I need?
> 
> Thanks!


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Interceptors pulling values out of requests

2007-11-19 Thread Vespa, Anthony J
Hello,

I'm writing a webservice with Aegis Bindings and would like to write an
interceptor to collect certain information - eg I want to look for
specific values in the incoming XML (the paramter values to the
functions in the SEI) - though I have followed some of the examples we
can't quite get at what we need.

Has anyone tried this before?

What is the best phase to use to get this info?

What objects can I grab and traverse to get me what I need?

Thanks!




RE: Monitoring and NumInvocation Stats

2007-11-16 Thread Vespa, Anthony J
Mayhaps I am missing something.  I did as you suggested but when I call
numInvocations() it still returns zero.  Can you send me a code example?
Perhaps I am missing something obvious.


-Original Message-
From: Willem2 [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 15, 2007 4:21 PM
To: cxf-user@incubator.apache.org
Subject: Re: Monitoring and NumInvocation Stats


O , You just need create a CounterRepository which 
will help you setup whole interceptors for the counter work now.

Here is a configuration for your:

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:im="http://cxf.apache.org/management";
   xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd";>
  







 

        
    

 




Willem.



Vespa, Anthony J wrote:
> 
> Hello,
> 
> As I've been exploring the jmx pieces of CXF I've found this class:
> 
> org.apache.cxf.management.counters.PerformanceCounter
> 
> and if I create an instance of this and use a service name, it lets me
> call a function called getNumInvocations but this number is always
> zero...how does this get incremented?  Do I have to use some sort of
> annotation to get the calls to each service to increment?
> 
> Thanks for any help!
> 
> 

-- 
View this message in context:
http://www.nabble.com/Monitoring-and-NumInvocation-Stats-tf4817095.html#
a13781965
Sent from the cxf-user mailing list archive at Nabble.com.



Monitoring and NumInvocation Stats

2007-11-15 Thread Vespa, Anthony J
Hello,

As I've been exploring the jmx pieces of CXF I've found this class:

org.apache.cxf.management.counters.PerformanceCounter

and if I create an instance of this and use a service name, it lets me
call a function called getNumInvocations but this number is always
zero...how does this get incremented?  Do I have to use some sort of
annotation to get the calls to each service to increment?

Thanks for any help!


RE: Monitoring CXF Webservices

2007-11-14 Thread Vespa, Anthony J
Actually I have one last issue...is it possible to not set this up as a
server implememntation but to access it like the other java MX beans?
Eg can I do something like:

ThreadMXBean tMxBean = ManagementFactory.getThreadMXBean();

tMxBean.getTotalStartedThreadCount();



I'd rather not start up an RMI instance.  When I do, I can't seem to
stop tomcat anymore - it just hangs when I try to shut down.

Any help is appreciated.

-Tony

-Original Message-----
From: Vespa, Anthony J 
Sent: Monday, November 12, 2007 12:28 PM
To: cxf-user@incubator.apache.org
Subject: RE: Monitoring CXF Webservices

Thank you for these examples but I am not 100% on a couple things - do I
need to set up an RMI server as below explicitly?  Also when I try to
convert the command line to a servlet, it doesn't seem to find the
URL...from what you sent it looks like that the ports in both examples
(config and code) should match?
 

-Original Message-
From: Willem Jiang [mailto:[EMAIL PROTECTED]
Sent: Friday, November 09, 2007 10:28 AM
To: cxf-user@incubator.apache.org
Subject: Re: Monitoring CXF Webservices


FYI
You can get the published service name, port name and some performance
metric data from JMX.
Currently there is no sample or doc which talk about it .

You can hack the console code[1] to find some information to write your
own console.
And you can find the configuration which could enable the JMX support on
the server side here[2].

[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/sr
c/main/java/org/apache/cxf/management/utils/ManagementConsole.java
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/sr
c/test/resources/managed-spring.xml

Willem.
Vespa, Anthony J wrote:
> That's generally what I'm looking at, I am wondering if there are
> examples or good patterns of use?
>
> -Original Message-
> From: Adrian C [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 09, 2007 9:17 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Monitoring CXF Webservices
>
>
>
> Could you use MBeans i.e. JMX?
>
>
> Vespa, Anthony J wrote:
>  
>> Hello,
>>
>> I am doing some planning for production deployment of the web
services
>>
> I
>  
>> am developing and am wondering about the best way to implement heart
>> beats / diagnostics for the  services themselves.  Is there a way to
>> trivially enumurate through the services, display basic info (basic
>> config info, name etc) and do some trivial test besides just
returning
>> the whole WSDL or writing an additional function?  Was just wondering
>>
> if
>  
>> there was something baked in.
>>
>> I would envison this as something that would run in the same tomcat
>> instance (like a another servlet) that I would access through an
admin
>> console I write.
>>
>> Thanks for any help!
>>
>> -Tony
>>
>>
>>
>
>  



RE: Monitoring CXF Webservices

2007-11-13 Thread Vespa, Anthony J
Hrm, in the servlet I wrote (basically turned that management class into
a servlet) I just get blank output most of the time - it seems like it
maybe one out of ten times it actually returns the endpoint info.

Any thoughts?

-Original Message-
From: Jiang, Ning (Willem) [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 12, 2007 12:47 PM
To: cxf-user@incubator.apache.org
Subject: RE: Monitoring CXF Webservices


NO , you do not need to start up the RMI Server explicitly.
Oh, the config file's URI is not match with the code
(ManagementConsole.java).
So you need to make sure the jmx server and client's URL are same.

Willem.

-Original Message-----
From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
Sent: Tue 11/13/2007 1:28
To: cxf-user@incubator.apache.org
Subject: RE: Monitoring CXF Webservices
 
Thank you for these examples but I am not 100% on a couple things - do I
need to set up an RMI server as below explicitly?  Also when I try to
convert the command line to a servlet, it doesn't seem to find the
URL...from what you sent it looks like that the ports in both examples
(config and code) should match?
 

-Original Message-
From: Willem Jiang [mailto:[EMAIL PROTECTED]
Sent: Friday, November 09, 2007 10:28 AM
To: cxf-user@incubator.apache.org
Subject: Re: Monitoring CXF Webservices


FYI
You can get the published service name, port name and some performance
metric data from JMX.
Currently there is no sample or doc which talk about it .

You can hack the console code[1] to find some information to write your
own console.
And you can find the configuration which could enable the JMX support on
the server side here[2].

[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/sr
c/main/java/org/apache/cxf/management/utils/ManagementConsole.java
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/sr
c/test/resources/managed-spring.xml

Willem.
Vespa, Anthony J wrote:
> That's generally what I'm looking at, I am wondering if there are
> examples or good patterns of use?
>
> -Original Message-
> From: Adrian C [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 09, 2007 9:17 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Monitoring CXF Webservices
>
>
>
> Could you use MBeans i.e. JMX?
>
>
> Vespa, Anthony J wrote:
>  
>> Hello,
>>
>> I am doing some planning for production deployment of the web
services
>>
> I
>  
>> am developing and am wondering about the best way to implement heart
>> beats / diagnostics for the  services themselves.  Is there a way to
>> trivially enumurate through the services, display basic info (basic
>> config info, name etc) and do some trivial test besides just
returning
>> the whole WSDL or writing an additional function?  Was just wondering
>>
> if
>  
>> there was something baked in.
>>
>> I would envison this as something that would run in the same tomcat
>> instance (like a another servlet) that I would access through an
admin
>> console I write.
>>
>> Thanks for any help!
>>
>> -Tony
>>
>>
>>
>
>  




RE: Monitoring CXF Webservices

2007-11-12 Thread Vespa, Anthony J
Thank you for these examples but I am not 100% on a couple things - do I need 
to set up an RMI server as below explicitly?  Also when I try to convert the 
command line to a servlet, it doesn't seem to find the URL...from what you sent 
it looks like that the ports in both examples (config and code) should match?
 

-Original Message-
From: Willem Jiang [mailto:[EMAIL PROTECTED]
Sent: Friday, November 09, 2007 10:28 AM
To: cxf-user@incubator.apache.org
Subject: Re: Monitoring CXF Webservices


FYI
You can get the published service name, port name and some performance
metric data from JMX.
Currently there is no sample or doc which talk about it .

You can hack the console code[1] to find some information to write your
own console.
And you can find the configuration which could enable the JMX support on
the server side here[2].

[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/src/main/java/org/apache/cxf/management/utils/ManagementConsole.java
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/src/test/resources/managed-spring.xml

Willem.
Vespa, Anthony J wrote:
> That's generally what I'm looking at, I am wondering if there are
> examples or good patterns of use?
>
> -Original Message-
> From: Adrian C [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 09, 2007 9:17 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Monitoring CXF Webservices
>
>
>
> Could you use MBeans i.e. JMX?
>
>
> Vespa, Anthony J wrote:
>  
>> Hello,
>>
>> I am doing some planning for production deployment of the web services
>>
> I
>  
>> am developing and am wondering about the best way to implement heart
>> beats / diagnostics for the  services themselves.  Is there a way to
>> trivially enumurate through the services, display basic info (basic
>> config info, name etc) and do some trivial test besides just returning
>> the whole WSDL or writing an additional function?  Was just wondering
>>
> if
>  
>> there was something baked in.
>>
>> I would envison this as something that would run in the same tomcat
>> instance (like a another servlet) that I would access through an admin
>> console I write.
>>
>> Thanks for any help!
>>
>> -Tony
>>
>>
>>
>
>  



RE: Monitoring CXF Webservices

2007-11-09 Thread Vespa, Anthony J
Thank you for the tips!

-Original Message-
From: Willem Jiang [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 09, 2007 10:28 AM
To: cxf-user@incubator.apache.org
Subject: Re: Monitoring CXF Webservices


FYI
You can get the published service name, port name and some performance 
metric data from JMX.
Currently there is no sample or doc which talk about it .

You can hack the console code[1] to find some information to write your 
own console.
And you can find the configuration which could enable the JMX support on

the server side here[2].

[1]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/sr
c/main/java/org/apache/cxf/management/utils/ManagementConsole.java
[2]https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/management/sr
c/test/resources/managed-spring.xml

Willem.
Vespa, Anthony J wrote:
> That's generally what I'm looking at, I am wondering if there are
> examples or good patterns of use?
>
> -Original Message-
> From: Adrian C [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 09, 2007 9:17 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: Monitoring CXF Webservices
>
>
>
> Could you use MBeans i.e. JMX?
>
>
> Vespa, Anthony J wrote:
>   
>> Hello,
>>
>> I am doing some planning for production deployment of the web
services
>> 
> I
>   
>> am developing and am wondering about the best way to implement heart
>> beats / diagnostics for the  services themselves.  Is there a way to
>> trivially enumurate through the services, display basic info (basic
>> config info, name etc) and do some trivial test besides just
returning
>> the whole WSDL or writing an additional function?  Was just wondering
>> 
> if
>   
>> there was something baked in.
>>
>> I would envison this as something that would run in the same tomcat
>> instance (like a another servlet) that I would access through an
admin
>> console I write.
>>
>> Thanks for any help!
>>
>> -Tony
>>
>>
>> 
>
>   


RE: Monitoring CXF Webservices

2007-11-09 Thread Vespa, Anthony J
That's generally what I'm looking at, I am wondering if there are
examples or good patterns of use?

-Original Message-
From: Adrian C [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 09, 2007 9:17 AM
To: cxf-user@incubator.apache.org
Subject: Re: Monitoring CXF Webservices



Could you use MBeans i.e. JMX?


Vespa, Anthony J wrote:
> 
> Hello,
> 
> I am doing some planning for production deployment of the web services
I
> am developing and am wondering about the best way to implement heart
> beats / diagnostics for the  services themselves.  Is there a way to
> trivially enumurate through the services, display basic info (basic
> config info, name etc) and do some trivial test besides just returning
> the whole WSDL or writing an additional function?  Was just wondering
if
> there was something baked in.
> 
> I would envison this as something that would run in the same tomcat
> instance (like a another servlet) that I would access through an admin
> console I write.
> 
> Thanks for any help!
> 
> -Tony
> 
> 

-- 
View this message in context:
http://www.nabble.com/Monitoring-CXF-Webservices-tf4777853.html#a1366769
9
Sent from the cxf-user mailing list archive at Nabble.com.



Monitoring CXF Webservices

2007-11-09 Thread Vespa, Anthony J
Hello,

I am doing some planning for production deployment of the web services I
am developing and am wondering about the best way to implement heart
beats / diagnostics for the  services themselves.  Is there a way to
trivially enumurate through the services, display basic info (basic
config info, name etc) and do some trivial test besides just returning
the whole WSDL or writing an additional function?  Was just wondering if
there was something baked in.

I would envison this as something that would run in the same tomcat
instance (like a another servlet) that I would access through an admin
console I write.

Thanks for any help!

-Tony


RE: SOAP Namspace change in 2.0.3 - Please Advise

2007-11-08 Thread Vespa, Anthony J
Hrm...interesting.  I'd rather not mess with interceptors at this point.

So is it your expectation that on the client side, it should work either
way (both with using the ns1:blah or just blah) when parsing the
response?  Is that what you mean by the namespace being bound by ns1 and
""?

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 4:50 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: SOAP Namspace change in 2.0.3 - Please Advise


Well, I know which commit caused this.  (mine, revision 587274)

Basically, previously, Aegis would ALWAYS write out a new namespace for 
each part, even if the namepace is already defined in the message.

It was basically because we keyed the writing off whether the prefix in 
the QName is null or not.   However, the prefix in the QName is NEVER 
null.   If you don't specify one, it defaults to an empty string.

Thus, now when it writes out, if the qname prefix is "" and the
namespace 
is already defined in the message with a specific prefix, we use that 
prefix.   

Looking at the code, I don't think there's anyway around that right 
now.  :-(

You MIGHT be able to add an interceptor immediately after the 
WrappedOutInterceptor that sets the default namespace to your namespace.

That might work.  Not really sure though.   The namespace would be bound

to both "ns1" as well as "" so I don't know WHAT it would return if we 
query it later.

Dan



On Thursday 08 November 2007, Vespa, Anthony J wrote:
> Hello,
>
> Playing with the RC for 2.0.3 has fixed some of my issues, but I have
> a new one that has arisen.
>
> The responses come back something like...
>
> http://schemas.xmlsoap.org/soap/envelope/";>
>
>xmlns:ns1="http://soap.ws.test.com/";>
>  
> 
> xmlns:ns2="http://cxf.apache.org/arrays";
> xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";>
>
> ...
>
> Is there any way to prevent having ns1 / ns2 prefixed to each level as
> the name?  This is causing some issue with our front end client code
> and client library (in Ajax) - I'm not sure if this is part of other
> discussions that are on-going.  Ideally I'd just like the document to
> drop the NS prefixes.
>
> Thanks!
>
> -Tony



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: SOAP Namspace change in 2.0.3 - Please Advise

2007-11-08 Thread Vespa, Anthony J
The old behavior was more friendly namespaces - here is an example:


http://schemas.xmlsoap.org/soap/envelope/";>

http://soap.ws.test.com/";>
http://soap.ws.test..com/";>
 

 
http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="wsMessage">
 

 
Evil Empire
 
2
 
Death is not too good for my enemies
 
Evil Overlord
 

 
2007-10-24T16:40:06-04:00
 
2007-10-24T16:40:06-04:00
 
1
 
2
 
...



-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 2:37 PM
To: cxf-user@incubator.apache.org
Subject: RE: SOAP Namspace change in 2.0.3 - Please Advise

Was the old behavior unqualified elements, or more friendly namespace
prefixes? There is a feature since 2.0.2 where you can pass in a map to
Aegis that specifies what prefixes to use, but I'd not clear on when
Aegis does or doesn't go to elementFormDefault='unqualified'.

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 08, 2007 2:29 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: SOAP Namspace change in 2.0.3 - Please Advise
> 
> We're using Aegis databinding, and the front end client is javascript
> using http://www.guru4.net/articoli/javascript-soap-client/en/
> 
> 
> And the binding XML in my beans.xml is...
> 
>class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>   
>
>
>   class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
>   class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration"/>
>   class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
>   
>   
>   
> 
> -Original Message-
> From: Benson Margulies [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 08, 2007 2:17 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: SOAP Namspace change in 2.0.3 - Please Advise
> 
> What front end and data binding.
> 
> > -Original Message-
> > From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, November 08, 2007 1:07 PM
> > To: cxf-user@incubator.apache.org
> > Subject: SOAP Namspace change in 2.0.3 - Please Advise
> >
> > Hello,
> >
> > Playing with the RC for 2.0.3 has fixed some of my issues, but I
have
> a
> > new one that has arisen.
> >
> > The responses come back something like...
> >
> > http://schemas.xmlsoap.org/soap/envelope/";>
> >
> >> xmlns:ns1="http://soap.ws.test.com/";>
> >  
> > 
> > > xmlns:ns2="http://cxf.apache.org/arrays";
> > xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";>
> >
> > ...
> >
> > Is there any way to prevent having ns1 / ns2 prefixed to each level
as
> > the name?  This is causing some issue with our front end client code
> and
> > client library (in Ajax) - I'm not sure if this is part of other
> > discussions that are on-going.  Ideally I'd just like the document
to
> > drop the NS prefixes.
> >
> > Thanks!
> >
> > -Tony


RE: SOAP Namspace change in 2.0.3 - Please Advise

2007-11-08 Thread Vespa, Anthony J
We're using Aegis databinding, and the front end client is javascript
using http://www.guru4.net/articoli/javascript-soap-client/en/


And the binding XML in my beans.xml is...

 
 

 
 
   
   





-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 2:17 PM
To: cxf-user@incubator.apache.org
Subject: RE: SOAP Namspace change in 2.0.3 - Please Advise

What front end and data binding.

> -Original Message-
> From: Vespa, Anthony J [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 08, 2007 1:07 PM
> To: cxf-user@incubator.apache.org
> Subject: SOAP Namspace change in 2.0.3 - Please Advise
> 
> Hello,
> 
> Playing with the RC for 2.0.3 has fixed some of my issues, but I have
a
> new one that has arisen.
> 
> The responses come back something like...
> 
> http://schemas.xmlsoap.org/soap/envelope/";>
>
>xmlns:ns1="http://soap.ws.test.com/";>
>  
> 
> xmlns:ns2="http://cxf.apache.org/arrays";
> xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";>
> 
> ...
> 
> Is there any way to prevent having ns1 / ns2 prefixed to each level as
> the name?  This is causing some issue with our front end client code
and
> client library (in Ajax) - I'm not sure if this is part of other
> discussions that are on-going.  Ideally I'd just like the document to
> drop the NS prefixes.
> 
> Thanks!
> 
> -Tony


SOAP Namspace change in 2.0.3 - Please Advise

2007-11-08 Thread Vespa, Anthony J
Hello,

Playing with the RC for 2.0.3 has fixed some of my issues, but I have a
new one that has arisen.

The responses come back something like...

http://schemas.xmlsoap.org/soap/envelope/";>
   
  http://soap.ws.test.com/";>
 

   http://cxf.apache.org/arrays";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";>

...

Is there any way to prevent having ns1 / ns2 prefixed to each level as
the name?  This is causing some issue with our front end client code and
client library (in Ajax) - I'm not sure if this is part of other
discussions that are on-going.  Ideally I'd just like the document to
drop the NS prefixes.

Thanks!

-Tony


RE: Help! Aegis not mapping Java.Util.Collection properly

2007-11-06 Thread Vespa, Anthony J
I downloaded the current 2.0.3 build and I am still getting this error
in SoapUI 1.7.6 - I took it from this location:

 

http://people.apache.org/~dkulp/stage_cxf/2.0.3-incubator-take1/

 

Please advise.

 

From: Vespa, Anthony J 
Sent: Monday, November 05, 2007 6:19 PM
To: Daniel Kulp; cxf-user@incubator.apache.org
Subject: RE: Help! Aegis not mapping Java.Util.Collection properly

 

Thank you so much!

 

So to clarify a couple things (apologies if this is redundant I just
want to make sure I understand)

 

-Once this issue is fixed, will the any-type resolve to being the actual
types on my collection, or will it still be any type and this just fixes
the breakage in the SoapUI tool?

 

-Will this then be going into 2.0.3, and if so, when will 2.0.3 be fully
released as a finished item?  I didn't see any dates for it in my
inspection of the docs and sites.

 

Thanks again!!

 

-Tony

 



From: Daniel Kulp [mailto:[EMAIL PROTECTED]
Sent: Mon 11/5/2007 4:56 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Help! Aegis not mapping Java.Util.Collection properly

On Monday 05 November 2007, Vespa, Anthony J wrote:
> Okie, so what is the next step?  Do I need to log a bug for this?  I'm
> not really 100% on why the mapping is broken.

I have it fixed.  :-) Running the test suite now.

There were two issues:
1) We were generating the "ArrayOfAnyType" into the
http://www.w3.org/2001/XMLSchema namespace which is really wrong as
thats a standard namespace that we shouldn't be generating anything
into.

2) Because that namespace is a standard one, we don't create an
 element for it.Thus, the SOAPui parser/validator cannot
find it.   Fixing (1) actually fixes this.


Dan



> -T
>
> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 05, 2007 4:32 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
>
> I'm not an aegis expert at all, but I believe the "claim" is that the
> generics work on the Collections, but not on other classes.Thus,
> List will map to int in the schema, but Foo is not
> mapped.Basically, we only look at the generics if its an instance
> of
>
> a collection and at that point, we ONLY look at that collection.   We
> don't going searching up all the declarations to figure out where the
> generics expansion came from.
>
> That said, mapping to the anyType should have worked.  Generating an
> invalid wsdl is definitely a bug.
>
> Dan
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Hello,
> >
> > I am having a problem trying to return a 'complex object' that
> > contains a java.util.collection as one of the properties.  I've
> > written a SOAP service using Aegis binding and I want to pass in a
> > generic return type from the various data accessing functions I have
> > written.  I am getting this error in my SOAPUI:
> >
> > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found.
> >
> > I have defined the class as such:
> >
> > @XmlType(name = "wsResponse", namespace =
> > "http://soap.ws.test.com/";) public class wsResponse  {
> >
> > protected Collection response;
> > protected String sName;
> > protected String sessionId;
> >
> > public wsResponse(Collection os) {
> > this.response = os;
> > }
> >
> > public wsResponse() {
> >
> > }
> >
> > public void setResponse(Collection response) {
> > this.response = response;
> > }
> >
> >public Collection getResponse() {
> >return response;
> > }
> >
> >
> > ... (other setters//getters)
> > }
> >
> > Please help, I have been held up for 2 days!
> >
> > Though there are no real examples out there, the Xfire/CXF docs
> > 'claim' this should be automatic with Java 1.5
> >
> > Thanks!
> >
> > -Tony



--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog



RE: Help! Aegis not mapping Java.Util.Collection properly

2007-11-05 Thread Vespa, Anthony J
Thank you so much!
 
So to clarify a couple things (apologies if this is redundant I just want to 
make sure I understand)
 
-Once this issue is fixed, will the any-type resolve to being the actual types 
on my collection, or will it still be any type and this just fixes the breakage 
in the SoapUI tool?
 
-Will this then be going into 2.0.3, and if so, when will 2.0.3 be fully 
released as a finished item?  I didn't see any dates for it in my inspection of 
the docs and sites.
 
Thanks again!!
 
-Tony



From: Daniel Kulp [mailto:[EMAIL PROTECTED]
Sent: Mon 11/5/2007 4:56 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Help! Aegis not mapping Java.Util.Collection properly



On Monday 05 November 2007, Vespa, Anthony J wrote:
> Okie, so what is the next step?  Do I need to log a bug for this?  I'm
> not really 100% on why the mapping is broken.

I have it fixed.  :-) Running the test suite now.

There were two issues:
1) We were generating the "ArrayOfAnyType" into the
http://www.w3.org/2001/XMLSchema namespace which is really wrong as
thats a standard namespace that we shouldn't be generating anything
into.

2) Because that namespace is a standard one, we don't create an
 element for it.Thus, the SOAPui parser/validator cannot
find it.   Fixing (1) actually fixes this.


Dan



> -T
>
> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 05, 2007 4:32 PM
> To: cxf-user@incubator.apache.org
> Cc: Vespa, Anthony J
> Subject: Re: Help! Aegis not mapping Java.Util.Collection properly
>
>
> I'm not an aegis expert at all, but I believe the "claim" is that the
> generics work on the Collections, but not on other classes.Thus,
> List will map to int in the schema, but Foo is not
> mapped.Basically, we only look at the generics if its an instance
> of
>
> a collection and at that point, we ONLY look at that collection.   We
> don't going searching up all the declarations to figure out where the
> generics expansion came from.
>
> That said, mapping to the anyType should have worked.  Generating an
> invalid wsdl is definitely a bug.
>
> Dan
>
> On Monday 05 November 2007, Vespa, Anthony J wrote:
> > Hello,
> >
> > I am having a problem trying to return a 'complex object' that
> > contains a java.util.collection as one of the properties.  I've
> > written a SOAP service using Aegis binding and I want to pass in a
> > generic return type from the various data accessing functions I have
> > written.  I am getting this error in my SOAPUI:
> >
> > Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> > '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found.
> >
> > I have defined the class as such:
> >
> > @XmlType(name = "wsResponse", namespace =
> > "http://soap.ws.test.com/";) public class wsResponse  {
> >
> > protected Collection response;
> > protected String sName;
> > protected String sessionId;
> >
> > public wsResponse(Collection os) {
> > this.response = os;
> > }
> >
> > public wsResponse() {
> >
> > }
> >
> > public void setResponse(Collection response) {
> > this.response = response;
> > }
> >
> >public Collection getResponse() {
> >return response;
> > }
> >
> >
> > ... (other setters//getters)
> > }
> >
> > Please help, I have been held up for 2 days!
> >
> > Though there are no real examples out there, the Xfire/CXF docs
> > 'claim' this should be automatic with Java 1.5
> >
> > Thanks!
> >
> > -Tony



--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog




RE: Help! Aegis not mapping Java.Util.Collection properly

2007-11-05 Thread Vespa, Anthony J
Okie, so what is the next step?  Do I need to log a bug for this?  I'm
not really 100% on why the mapping is broken.

-T

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 05, 2007 4:32 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Help! Aegis not mapping Java.Util.Collection properly


I'm not an aegis expert at all, but I believe the "claim" is that the 
generics work on the Collections, but not on other classes.Thus, 
List will map to int in the schema, but Foo is not 
mapped.Basically, we only look at the generics if its an instance of

a collection and at that point, we ONLY look at that collection.   We 
don't going searching up all the declarations to figure out where the 
generics expansion came from.   

That said, mapping to the anyType should have worked.  Generating an 
invalid wsdl is definitely a bug.

Dan






On Monday 05 November 2007, Vespa, Anthony J wrote:
> Hello,
>
> I am having a problem trying to return a 'complex object' that
> contains a java.util.collection as one of the properties.  I've
> written a SOAP service using Aegis binding and I want to pass in a
> generic return type from the various data accessing functions I have
> written.  I am getting this error in my SOAPUI:
>
> Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
> '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found.
>
> I have defined the class as such:
>
> @XmlType(name = "wsResponse", namespace = "http://soap.ws.test.com/";)
> public class wsResponse  {
>
> protected Collection response;
> protected String sName;
> protected String sessionId;
>
> public wsResponse(Collection os) {
> this.response = os;
> }
>
> public wsResponse() {
>
> }
>
> public void setResponse(Collection response) {
> this.response = response;
> }
>
>public Collection getResponse() {
>return response;
> }
>
>
> ... (other setters//getters)
> }
>
> Please help, I have been held up for 2 days!
>
> Though there are no real examples out there, the Xfire/CXF docs
> 'claim' this should be automatic with Java 1.5
>
> Thanks!
>
> -Tony



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


RE: 2.0.3 Breaking my services in new and awful ways compared to 2.0.2

2007-11-05 Thread Vespa, Anthony J
The issue is occurring within soap ui 176. As below:

Mon Nov 05 15:57:31 EST 2007:INFO:Loading schema types from
[http://dws2600:/services/sBoardService?wsdl]
Mon Nov 05 15:57:31 EST 2007:INFO:Getting schema
http://dws2600.bos.cbsig.net:/services/sBoardService?wsdl
Mon Nov 05 15:57:31 EST 2007:INFO:schema for
[http://www.w3.org/2001/XMLSchema] contained [{}] namespaces
Mon Nov 05 15:57:31 EST 2007:INFO:schema for [http://soap.ws.test.com/]
contained [{}] namespaces
Mon Nov 05 15:57:31 EST 2007:ERROR:An error occured
[http://dws2600:/services/sBoardService?wsdl:0: error: src-resolve:
type '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found.], see
error log for details
Mon Nov 05 15:57:31 EST 2007:WARN:Error:
http://dws2600:/services/sBoardService?wsdl:0: error: src-resolve:
type '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found.
Mon Nov 05 15:57:31 EST 2007:ERROR:Loading of definition failed for
[http://dws2600:/services/sBoardService?wsdl];
com.eviware.soapui.impl.wsdl.support.xsd.SchemaException: Error loading
schema types
Mon Nov 05 15:57:31 EST 2007:ERROR:An error occured [Error loading
schema types], see error log for details


Now, if I use my front end client I can get some kinda of response back
in XML, but it has replaced my
typed generic collection as anytype, as below.  Basically I have three
objects I want inside my message object - and I'd like 1) for it to work
in SoapUI for testing and 2) I'd like the names to be something more
reasonable, not just anyType

- http://schemas.xmlsoap.org/soap/envelope/";>
- 
- http://soap.ws.bos.test.com/";>
- 
- 
- http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="ns1:wsMessage">
- 
  The Dark Side 
  1 
  Let me tell you a story 
  Darth Vespa 
  
  2007-10-08T12:35:58-04:00 
  1 
  1 
  ... standing outside a bar on a rainy day, when all
of sudden the weirdest thing happened. 
   
  So there we were ... 
  
- http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="ns1:wsMessage">
- 
  Evil Empire 
  2 
  Death is not too good for my enemies 
  Evil Overlord 
  
  2007-10-08T12:35:58-04:00 
  1 
  2 
  I hope this isn't another 10' tall chicken
sighting. 
  1 
  RE: So there we were ... 
  
- http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="ns1:wsMessage">
- 
  Galactic Librarians 
  3 
  I deny your reality 
  Episarch 
  
  2007-10-08T12:35:58-04:00 
  1 
  3 
  Couldn't be stranger than my life. 
  1 
  RE: So there we were ... 
  
- http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="ns1:wsMessage">
- 
  The Dark Side 
  1 
  Let me tell you a story 
  Darth Vespa 
  
  2007-10-08T12:35:58-04:00 
  1 
  5 
  Which reminds me of another time 
  1 
  RE: So there we were ... 
  
- http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="ns1:wsMessage">
- 
  Gargleblasters.com 
  4 
  Oh no, not again! 
  Petunia 
  
  2007-10-08T12:35:58-04:00 
  1 
  6 
  Hello? Anyone out there? 
   
  Is this thing on? 
  
- http://www.w3.org/2001/XMLSchema";
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance";
ns3:type="ns1:wsMessage">
- 
  Galactic Librarians 
  3 
  I deny your reality 
  Episarch 
  
  2007-10-08T12:35:58-04:00 
  1 
  7 
  No 
  6 
  Is this thing on? 
  
  
- 
  http://www.w3.org/2001/XMLSchema-instance";
ns2:nil="true" /> 
  http://www.w3.org/2001/XMLSchema-instance"; ns2:nil="true" /> 
  http://www.w3.org/2001/XMLSchema-instance"; ns2:nil="true" /> 
  success 
  
- 
  http://www.w3.org/2001/XMLSchema-instance";
ns2:nil="true" /> 
  http://www.w3.org/2001/XMLSchema-instance";
ns2:nil="true" /> 
  
  
  
  
  

-----Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 05, 2007 3:54 PM
To: Vespa, Anthony J
Cc: cxf-user@incubator.apache.org
Subject: Re: 2.0.3 Breaking my services in new and awful ways compared
to 2.0.2


You have a stack trace?

Dan


On Monday 05 November 2007, Vespa, Anthony J wrote:
> Dan,
>
> Thanks very much, I thought I had deleted it but I guess not.
>
> Any thoughts on why I might be getting this other schema error when I
> try to make a request to a function that
> Returns a Java object that houses a Java.util.collection that is
> generic - eg defined as Collection c?
>
> src-resolve: type '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema'
> not found.
>
> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Monday, Novembe

RE: 2.0.3 Breaking my services in new and awful ways compared to 2.0.2

2007-11-05 Thread Vespa, Anthony J
Dan,

Thanks very much, I thought I had deleted it but I guess not.

Any thoughts on why I might be getting this other schema error when I
try to make a request to a function that
Returns a Java object that houses a Java.util.collection that is generic
- eg defined as Collection c?

src-resolve: type '[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not
found.

-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 05, 2007 3:47 PM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: 2.0.3 Breaking my services in new and awful ways compared
to 2.0.2



Anthony,

Check the version of XmlSchema jar that is found.   Due to a BUNCH of 
bugs in 1.2, we had to upgrade to 1.3.2.The error you show below 
suggests that 1.2 was picked up on the classpath somehow.

Dan



On Monday 05 November 2007, Vespa, Anthony J wrote:
> Hello,
>
> I'm trying to use last night's 2.0.3 snapshot to see if it resolves an
> issue I'm having with collections, but I am getting a massive
> exception when my app reloads - it's some kinda of no such method
> error.
>
>
>
> Nov 5, 2007 2:58:04 PM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener
> instance of class
> org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'sBoardService': Invocation of init method
> failed; nested exception is java.lang.NoSuchMethodError:
> org.apache.ws.commons.schema.XmlSchemaCollection.getExtReg()Lorg/apach
>e/ ws/commons/schema/extensions/ExtensionRegistry;
> Caused by: java.lang.NoSuchMethodError:
> org.apache.ws.commons.schema.XmlSchemaCollection.getExtReg()Lorg/apach
>e/ ws/commons/schema/extensions/ExtensionRegistry;
> at
> org.apache.cxf.databinding.source.AbstractDataBinding.addSchemaDocumen
>t( AbstractDataBinding.java:72)
> at
> org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(AegisD
>at abinding.java:376)
> at
> org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisData
>bi nding.java:171)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi
>ce FromClass(ReflectionServiceFactoryBean.java:293)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>Se rviceModel(ReflectionServiceFactoryBean.java:333)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref
>le ctionServiceFactoryBean.java:151)
> at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServi
>ce FactoryBean.java:93)
> at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoin
>t( AbstractWSDLBasedEndpointFactory.java:74)
> at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
>a: 108)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryB
>ea n.java:147)
> at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:288)
> at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:228)
> at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
> at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:341)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
>av a:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
>or Impl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac
> tory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:12
>14 )
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanF
>ac tory.createBean(AbstractAutowireCapableBeanFactory.java:427)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObj
>ec t(AbstractBeanFactory.java:251)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry
>.g etSingleton(DefaultSingletonBeanRegistry.java:144)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
>

2.0.3 Breaking my services in new and awful ways compared to 2.0.2

2007-11-05 Thread Vespa, Anthony J
Hello,

I'm trying to use last night's 2.0.3 snapshot to see if it resolves an
issue I'm having with collections, but I am getting a massive exception
when my app reloads - it's some kinda of no such method error.



Nov 5, 2007 2:58:04 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance
of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'sBoardService': Invocation of init method failed; nested
exception is java.lang.NoSuchMethodError:
org.apache.ws.commons.schema.XmlSchemaCollection.getExtReg()Lorg/apache/
ws/commons/schema/extensions/ExtensionRegistry;
Caused by: java.lang.NoSuchMethodError:
org.apache.ws.commons.schema.XmlSchemaCollection.getExtReg()Lorg/apache/
ws/commons/schema/extensions/ExtensionRegistry;
at
org.apache.cxf.databinding.source.AbstractDataBinding.addSchemaDocument(
AbstractDataBinding.java:72)
at
org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(AegisDat
abinding.java:376)
at
org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabi
nding.java:171)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
FromClass(ReflectionServiceFactoryBean.java:293)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionServiceFactoryBean.java:333)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean.java:151)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
FactoryBean.java:93)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
AbstractWSDLBasedEndpointFactory.java:74)
at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
108)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
n.java:147)
at
org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:288)
at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:228)
at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:341)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1214
)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:144)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
InstantiateSingletons(DefaultListableBeanFactory.java:279)
at
org.springframework.context.support.AbstractApplicationContext.refresh(A
bstractApplicationContext.java:360)
at
org.springframework.web.context.ContextLoader.createWebApplicationContex
t(ContextLoader.java:241)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(
ContextLoader.java:184)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized
(ContextLoaderListener.java:49)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3830)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:791)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:

RE: pojo object return type not included in wsdl as complextype

2007-11-05 Thread Vespa, Anthony J
Try using the xmltype annotation in your object, ala:

@XmlType(name = "Balance", namespace = "http://object.package.com/";)

So for example I have my objects in com.package.object - you need to
define it in that namespace


-Original Message-
From: Mark Clarke [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 05, 2007 3:32 PM
To: cxf-user@incubator.apache.org
Subject: pojo object return type not included in wsdl as complextype

Hi there,

I can;t get cfx to place the definition of a pojo into the wsdl as a 
complextyope. On the interface I have tried the following:

==

import .

@WebService
public interface ISimpleBankAccount{

@ResponseWrapper(className="Balance") public Balance doDebit(Double
amount);

@ResponseWrapper(className="Balance")
public Balance doCredit(Double amount);

}






public class Balance(){
java.util.Date date;
Double balance;
Double previousBlanace;

 getter and setters


}



What am I doing wrong?
===
Cyber Connect - More than just broadband
http://www.CyberConnect.co.za - Vodacom 3G R99/month

Cyber Designs - Put your business on the net
http://www.CyberDesigns.co.za

Jumping Bean - Your Java and Linux Experts
http://www.JumpingBean.co.za

Tel: 011-781 80 14
Fax: 011-781 80 15
===
Disclaimer

Any views or opinions presented in this email are solely those of the
author and do not necessarily represent those of the company. Employees
of Cyber Designs are expressly required not to make defamatory
statements and not to infringe or authorize any infringement of
copyright or any other legal right by email communications. Any such
communication is contrary to company policy and outside the scope of the
employment of the individual concerned. The company will not accept any
liability in respect of such communication, and the employee responsible
will be personally liable for any damages or other liability arising.


Help! Aegis not mapping Java.Util.Collection properly

2007-11-05 Thread Vespa, Anthony J
Hello,

I am having a problem trying to return a 'complex object' that contains
a java.util.collection as one of the properties.  I've written a SOAP
service using Aegis binding and I want to pass in a generic return type
from the various data accessing functions I have written.  I am getting
this error in my SOAPUI:

Mon Nov 05 13:17:48 EST 2007:WARN: error: src-resolve: type
'[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema' not found.

I have defined the class as such:

@XmlType(name = "wsResponse", namespace = "http://soap.ws.test.com/";)
public class wsResponse  {

protected Collection response;
protected String sName;
protected String sessionId;

public wsResponse(Collection os) {
this.response = os;
}

public wsResponse() {

}

public void setResponse(Collection response) {
this.response = response;
}

   public Collection getResponse() {
   return response;
}


... (other setters//getters)
}

Please help, I have been held up for 2 days!

Though there are no real examples out there, the Xfire/CXF docs 'claim'
this should be automatic with Java 1.5

Thanks!

-Tony




CXF Hello World Not working

2007-09-21 Thread Vespa, Anthony J
Hello,

So we've been trying just to get the trivial example of helloworld going
for CXF so we can evaluate it.  Instead, we are getting this error in
the catalina log:

SEVERE: Exception sending context initialized event to listener instance
of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'helloWorld': Invocation of init method failed; nested
exception is
org.apache.cxf.service.factory.ServiceConstructionException: Could not
resolve a binding for http://schemas.xmlsoap.org/soap/ Caused by:
org.apache.cxf.service.factory.ServiceConstructionException:
Could not resolve a binding for http://schemas.xmlsoap.org/soap/

What does this mean?  I've followed the example down to the letter.

http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

We are using tomcat 6.0 and Java 1.5.0 on red hat (but it does not work
with java 1.6 either)

We're using CXF 2.0.2 and even the nightly snapshot has the same issue
so I assume it may be a configure problem with tomcat.

Has anyone seen this before?

Any help is appreciated.

Thanks

Tony