choice versus map

2007-08-21 Thread Benson Margulies
We've got an API that associates from a class to an object of the class.
It's not unlike some of the insides of CXF in this regard. It depends on
generics.

 

T getAnnotation(ClassT classOfAnnotation)

 

We're trying to export this as a web service via CXF.

 

Mediocre alternative #1:

 

 Use the @XmlElement annotation that specifies a choice for the XSD,
and simply return a SetObject marked up as a set of the limited set of
possible classes noted in the @XmlElement.

 

This is not so hot, as the caller now has to crawl around in the Set or
List or whatever to find the item of the desired class.

 

We were hoping to cook up a way to express 

 

   MapString, Object, and provide the class names as the keys. We
can't figure out the @XmlElement magic that would support this, if any.
Any JAX-WS experts out there with a clue, or the word that there is no
hope?

 



RE: Marking mandatory parameters with JAX-WS (was Marking optional parameters with JAX-WS)

2007-08-20 Thread Benson Margulies
Is 'required' specified only in WSDL, as opposed to min-occur and
nullable, which are XSD?

 



From: Corey Puffalt [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 20, 2007 11:54 AM
To: Benson Margulies
Cc: cxf-user@incubator.apache.org
Subject: Re: Marking mandatory parameters with JAX-WS (was Marking
optional parameters with JAX-WS)

 

Thanks for your response.  I would still need a way of overriding the
default somehow for the parameters that are optional (nullable.)

Corey

On 8/17/07, Benson Margulies [EMAIL PROTECTED] wrote:

Instead of thinking about 'required', concentrate on min-occurs?

Aegis does this quite nicely.

And if you want to set a general policy of treating zero-cardinality as
evil (which I do, to avoid spurious arrays behind all the strings) you 
can set an option.

I'm sure that there's a spring equivalent for ...

DefaultTypeMappingRegistry tmr = (DefaultTypeMappingRegistry)
binder.getTypeMappingRegistry();
Configuration configuration = tmr.getConfiguration();
configuration.setDefaultMinOccurs(1);
configuration.setDefaultNillable(false);

 -Original Message-
 From: Daniel Kulp [mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
]
 Sent: Friday, August 17, 2007 4:59 PM
 To: Corey Puffalt
 Cc: cxf-user@incubator.apache.org
 Subject: Re: Marking mandatory parameters with JAX-WS (was Marking 
 optional parameters with JAX-WS)


 Honestly, I don't think there's an easy way.   I just grepped through
the
 JAX-WS spec and the JSR181 spec and neither spec mentions anything 
about
 it.   When we move to JAX-WS 2.1, we might be able to add support for
 @XmlElement(required=true). Right now, we don't support any of the
 JAXB annotations on the SEI interface methods.   Some of those are 
 required to be supported in jaxws 2.1.   XmlElement isn't one of
those,
 but could potentially be added.

 The only way to do it right now would be to create wrapper types and

 use the XmlElement annotation there and use the
 @RequestWrapper/@ResponseWrapper annotations to point to those types.
 That should then use those types to generate the schemas and thus the
 JAXB annotations should be honored. 


 Dan


 On Friday 17 August 2007, Corey Puffalt wrote:
  Daniel,
 
  Thanks for your reply.
 
  I should have been more explicit.  I am using the default DOCUMENT 
  style. Furthermore, I got my question completely backwards. :P  The
  real question (given that all non-primitive parameters are marked
  minOccurs=0 as you mention below, how do I mark these parameters 
as
  being mandatory?  (eg. minOccurs=1?)
 
  Corey
 
  On 8/17/07, Daniel Kulp [EMAIL PROTECTED] wrote:
   Corey, 
  
   On Friday 17 August 2007, Corey Puffalt wrote:
I'm doing Java-first development using CXF and JAX-WS
annotations
and I'm trying to figure out how to mark some of my method 
parameters as optional (nillable).  Does anyone know if this is
possible?  It seems like a strange oversight so I'm guessing I'm
just missing something obvious. 
  
   It kind of depends on the form of the service.   I think with the
   defaults (wrapped doc/lit), if the parameter is not a primitive,
it
   ends up with minOccurs=0 on the element so you can send a null. 
  
   For RPC/Lit, the WSI Basic Profile specifically prohibits sending
   null parts with RCP/Lit:
   R2211  An ENVELOPE described with an rpc-literal binding MUST NOT 
   have the xsi:nil attribute with a value of 1 or true on the
part
   accessors.
  
  
   --
   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: Problems consuming rpc literal service

2007-08-17 Thread Benson Margulies
I use soapscope, but it's not free.

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 17, 2007 4:49 PM
 To: cxf-user@incubator.apache.org
 Cc: Daniel Dienhardt
 Subject: Re: Problems consuming rpc literal service
 
 
 Daniel,
 
 On Friday 17 August 2007, Daniel Dienhardt wrote:
  afaik Axis 1.3 is used to produce this service, and I managed to
  consume it with this library. But I will send your reply to the
  provider of this ws. Can you recommend some tool to check the
  compliance of SOAP-Messages?
 
 No idea on that one.I think the WS-I working group created some,
but
 I really don't know.
 
 I did just commit some changes to the RCPInInterceptor to make it
relax a
 little bit on reading and match on the local part instead of the whole
 qname.   That MAY allow it to work for you.   You'd have to grab trunk
 from SVN and build it, but I'll try and get a new snapshot up sometime
 over the weekend.
 
 
 Dan
 
 
 
 
  Daniel
 
  Daniel Kulp schrieb:
   Daniel,
  
   That SOAP message is NOT a valid message for RPC/Literal according
   to the WSI Basic Profile.  Specifically:
  
   R2735  A MESSAGE described with an rpc-literal binding MUST place
   the part accessor elements for parameters and return value in no
   namespace.
  
  
   In the message below, the invokeReturn element is in the
   http://soa.centerra.de/ns/is/kbform/ namespace which is not
correct.
  
  
   Thus, this is a bug in whatever is producing this message.
  
   Dan
  
   On Thursday 16 August 2007, Daniel Dienhardt wrote:
   Hi,
  
   I did a little more research and figured out how the soap respone
   has to be modified , so that the test works, and the object is
   correctly unmarshalled. To me it seems like a Bug inside the
   RPCInInterceptor
  
   This is the response that causes the exception:
  
   soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
soapenv:Body
invokeResponse
xmlns=http://soa.centerra.de/ns/is/kbform/;
invokeReturn
faultCode-101/faultCode
faultString
Error in EDPEditor: Kann Button
nicht
 dr#xFC;cken
bstart(0); nested exception is
  
   de.abas.ceks.jedp.CantChangeFieldValException: Kann
Button nicht dr#xFC;cken
bstart(0)
/faultString
headOutput xsi:nil=true /
tableOutput xsi:nil=true /
/invokeReturn
/invokeResponse
/soapenv:Body
   /soapenv:Envelope
  
   If you modify the response to:
  
   ...
   nsi:invokeResponse
   xmlns:nsi=http://soa.centerra.de/ns/is/kbform/; ...
   nsi:invokeResponse
   ...
  
   The test works fine, and the response is correctly unmarshalled.
  
   Does anyone has a clue, how to fix this, or knows some
workaround?
  
   Daniel Dienhardt schrieb:
   Hi all,
  
   I have a very strange problem consuming a rpc/literal http soap
   service.
  
   With version 2.0-incubator I got some complex object, but it had
   no content. Maybe this is similar to thread
  
  
http://www.nabble.com/WS-client-returning-uninitialized-objects-tf
  41 44602.html#a11788382
  
   Today I tried out 2.0.1-incubator and I got the following
   exception:
  
   snip
   15.08.2007 17:30:53 org.apache.cxf.phase.PhaseInterceptorChain
   doIntercept INFO: Interceptor has thrown exception, unwinding
now
   org.apache.cxf.interceptor.Fault: UNKNOWN_RPC_LIT_PART
   ---snap
  
   I recorded the Response and built a test. (See the Attachemnt)
   maybe someone can help.
  
   if you change the version inside the pom to 2.0-incubator,
you'll
   got no Message but an empty object.
  
   As a workaround I tried to consume this service with axis 1.4 --
   and it worked fine, but I have trouble using axis and cxf
   together. So I really would like to consume this service with
cxf.
  
  
   Thanks in advance for any help
 
 
 
 --
 J. Daniel Kulp
 Principal Engineer
 IONA
 P: 781-902-8727C: 508-380-7194
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog


Classpath or Spring heck, I'm not sure what question I'm even asking here

2007-08-12 Thread Benson Margulies
I'm trying to add a plain old (jaxb?) service to the same app context
where I have a working Aegis service.

I'm trying to exercise the wiring in a Junit test before I try to lauch
an app server.

I don't know if the xfire packages here indicate some classpath mishap
that I've so far failed to explain, or whether there are still some
xfire packages in the snapshot. Obviously, I have a pile of debugging to
do here, so feel free to ignore me while I do some of my own flailing.

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'jaxws-service-factory' defined in class path resource
[META-INF/btsws.xml]: Cannot resolve reference to bean 'aegisBean' while
setting bean property 'dataBinding'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'aegisBean' defined in class path resource
[META-INF/btsws.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[org.apache.cxf.aegis.databinding.AegisDatabinding]: Constructor threw
exception; nested exception is java.lang.ClassCastException:
org.codehaus.xfire.aegis.type.java5.DurationType
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'aegisBean' defined in class path resource
[META-INF/btsws.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class
[org.apache.cxf.aegis.databinding.AegisDatabinding]: Constructor threw
exception; nested exception is java.lang.ClassCastException:
org.codehaus.xfire.aegis.type.java5.DurationType
Caused by: org.springframework.beans.BeanInstantiationException: Could
not instantiate bean class
[org.apache.cxf.aegis.databinding.AegisDatabinding]: Constructor threw
exception; nested exception is java.lang.ClassCastException:
org.codehaus.xfire.aegis.type.java5.DurationType
Caused by: java.lang.ClassCastException:
org.codehaus.xfire.aegis.type.java5.DurationType
at
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.registerIfAvailable
(DefaultTypeMappingRegistry.java:417)
at
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.createDefaultMappin
gs(DefaultTypeMappingRegistry.java:390)
at
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.createDefaultMappin
gs(DefaultTypeMappingRegistry.java:289)
at
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.init(DefaultTypeM
appingRegistry.java:153)
at
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.init(DefaultTypeM
appingRegistry.java:143)
at
org.apache.cxf.aegis.databinding.AegisDatabinding.init(AegisDatabindin
g.java:91)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
ccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
stantiate(SimpleInstantiationStrategy.java:61)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
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.BeanDefinitionValueResolver.re
solveReference(BeanDefinitionValueResolver.java:261)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.re
solveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1073)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.populateBean(AbstractAutowireCapableBeanFactory.java:835)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:423)

RE: Classpath or Spring heck, I'm not sure what question I'm even asking here

2007-08-12 Thread Benson Margulies
Please ignore this. Indeed, I was suffering from a creeping classpath
problem.

 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 12, 2007 12:45 PM
 To: cxf-user@incubator.apache.org
 Subject: Classpath or Spring heck, I'm not sure what question I'm even
 asking here
 
 I'm trying to add a plain old (jaxb?) service to the same app context
 where I have a working Aegis service.
 
 I'm trying to exercise the wiring in a Junit test before I try to
lauch
 an app server.
 
 I don't know if the xfire packages here indicate some classpath mishap
 that I've so far failed to explain, or whether there are still some
 xfire packages in the snapshot. Obviously, I have a pile of debugging
to
 do here, so feel free to ignore me while I do some of my own flailing.
 
 org.springframework.beans.factory.BeanCreationException: Error
creating
 bean with name 'jaxws-service-factory' defined in class path resource
 [META-INF/btsws.xml]: Cannot resolve reference to bean 'aegisBean'
while
 setting bean property 'dataBinding'; nested exception is
 org.springframework.beans.factory.BeanCreationException: Error
creating
 bean with name 'aegisBean' defined in class path resource
 [META-INF/btsws.xml]: Instantiation of bean failed; nested exception
is
 org.springframework.beans.BeanInstantiationException: Could not
 instantiate bean class
 [org.apache.cxf.aegis.databinding.AegisDatabinding]: Constructor threw
 exception; nested exception is java.lang.ClassCastException:
 org.codehaus.xfire.aegis.type.java5.DurationType
 Caused by: org.springframework.beans.factory.BeanCreationException:
 Error creating bean with name 'aegisBean' defined in class path
resource
 [META-INF/btsws.xml]: Instantiation of bean failed; nested exception
is
 org.springframework.beans.BeanInstantiationException: Could not
 instantiate bean class
 [org.apache.cxf.aegis.databinding.AegisDatabinding]: Constructor threw
 exception; nested exception is java.lang.ClassCastException:
 org.codehaus.xfire.aegis.type.java5.DurationType
 Caused by: org.springframework.beans.BeanInstantiationException: Could
 not instantiate bean class
 [org.apache.cxf.aegis.databinding.AegisDatabinding]: Constructor threw
 exception; nested exception is java.lang.ClassCastException:
 org.codehaus.xfire.aegis.type.java5.DurationType
 Caused by: java.lang.ClassCastException:
 org.codehaus.xfire.aegis.type.java5.DurationType
   at

org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.registerIfAvailable
 (DefaultTypeMappingRegistry.java:417)
   at

org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.createDefaultMappin
 gs(DefaultTypeMappingRegistry.java:390)
   at

org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.createDefaultMappin
 gs(DefaultTypeMappingRegistry.java:289)
   at

org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.init(DefaultTypeM
 appingRegistry.java:153)
   at

org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.init(DefaultTypeM
 appingRegistry.java:143)
   at

org.apache.cxf.aegis.databinding.AegisDatabinding.init(AegisDatabindin
 g.java:91)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
   at

sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
 ccessorImpl.java:39)
   at

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
 tructorAccessorImpl.java:27)
   at
 java.lang.reflect.Constructor.newInstance(Constructor.java:494)
   at

org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
   at

org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
 stantiate(SimpleInstantiationStrategy.java:61)
   at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
 tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:732)
   at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
 tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:720)
   at

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
 tory.createBean(AbstractAutowireCapableBeanFactory.java:386)
   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.BeanDefinitionValueResolver.re
 solveReference(BeanDefinitionValueResolver.java:261)
   at

org.springframework.beans.factory.support.BeanDefinitionValueResolver.re
 solveValueIfNecessary(BeanDefinitionValueResolver.java:109

wsdl2java versus ?wsdl URL processing

2007-08-08 Thread Benson Margulies
I've just used wsdl2java in CXF for the first time. My goal here is to
migrate an existing service from a C++ web service toolkit to CXF. While
I'm starting with an existing WSDL, from here I'd like to treat the
generated JAXB/JAX-WS code as normative.

So, I'd like to ensure that the usual ?wsdl URL behaves itself via the
usual mechanism.

Question 1: If I just change the generated @javax.jws.WebService to take
out the wsdl location option, will the default collapse to the standard
?wsdl location?

Question 2: Does CXF has a side-door so that I can put a WSDL file on
classpath and have its contents served up as the response to ?wsdl?
Obviously, if I avail myself of this, I'm continuing to treat the wsdl
as normative, but I'm avoiding having to make my own arrangements to
serve it up.


RE: WHICH_JARS not actual

2007-08-03 Thread Benson Margulies
Um, can't someone automate pulling the classpath out of the manifest
jar? Or, on the other hand, keep the facts about all the dependencies in
some XML file which is XSLT's to make either the manifest or the
human-readable content?

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 03, 2007 9:37 AM
 To: cxf-user@incubator.apache.org
 Cc: Gustavo Morozowski
 Subject: Re: WHICH_JARS not actual
 
 On Friday 03 August 2007 05:30, Gustavo Morozowski wrote:
  Any updates on WHICH_JARS for 2.0.1?
 
 Unforuntately, not nearly changed enough.   I did add mention of the
asm
 jar which was added.   But that's probably about the only change.
:-(
 
 Dan
 
 
  Gustavo
 
  On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote:
   Hi Deno,
  
   That is correct - you can just use the single spring jar.
  
   - Dan
  
   On 7/16/07, Deno Vichas [EMAIL PROTECTED] wrote:
(somebody correctly me if I'm wrong here) you can just all the
main spring jar and not all the smaller individuals ones. Sure,
your project will be slightly bigger but less jars I have to
keep
track of the better.
   
   
-Original Message-
From: Jiang, Ning (Willem) [mailto:[EMAIL PROTECTED]
Sent: Monday, July 16, 2007 7:30 AM
To: cxf-user@incubator.apache.org
Subject: RE: WHICH_JARS not actual
   
Yes ,we should update the WHICH_JARS to refelect the recent
changes.
   
For the second issue, current CXF servlet only support
SpringBusFactory which relates on Spring.
So you have to include the Spring jars for wiring the CXF
components with the Bus.
   
   
Willem.
   
   
-Original Message-
From: Lukas Zapletal [mailto:[EMAIL PROTECTED]
Sent: Mon 7/16/2007 21:54
To: cxf-user@incubator.apache.org
Subject: WHICH_JARS not actual
   
Hello all,
   
it seems WHICH_JARS file is not actual. CXF itself needs
xml-resolver.jar and I am sure there will be other JARs that
should be included in the minimal CXF install.
   
The second issue about the libraries is that CXF depends on
Spring
even when I do not use it. I have created just a Servlet in the
web.xml but when my container tried to load the application I
get
an exception. As a temporary solution I am adding all JARs to my
servlet. Could you check the WHICH_JARS file please?
   
15:37:03,713 ERROR [[CXFServlet]] Allocate exception for servlet
CXFServlet
java.lang.NoClassDefFoundError:
org/springframework/beans/factory/support/BeanDefinitionRegistry
at java.lang.Class.getDeclaredConstructors0(Native
Method)
at
java.lang.Class.privateGetDeclaredConstructors(Unknown
Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
   
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapp
   er.jav a:1104)
at
   
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.
   java:8 06)
at
   
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
   erValv e.java:129)
at
   
org.apache.catalina.core.StandardContextValve.invoke(StandardConte
   xtValv e.java:175)
at
   
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Secu
   rityAs sociationValve.java:179)
at
   
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextV
   alve.j ava:84)
at
   
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
   e.java
   
:128)
   
at
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValv
   e.java
   
:104)
   
at
   
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(Cach
   edConn ectionValve.java:156)
at
   
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
   Valve. java:109)
at
   
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.
   java:2 41)
at
   
org.apache.coyote.http11.Http11Processor.process(Http11Processor.j
   ava:84 4)
at
   
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.pr
   ocess( Http11Protocol.java:580)
at
   
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java
   :447) at java.lang.Thread.run(Unknown Source)
15:37:23,331 INFO  [[CXFServlet]] Servlet CXFServlet is
currently
unavailable
   
--
Lukas Zapletal
http://lukas.zapletalovi.com
  
   --
   Dan Diephouse
   Envoi Solutions
   http://envoisolutions.com | http://netzooid.com/blog
 
 --
 J. Daniel Kulp
 Principal Engineer
 IONA
 P: 781-902-8727C: 508-380-7194
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog


RE: Should schema location URLs be valid?

2007-08-02 Thread Benson Margulies
This seems to be a flaw in the incubator policy model -- on the one
hand, Apache wants to use only 'incubator' names for incubated things,
but on the other hand, url's shouldn't change. I guess you've done the
best to be done in the circumstances.

 -Original Message-
 From: Christopher Moesel [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 02, 2007 8:34 AM
 To: cxf-user@incubator.apache.org
 Subject: RE: Should schema location URLs be valid?
 
 Whoops.  Add the word release to my last statement below. ;)
 
 -Original Message-
 From: Christopher Moesel [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 02, 2007 8:30 AM
 To: cxf-user@incubator.apache.org
 Subject: RE: Should schema location URLs be valid?
 
 It should also be noted that once CXF graduates from the incubator,
this
 will become a valid URL.  This was seen as a better option than having
 an incubator URL now and having to change it in a later.
 
 -Chris
 
 -Original Message-
 From: Willem Jiang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 01, 2007 10:44 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Should schema location URLs be valid?
 
 In CXF we have the spring.schemas file in the jars META-INF.
 
 Its content is
  http\://cxf.apache.org/schemas/jaxws.xsd=schemas/jaxws.xsd
 Maybe you need to do the same mapping thing in the IDE's
configuration.
 
 Willem.
 
 Benson Margulies wrote:
  http://cxf.apache.org/schemas/jaxws.xsd
 
 
 
  This isn't a valid URL. Now, I appreciate that in the spring
universe
  itself this is set up to pull from classpath. But what about someone
  editing a bean file with an ordinary validating XML editor?
 
 
 
 
 
 
 


Sudden disagreement between Spring and CXF in current snapshot

2007-08-01 Thread Benson Margulies
0[main] INFO  org.springframework.web.context.ContextLoader  - Root
WebApplicationContext: initialization started

47   [main] INFO
org.springframework.web.context.support.XmlWebApplicationContext  -
Refreshing
[EMAIL PROTECTED]:
display name [Root WebApplicationContext]; startup date [Wed Aug 01
08:19:52 EDT 2007]; root of context hierarchy

157  [main] INFO
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading
XML bean definitions from ServletContext resource [/WEB-INF/beans.xml]

563  [main] WARN
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver  -
Ignoring namespace handler [org.apache.cxf.bus.spring.NamespaceHandler]:
problem with handler class file or dependent class

java.lang.VerifyError: class
org.apache.cxf.bus.spring.BusDefinitionParser overrides final method _._

 



RE: Sudden disagreement between Spring and CXF in current snapshot

2007-08-01 Thread Benson Margulies
And that version is supposed to be on my classpath, and the error has
evaporated.

Something stinks in my eclipse configuration, and I have to track down
what.


 -Original Message-
 From: Willem Jiang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 01, 2007 9:10 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Sudden disagreement between Spring and CXF in current
 snapshot
 
 Hi Benson,
 
 Can you specify your spring version and CXF version ?
 Currently CXF is developed and tested with spring 2.0.4.
 
 Willem.
 
 Benson Margulies wrote:
  0[main] INFO  org.springframework.web.context.ContextLoader  -
Root
  WebApplicationContext: initialization started
 
  47   [main] INFO
  org.springframework.web.context.support.XmlWebApplicationContext  -
  Refreshing
 
[EMAIL PROTECTED]:
  display name [Root WebApplicationContext]; startup date [Wed Aug 01
  08:19:52 EDT 2007]; root of context hierarchy
 
  157  [main] INFO
  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  -
Loading
  XML bean definitions from ServletContext resource
[/WEB-INF/beans.xml]
 
  563  [main] WARN
 
org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver  -
  Ignoring namespace handler
[org.apache.cxf.bus.spring.NamespaceHandler]:
  problem with handler class file or dependent class
 
  java.lang.VerifyError: class
  org.apache.cxf.bus.spring.BusDefinitionParser overrides final method
_._
 
 
 
 
 


Should schema location URLs be valid?

2007-08-01 Thread Benson Margulies
http://cxf.apache.org/schemas/jaxws.xsd

 

This isn't a valid URL. Now, I appreciate that in the spring universe
itself this is set up to pull from classpath. But what about someone
editing a bean file with an ordinary validating XML editor?

 

 



RE: bean stalks

2007-08-01 Thread Benson Margulies
Willem,

Thanks, Can you tell me, in passing, why jaxws:serviceFactory is a
nested element and not (even optionally) an attribute pointing to a
top-level bean?

I've currently written the following, on the theory that my parser could
insist that a conventionally named service factory would be defined in
an included spring file, and so all I'd have to organize in Java is the
EndpointImpl corresponding to the endpoint decl. I still get this
sinking feeling that I'm capturing a lot of CXF internals into my Java
code, and I should be able to think of a way to tell my users to
interact with a simple XML file without that.

At the end of the day, I want to hand a user a webapp that they can
easily configure to specify (1) the address of the endpoint and (2) a
list of items like x:index pathname='some real pathname'
writable='true'
 descriptionsome verbose description/description
 /x:index

I don't want my users to have to edit into the middle of a minefield of
CXF details that, if disturbed, result in a disaster.

I've already done a spring parser for the x:index thing. I could do one
for my service implementation class in two shakes. It's the
jaxws:endpoint that has me going around in circles.

!-- begin stuff to put in an import file --
bean id='aegis-service-factory'
class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean 
   property name=dataBinding ref=aegisBean/
 property name=serviceConfigurations
 list
   bean
class=org.apache.cxf.jaxws.support.JaxWsServiceConfiguration/
   bean
class=org.apache.cxf.aegis.databinding.AegisServiceConfiguration/
   bean
class=org.apache.cxf.service.factory.DefaultServiceConfiguration/ 
/list
/property
/bean
bean id=aegisBean
class=org.apache.cxf.aegis.databinding.AegisDatabinding/

!-- end stuff for the import file --

!-- begin stuff to produce in a Parser --

jaxws:endpoint
  id=index_service_endpoint
  implementor=#index_service
  address=/NameIndex
   
  jaxws:serviceFactory 
  ref bean='aegis-service-factory'/
  /jaxws:serviceFactory
/jaxws:endpoint
!-- end --

 -Original Message-
 From: Willem Jiang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 01, 2007 9:29 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: bean stalks
 
 Hi Benson,
 
 You can find the jaxws.xsd from this url [1]
 Here is the code [2] which deals with the jaxws:endpoint parsing.
 

[1]http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/frontend/jaxws
/s
 rc/main/resources/schemas/jaxws.xsd

[2]http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/frontend/jaxws
/s
 rc/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java
 
 
 Willem.
 
 Benson Margulies wrote:
  I'd like to build my own spring XML extension that wraps up the
complex
  specification of an Aegis service endpoint.
 
 
 
  Can someone tell me what the fully expanded spring XML would be for
  jaxws:endpoint, or should I just start reading the source?
 
 
 
 
 


RE: ArrayOfAnyType (ping to Dan)

2007-07-30 Thread Benson Margulies
Oops, wrong Dan. Dan D fixed a problem where two methods were returning
two different java types that amounted to a list of the same thing.

 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 30, 2007 3:15 PM
 To: cxf-user@incubator.apache.org
 Cc: Benson Margulies
 Subject: Re: ArrayOfAnyType (ping to Dan)
 
 
 
 Hmm  List of Arrays.   I'm sure I haven't tested that one.
 Interesing.   Definitely likely to be not working.  :-(
 
 Dan
 
 
 On Monday 30 July 2007 14:58, Benson Margulies wrote:
  I think that this is occurring in the same thing I reported
involving
  the array conflict. The use of the 'any' type is resulting in chaos,
  of course.
 
  WSDL shows:
 
  xsd:element name=return type=xsd:ArrayOfAnyType/
 
  From:
 
  @WebMethod
  public abstract ListNameIndexLookupResult[] lookupBatch(String
  indexid,
  @WebParam(targetNamespace=urn:com.basistech.rnm.index
  )NameIndexQuery[] queries)
  throws NameIndexException;
 
  Dan, could you see if this is happening with the test case you've
got
  from me, or whether I need to package you a new one?
 
 --
 J. Daniel Kulp
 Principal Engineer
 IONA
 P: 781-902-8727C: 508-380-7194
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog


RE: Aegis bindings

2007-07-25 Thread Benson Margulies
I submitted a JIRA for this, and I think that Dan fixed it.

 -Original Message-
 From: Dave Kallstrom [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 25, 2007 10:20 AM
 To: cxf-user@incubator.apache.org
 Subject: Re: Aegis bindings
 
 I figured out the problem. Once again stupidity on my part.
 I had one method that took SearchField [] fields and one method that
 returned ListSearchField aegis was trying to create two different
 complex
 types both named ArrayOfSearchField.
 
 On 7/24/07, Dave Kallstrom [EMAIL PROTECTED] wrote:
 
  I have enabled aegis bindings using the following xml configuration
  snippet.
 
  jaxws:endpoint id=CollectiveServices implementor=#serviceBean
  bindingUri= http://apache.org/cxf/binding/http;
  address=/cxf/CollectiveServices 
  jaxws:serviceFactory
  bean class=
  org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean 
  property name=wrapped value=true /
  property name=dataBinding ref=aegisBean/
  /bean
 
  /jaxws:serviceFactory
  /jaxws:endpoint
  bean id=aegisBean class=
  org.apache.cxf.aegis.databinding.AegisDatabinding/
 
  My web service api has an interface named SearchField with three
  implementations. The interface is used in a number of different
ways.
  Sometimes as in incoming list and other times as a returned list.
  I am getting the following exception from the AegisDataBinding
  java.lang.RuntimeException: Schema for namespace 'urn:search.api'
 already
  contains type 'ArrayOfSearchField
  at org.apache.ws.commons.schema.XmlSchema.addType
 (XmlSchema.java:229)
  at
 org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(
  SchemaBuilder.java:139)
  at org.apache.ws.commons.schema.XmlSchemaCollection.read(
  XmlSchemaCollection.java:315)
  at
org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(
  AegisDatabinding.java:291)
  at org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(
  AegisDatabinding.java:162)
  --
 
  Is this a problem with my namespaces? Or is aegis trying to create
two
  different SearchField complex types when it should be only creating
one?
  Dave Kallstrom
 
 
 
 
 --
 Dave Kallstrom


RE: Eclipse STP installation process

2007-07-23 Thread Benson Margulies
My crash happens long before it gets anywhere near actual CXF code. 

 -Original Message-
 From: Johnson Ma [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 23, 2007 12:26 AM
 To: cxf-user@incubator.apache.org
 Subject: Re: Eclipse STP installation process
 
 Hi
 
 The stp europa release doesn't work with latest CXF codebase since we
 changed the osgi buddy policy in stp and cxf plugins.
 
 I just published a new stp snapshot build, you can download from
 http://europa-mirror1.eclipse.org/stp/downloads/drops/I-I200707230251-
 200707230251/
 
 Here is the wiki page describe how to setup stp
 http://wiki.eclipse.org/STP_Service_Creation_getting_started
 (This wiki has been updated today to fix those broken links of
dependency)
 
 Here is a demo one how to create a jax-ws app using stp and cxf.

http://download.eclipse.org/stp/documents/europa/stp_europa_servicecreat
io
 n_jaxws.htm
 
 Please let me know if you have any problem.
 
 Regards
 
 Johnson
 
 
 - Original Message -
 From: gdprao [EMAIL PROTECTED]
 To: cxf-user@incubator.apache.org
 Sent: Monday, July 23, 2007 12:09 AM
 Subject: Eclipse STP installation process
 
 
 
  I have tried installing eclipse STP in Europa.  I see from the
following
  page
  http://europa-mirror1.eclipse.org/stp/downloads/drops/R-0.6.0-
 200706260218/
  that the prerequisites should be installed before installing eclipse
STP.
  Some of links on this page are broken and I could not able to
 successfully
  install all the plugins. I am also confused as to what builds should
I
  pickup for working with CXF.
  It will be highly useful if someone could summarize Eclipse STP
  installation
  and configuration for CXF.
 
  Thanks,
  Durga
  --
  View this message in context:
  http://www.nabble.com/Eclipse-STP-installation-process-
 tf4125577.html#a11732259
  Sent from the cxf-user mailing list archive at Nabble.com.


RE: Eclipse STP installation process

2007-07-23 Thread Benson Margulies
Johnson,

I hate to be a grump, and I'd prefer to help you refine this thing. 

Here's my vision of the local architecture:

1) A large body of POJO code, including some classes that will
eventually travel across web service interfaces. My approach has been to
use Aegis on these classes to supply annotations to avoid introducing
dependencies on JAX-WS annotation classes. These POJOs are scattered
across several ordinary Eclipse java projects, and then built in
production in ant.

2) For each distinct lump of functionality, a web service defined with
JAX-WS annotations on the interface and implementation class. Each lump
has it's own Eclipse project to hold the web service.

3) A single project that pulls all of these together as a spring-wired
web application, delivering a WAR for deployment in a servlet container.

Are you trying to support the likes of me, or does my fondness for Aegis
or any other aspect of this story disqualify me? If not, no hard
feelings. If so, I'll reconstruct an installation of the whole business
and try again to feed you good bugzillas.

--benson


  Hi
 
  The stp europa release doesn't work with latest CXF codebase since
we
  changed the osgi buddy policy in stp and cxf plugins.
 
  I just published a new stp snapshot build, you can download from
 
http://europa-mirror1.eclipse.org/stp/downloads/drops/I-I200707230251-
  200707230251/
 
  Here is the wiki page describe how to setup stp
  http://wiki.eclipse.org/STP_Service_Creation_getting_started
  (This wiki has been updated today to fix those broken links of
 dependency)
 
  Here is a demo one how to create a jax-ws app using stp and cxf.
 

http://download.eclipse.org/stp/documents/europa/stp_europa_servicecreat
 io
  n_jaxws.htm
 
  Please let me know if you have any problem.
 
  Regards
 
  Johnson
 
 
  - Original Message -
  From: gdprao [EMAIL PROTECTED]
  To: cxf-user@incubator.apache.org
  Sent: Monday, July 23, 2007 12:09 AM
  Subject: Eclipse STP installation process
 
 
  
   I have tried installing eclipse STP in Europa.  I see from the
 following
   page
   http://europa-mirror1.eclipse.org/stp/downloads/drops/R-0.6.0-
  200706260218/
   that the prerequisites should be installed before installing
eclipse
 STP.
   Some of links on this page are broken and I could not able to
  successfully
   install all the plugins. I am also confused as to what builds
should
 I
   pickup for working with CXF.
   It will be highly useful if someone could summarize Eclipse STP
   installation
   and configuration for CXF.
  
   Thanks,
   Durga
   --
   View this message in context:
   http://www.nabble.com/Eclipse-STP-installation-process-
  tf4125577.html#a11732259
   Sent from the cxf-user mailing list archive at Nabble.com.


RE: Eclipse STP installation process

2007-07-22 Thread Benson Margulies
I think, but I don't know for sure, that this thing is build upon the
WST package in Europa. I've tried to use that to set up a simple web app
containing CXF services. The WST plugins are spectacularly unstable, and
poorly designed, to boot. More or less the slightest misstep, and they
corrupt their .settings file and go on permanent strike.

If I've misread the page you pointed to, and this thing purports to be
useful without having to deal with WST, then it might be worth trying
out.

 -Original Message-
 From: gdprao [mailto:[EMAIL PROTECTED]
 Sent: Sunday, July 22, 2007 12:10 PM
 To: cxf-user@incubator.apache.org
 Subject: Eclipse STP installation process
 
 
 I have tried installing eclipse STP in Europa.  I see from the
following
 page
 http://europa-mirror1.eclipse.org/stp/downloads/drops/R-0.6.0-
 200706260218/
 that the prerequisites should be installed before installing eclipse
STP.
 Some of links on this page are broken and I could not able to
successfully
 install all the plugins. I am also confused as to what builds should I
 pickup for working with CXF.
 It will be highly useful if someone could summarize Eclipse STP
 installation
 and configuration for CXF.
 
 Thanks,
 Durga
 --
 View this message in context: http://www.nabble.com/Eclipse-STP-
 installation-process-tf4125577.html#a11732259
 Sent from the cxf-user mailing list archive at Nabble.com.



RE: Eclipse STP installation process

2007-07-22 Thread Benson Margulies
Here's how I installed it.

1) I installed Europa from the release download page.
2) I added GMF and STP to my update sites. The GMF page gives the link
to the update site in the place where it claims to have a link to
instructions for the update site.
3) I installed the STP tools and the alarmingly enormous set of
dependencies.
4) I tried to enable JAX-WS on an existing project, in spite of broken
links in the eclipse online help and inaccurate menu references.
5) It crashed with an NPE.
6) I submitted bug reports.
7) I posted a complaint to the eclipse foundation newsgroup about the
reliable unreliability of these addons, which I'm sure will have a lot
of effect.


I didn't try to create a fresh, new, JAX-WS project from scratch.

 -Original Message-
 From: gdprao [mailto:[EMAIL PROTECTED]
 Sent: Sunday, July 22, 2007 7:37 PM
 To: cxf-user@incubator.apache.org
 Subject: RE: Eclipse STP installation process
 
 
 The STP plugin flash demo

http://download.eclipse.org/stp/documents/europa/stp_europa_servicecreat
io
 n_jaxws.htm
 is pretty impressive. But I could not able to install plugin because
of
 the
 broken links.  I have also tried installing it thourgh Europa
discovery
 site
 from Eclipse Software updates but all the features are not working.
 
 
 
 bmargulies wrote:
 
  I just gave this a try. I installed the enormous raft of plugins to
get
  the SOA/STP features installed.
 
  1) The internal documentation has broken links.
  2) It crashed with an NPE when I tried to enable it on my existing
  project that contains a CXF service.
 
  So I, for what it's worth, don't recommend bothering with it.
 
  -Original Message-
  From: Benson Margulies [mailto:[EMAIL PROTECTED]
  Sent: Sunday, July 22, 2007 5:37 PM
  To: cxf-user@incubator.apache.org
  Subject: RE: Eclipse STP installation process
 
  I think, but I don't know for sure, that this thing is build upon
the
  WST package in Europa. I've tried to use that to set up a simple
web
  app
  containing CXF services. The WST plugins are spectacularly
unstable,
  and
  poorly designed, to boot. More or less the slightest misstep, and
they
  corrupt their .settings file and go on permanent strike.
 
  If I've misread the page you pointed to, and this thing purports to
be
  useful without having to deal with WST, then it might be worth
trying
  out.
 
   -Original Message-
   From: gdprao [mailto:[EMAIL PROTECTED]
   Sent: Sunday, July 22, 2007 12:10 PM
   To: cxf-user@incubator.apache.org
   Subject: Eclipse STP installation process
  
  
   I have tried installing eclipse STP in Europa.  I see from the
  following
   page
   http://europa-mirror1.eclipse.org/stp/downloads/drops/R-0.6.0-
   200706260218/
   that the prerequisites should be installed before installing
eclipse
  STP.
   Some of links on this page are broken and I could not able to
  successfully
   install all the plugins. I am also confused as to what builds
should
  I
   pickup for working with CXF.
   It will be highly useful if someone could summarize Eclipse STP
   installation
   and configuration for CXF.
  
   Thanks,
   Durga
   --
   View this message in context: http://www.nabble.com/Eclipse-STP-
   installation-process-tf4125577.html#a11732259
   Sent from the cxf-user mailing list archive at Nabble.com.
 
 
 
 
 --
 View this message in context: http://www.nabble.com/Eclipse-STP-
 installation-process-tf4125577.html#a11735934
 Sent from the cxf-user mailing list archive at Nabble.com.



tomcat deployment issues

2007-07-21 Thread Benson Margulies
I found a bt-spring.log file in my tomcat directory. I don't know what
picked the name bt-spring: it's not a string that occurs anywhere in my
bean definitions. The ClassCastException looks pretty mysterious to me. 


0[main] INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/spring_w
eb_services]  - Marking servlet CXFServlet as unavailable
0[main] ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/spring_w
eb_services]  - Servlet /spring_web_services threw load() exception
java.lang.ClassCastException:
org.apache.cxf.transport.servlet.CXFServlet
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
a:1089)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3956)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4230
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:760)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:
626)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java
:553)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
1)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:120)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)


RE: tomcat deployment issues

2007-07-21 Thread Benson Margulies
Please ignore this and previous versions thereof. I've just discovered
the cause of this, which is the lack of modern tomcat support in the
so-called tomcat plugin for Eclipse. I wish that wst didn't crash so
that I could use it.

 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Saturday, July 21, 2007 4:02 PM
 To: cxf-user@incubator.apache.org
 Subject: tomcat deployment issues
 
 I found a bt-spring.log file in my tomcat directory. I don't know what
 picked the name bt-spring: it's not a string that occurs anywhere in
my
 bean definitions. The ClassCastException looks pretty mysterious to
me.
 
 
 0[main] INFO

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/spring_w
 eb_services]  - Marking servlet CXFServlet as unavailable
 0[main] ERROR

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/spring_w
 eb_services]  - Servlet /spring_web_services threw load() exception
 java.lang.ClassCastException:
 org.apache.cxf.transport.servlet.CXFServlet
   at

org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav
 a:1089)
   at

org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
   at

org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
 ava:3956)
   at

org.apache.catalina.core.StandardContext.start(StandardContext.java:4230
 )
   at

org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
 va:760)
   at

org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at

org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:
 626)
   at

org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java
 :553)
   at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
   at
 org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at

org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
 1)
   at

org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
 pport.java:120)
   at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at
 org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at

org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)


RE: Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.

2007-07-20 Thread Benson Margulies
My experience is that commenting on the Wiki pages is like a quantum
process. Willem fixes them more or less instantly.

 -Original Message-
 From: Freeman Fang [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 19, 2007 10:55 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Back to a really basic question: using CXF+Spring to
deploy a
 JAX-WS+Aegis service behind a servlet container.
 
 Hi Benson,
 FYI,  I just know Willem update this wiki page today. So what I see
may
 not same as you saw.
 
 Best Regards
 Freeman
 
 Freeman Fang wrote:
  Hi Benson,
 
  I think you should follow spring_http sample.
  The doc from wiki might out of date, but the working demo is more
  believable. :-)
 
  Btw, I roughly check this wiki page and spring_http sample, they are
  pretty much match with each other. Would you please mark what kind
of
  macros defined in the sample is not match the wiki, so that we can
  update the wiki.
  Best Regards
 
  Freeman
 
  Benson Margulies wrote:
  Before I started discovering various issues in the migration from
xfire
  to cxf, my original goal was to wrap up a service of mine for
 deployment
  in a servlet container. The code of my service is set up to use
Spring
  to wire together various of its bits and pieces.
 
 
 
  I'm looking at the macros defined in the samples, and I see one or
two
  things that give me a pause. They don't look that much like
 
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html.
  Should I just follow the wiki and ignore the samples?
 
 
 
 
 
 


context-params, spring, CXF

2007-07-20 Thread Benson Margulies
The following isn't exactly a cxf issue. It's more of a generic problem
with servlets that I've run into many times. However, I wonder if people
in CXF-land have had some relevant experience.

Consider a software module that is implemented as a CXF service. Its
job, let us say, is to publish a large raft of data from some
database-like location over a service. The author wishes to distribute
the module in the form of a WAR file, and be able to tell the recipient:
Just drop the war file into the container, \set some parameters to tell
us where you've configured the database,/ and start it up.

The trouble comes in my typewriter italics. How to tell the recipient to
set some parameters? Note that in my particular case the data source is
not, in fact, an actual JDBC datasource, so the 'j2ee light' resource
pools for JDBC and Java Mail often seen in servlet containers aren't any
help.

I can think of a few options:

1) Tell them to drop the web application unpacked, and tell them to edit
web.xml to set one or more context-param elements. In the spring wiring,
use ServletContextPropertyPlaceholderConfigurer to pull those values
into the beans.

2) Let them leave the WAR file packed, but tell them how to use
container-specific configuration to set these parameters at the
container level. I know how to do this for Tomcat, I have no information
on the difficulty level of Jetty or anything else.

3) Have the application start up without the data, and supply an admin
web UI that can accept these parameters and store them ... where?

4) Get involved in JNDI. This presumably requires a custom spring
property editor (or just passing JNDI refs into the beans and letting
them talk to the JNDI API). That's a painful pile of mechanism to set a
simple parameter.

5) Give them a program that they run to push the configuration into the
WAR file by pushing a property file into the classpath.

 Have any of you gentle readers been down this path?

--benson



RE: Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.

2007-07-20 Thread Benson Margulies
I see that the Wiki and the spring_http samples are perfectly aligned.

My confusion resulted from looking at hello_world, which is another
thing altogether. What's going on in there?

The hello sample carefully deploys a prebuilt, static, WSDL file. Why
not just let the service handle the ?wsdl URL, as usual?

The cxf.xml for hello_world uses complex {} namespaces. The wiki
doesn't. It has a SOAPService bean. ?


Off to a poor start with tomcat + spring + cxf + sysdeo?

2007-07-20 Thread Benson Margulies
I've probably no one else to blame but myself for the fact that my first
experiment involves running under tomcat with the sysdeo tomcat plugin
instead of with a plain vanilla config. I get the following back, and no
log traffic at all. Startup is uneventful from a logging standpoint, as
well.


HTTP Status 404 - Servlet CXFServlet is not available




type Status report

message Servlet CXFServlet is not available

description The requested resource (Servlet CXFServlet is not available)
is not available.




Apache Tomcat/5.5.23


 



RE: Contribution of wsdl2js tool

2007-07-19 Thread Benson Margulies
OK, time to join the dev list. Will do.

 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 19, 2007 11:29 AM
 To: cxf-user@incubator.apache.org
 Subject: Re: Contribution of wsdl2js tool
 
 Hi Benson,
 
 Such contributions are definitely welcome!
 
 I believe there are a few major things that need to happen. You would
need
 to package the code under an ASL license and send along Corporate CLA
[1].
 The CXF community would also need to vote on the contribution and
possible
 committers. There may also be some incubator related things we need to
do.
 I'll do some digging and will report back with more info.
 
 Also, it might be good to redirect this discussion to the dev list.
 
 Cheers,
 - Dan
 
 1. http://www.apache.org/licenses/#clas
 
 On 7/19/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  Dear CXF team,
 
 
 
  Basis Technology would like to contribute our wsdl2js tool to CXF
under
  the usual ASF license.
 
 
 
  The tool consists of Java source code that uses the same WSDL
library
  that CXF already uses and generates Javascript code that targets
some
  JavaScript utility functions that work in Firefox and IE (and
probably
  others).
 
 
 
  What is the mechanics of this process? I could tar up the whole
business
  and append it to a JIRA. You could consider accepting me as a
committer.
  You could ask me to post it for review some other way.
 
 
 
  --benson
 
 
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.

2007-07-19 Thread Benson Margulies
Before I started discovering various issues in the migration from xfire
to cxf, my original goal was to wrap up a service of mine for deployment
in a servlet container. The code of my service is set up to use Spring
to wire together various of its bits and pieces.

 

I'm looking at the macros defined in the samples, and I see one or two
things that give me a pause. They don't look that much like
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html.
Should I just follow the wiki and ignore the samples?

 



RE: java2wsdl rejects class that is acceptable to the aegis universe

2007-07-18 Thread Benson Margulies
I will make a JIRA. The problem is a bean property on a public data
member. That is I have a class that is used as a parameter on the SEI
and it includes,

...
public int scheme;
public int getScheme() { return scheme; }
public void setScheme(int x) { scheme = x; }

Is this really two properties? 

Aegis ignores the public field. Is Aegis right, wrong, or just
different?

It's just as well that this fails, since the WSDL I'd get would be quite
different from what Aegis normally comes up with for me. 

For some reason I expect to be doc/literal with the following SEI
annotations:

@WebService(name=NameIndex,
targetNamespace=urn:com.basistech.rnm.index.ws)
public interface NameIndexService

@WebService(serviceName = NameIndex, endpointInterface =
com.basistech.rnm.index.ws.NameIndexService,
targetNamespace=urn:com.basistech.rnm.index.ws)
public class NameIndexServiceImpl extends NameIndexServiceCommon
implements NameIndexService {

 -Original Message-
 From: Freeman Fang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 11:35 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: java2wsdl rejects class that is acceptable to the aegis
 universe
 
 Hi Benson,
 Would you please append your java class?
 
  From the exception, it seems your class method are bare mode so that
 java2wsdl load jaxb to process your method parameter type class, but
 unfortunately, this type class has two properties with same name,
which
 is illegal for jaxb.
 As you said, it is acceptable to the aegis, but tool now only work
with
 jaxb.
 To solve this problem, tool should work with specified databinding
 (jaxb, aegis), would you please add this feature request on jira?
 
 Best Regards
 
 Freeman
 
 Benson Margulies wrote:
  Is there something special I have to do to run java2wsdl for an
aegis
  environment? As it is, I get a very mysterious rejection letter
until I
  ask for -verbose, and then I get the following...
 
  org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
   [java] INFO: Could not find the configuration file cxf.xml on
the
  classpath.
   [java] Jul 17, 2007 10:27:45 PM
  org.apache.cxf.service.factory.ReflectionServiceFactoryBean
  buildServiceFromC
  lass
   [java] INFO: Creating Service
  {urn:com.basistech.rnm.index.ws}NameIndex from class
  com.basistech.rnm.index.ws
  .impl.NameIndexServiceImpl
   [java] Error :
  org.apache.cxf.service.factory.ServiceConstructionException
   [java]
   [java] java.lang.RuntimeException:
  org.apache.cxf.service.factory.ServiceConstructionException
   [java] at
 
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
  viceFactory.java:31)
   [java] at
 
org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaToP
  rocessor.java:87)
   [java] at
 
org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLCon
  tainer.java:59)
   [java] at
 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  84)
   [java] at
 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  52)
   [java] at
 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  39)
   [java] at
  org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
   [java] at
  org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
   [java] Caused by:
  org.apache.cxf.service.factory.ServiceConstructionException
   [java] at
 
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:269)
   [java] at
 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
  FromClass(ReflectionSer
  viceFactoryBean.java:220)
   [java] at
 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
  rviceModel(ReflectionSe
  rviceFactoryBean.java:248)
   [java] at
 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
  ctionServiceFactoryBean
  .java:136)
   [java] at
 
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractE
  ndpointFactory.java:83)
   [java] at
 
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
  viceFactory.java:29)
   [java] ... 7 more
   [java] Caused by:
  com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of
  IllegalAnnotationExcep
  tions
   [java] Class has two properties of the same name scheme
   [java] this problem is related to the following location:
   [java] at public int
  com.basistech.rnm.Transliteration.getScheme()
   [java] at com.basistech.rnm.Transliteration
   [java] at public
com.basistech.rnm.Transliteration[]
  com.basistech.rnm.Name.getTransliterations()
   [java] at com.basistech.rnm.Name
   [java] at public com.basistech.rnm.Name[]
  com.basistech.rnm.Entity.getNames

RE: java2wsdl rejects class that is acceptable to the aegis universe

2007-07-18 Thread Benson Margulies
CXF-807 reports the lack of Aegis support.
 
CXF-806 whines about the brevity of the diagnosis of this class of mine
that violates JAXB.



RE: Using Local Transport for JUnit Tests

2007-07-18 Thread Benson Margulies
I recommend stealing code from AbstractAegisTest. Since I use Aegis, I
can just use that class.

 -Original Message-
 From: Liu, Jervis [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 10:40 PM
 To: cxf-user@incubator.apache.org
 Subject: RE: Using Local Transport for JUnit Tests
 
 Hi Chris, to use local transport, you need to manually register
 LocalTransportFactory with all the namespaces that might be used, for
 example, http://schemas.xmlsoap.org/soap/http;. An example of how
this is
 done can be found from

\trunk\rt\frontend\jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxW
sT
 est.java. Actually almost all unit tests under jaxws module are
written
 with local transport, so just grab one CXF unit test then copypaste,
 should work.
 
 Cheers,
 Jervis
 
 -Original Message-
 From: Christopher Moesel [mailto:[EMAIL PROTECTED]
 Sent: 2007?7?18? 2:04
 To: cxf-user@incubator.apache.org
 Subject: Using Local Transport for JUnit Tests
 
 
 Hello All,
 
 I'm trying to write some JUnit tests that can test my SOAP web
services
 using the local transport
 (http://cwiki.apache.org/CXF20DOC/local-transport.html).
 
 Normally I run my services using the CXF Servlet, so doing it
 servlet-less is somewhat new to me.  Here is what I'm doing:
 
 Using a Spring ClassPathXmlApplicationContext to load up the following
 CXF spring configs:
 - META-INF/cxf/cxf.xml
 - META-INF/cxf/cxf-extension-soap.xml
 - META-INF/cxf/cxf-extension-policy.xml
 
 and also loading up my own spring configs that contain the endpoint,
 like so:
 
 jaxws:endpoint
   id=mockWebServiceEndpoint
   implementor=#mockWebService
   wsdlLocation=mockWebService.wsdl
   address=local://MockWebService
   jaxws:features
 wsp:Policy
   mtom:OptimizedMimeSerialization wsp:Optional=true/
 /wsp:Policy
   /jaxws:features
 /jaxws:endpoint
 
 But... when I load them up, I get an exception with the following
 message:
 No DestinationFactory was found for the namespace
 http://schemas.xmlsoap.org/soap/http.
 
 I suspect I'm missing a CXF config file that defines the
 DestinationFactory, I'm not setting up something right on the
endpoint,
 or I'm just completely wrong and can't even use the local transport in
 this way.
 
 Could someone with a clue please help me out? ;)  The full stack trace
 is at the bottom of this message.
 
 -Chris
 
 org.apache.cxf.service.factory.ServiceConstructionException
   at

org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
 105)
   at

org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
 n.java:142)
   at
 org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:277)
   at
 org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:223)
   at
 org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:175)
   at

org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderI
 mpl.java:74)
   at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
   at

com.myco.ws.client.BaseWebServiceTest.runsOnceBeforeAllTests(BaseWebServ
 iceTest.java:59)
   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

org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAf
 terRunner.java:74)
   at

org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfte
 rRunner.java:50)
   at

org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAf
 terRunner.java:33)
   at

org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
   at

com.intellij.rt.junit4.Junit4TestMethodAdapter.run(Junit4TestMethodAdapt
 er.java:54)
   at

com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
   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
 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
 Caused by: org.apache.cxf.BusException: No DestinationFactory was
found
 for the namespace http://schemas.xmlsoap.org/soap/http.
   at

org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFac
 tory(DestinationFactoryManagerImpl.java:101)
   at
 org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:85)
   at org.apache.cxf.endpoint.ServerImpl.init(ServerImpl.java:69)
   at

org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
 90)
   ... 27 more
 
 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland


RE: Aegis tests and exceptions ...

2007-07-18 Thread Benson Margulies
I gave you a test case on JIRA ... perhaps this is a piece of xfire that
hasn't migrated yet.

 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 18, 2007 12:17 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Aegis tests and exceptions ...
 
 Hi Benson,
 
 I'm looking into this. I'll report back as soon as I figure out if a)
its
 possible or b) when I have a fix for it :-)
 
 - Dan
 
 On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  Dan,
 
  Reading the code of 2.0, I see no evidence of any client-side code
  capable of taking a soap fault and turning it into a custom
exception
  class. The two interceptors I see (the 1.1 and 1.2 versions) both
end up
  throwing the CXF-specific SoapFault class.
 
  What am I missing?
 
  --benson
 
 
   -Original Message-
   From: Dan Diephouse [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, July 17, 2007 4:10 PM
   To: cxf-user@incubator.apache.org
   Subject: Re: Aegis tests and exceptions ...
  
   Hi Benson,
  
   More tests are always welcome! Just send along a patch. Cheers,
   - Dan
  
   On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:
   
I note that the source tree contains some careful set up of
  exceptions
to allow for some testing of exceptions, but no exceptions are
  tested.
Does this reflect some state of the implementation, or just that
no
  one
has had time to fill in more test cases? I'd volunteer to make
tests
that try the exceptions.
   
   
  
  
   --
   Dan Diephouse
   Envoi Solutions
   http://envoisolutions.com | http://netzooid.com/blog
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


wsdl over local transport

2007-07-18 Thread Benson Margulies
Since java2wsdl isn't prepared to cooperate with Aegis yet, I wonder if
I have any chance of pulling a WSDL through the local transport?



suggestion: package some test classes in a 'mock' jar?

2007-07-17 Thread Benson Margulies
I'm about to borrow AbstractCXFTest and a subclass or two to set up test
of my own service. It occurs to me that you all could package a jar file
with the contents of org.apache.cxf.test and the generally useful pieces
of AbstractAegisTest. Spring does something like this with the 'mock'
jar, no?



Aegis and exceptions

2007-07-17 Thread Benson Margulies
I find that my exception classes are collapsing into SoapFault. What am
I missing?

java.lang.Exception: Unexpected exception,
expectedcom.basistech.rnm.index.NameIndexException but
wasorg.apache.cxf.binding.soap.SoapFault
at
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRun
ner.java:91)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAf
terRunner.java:34)
at
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.j
ava:75)
at
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45
)
at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestC
lassMethodsRunner.java:71)
at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRu
nner.java:35)
at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRun
ner.java:42)
at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAf
terRunner.java:34)
at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4Tes
tReference.java:38)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja
va:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:196)
Caused by: org.apache.cxf.binding.soap.SoapFault: Slouches toward
Bethlehem to be born.
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleM
essage(Soap11FaultInInterceptor.java:69)
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleM
essage(Soap11FaultInInterceptor.java:36)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:206)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
(AbstractFaultChainInitiatorObserver.java:86)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:178)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
sage(ReadHeadersInterceptor.java:57)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:206)
at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:399)
at
org.apache.cxf.transport.local.LocalDestination$SynchronousConduit$1.run
(LocalDestination.java:88)
at java.lang.Thread.run(Thread.java:595)



RE: Getting the HTTP server off the bus

2007-07-17 Thread Benson Margulies
I added some comments and cleaned out some grit.

 -Original Message-
 From: Jiang, Ning (Willem) [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 9:38 AM
 To: cxf-user@incubator.apache.org
 Subject: RE: Getting the HTTP server off the bus
 
 Done.
 
 Here is the URL

http://cwiki.apache.org/confluence/display/CXF20DOC/Standalone+HTTP+Tran
sp
 ort
 
 
 -Original Message-
 From: Clough, Samuel (USPC.PRG.Atlanta)
 [mailto:[EMAIL PROTECTED]
 Sent: Tue 7/17/2007 20:39
 To: cxf-user@incubator.apache.org
 Subject: RE: Getting the HTTP server off the bus
 
 I think it would be helpful on a wiki...
 
 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 16, 2007 8:55 PM
 To: cxf-user@incubator.apache.org
 Subject: RE: Getting the HTTP server off the bus
 
 Well, you can ignore the first paragraph. The rest of my analysis
turned
 out to be correct.
 
 Would anyone care to see the following on a wiki?
 
 EndpointInfo ei = new EndpointInfo();
 ei.setAddress(serviceFactory.getAddress());
 Destination destination = df.getDestination(ei);
 JettyHTTPDestination jettyDestination =
 (JettyHTTPDestination) destination;
 ServerEngine engine = jettyDestination.getEngine();
 Handler handler = engine.getServant(new
 URL(serviceFactory.getAddress()));
 org.mortbay.jetty.Server server = handler.getServer();
 Handler serverHandler = server.getHandler();
 ContextHandlerCollection contextHandlerCollection =
 (ContextHandlerCollection)serverHandler;
 HandlerList handlerList = new HandlerList();
 ResourceHandler resourceHandler = new ResourceHandler();
 handlerList.addHandler(resourceHandler);
 handlerList.addHandler(contextHandlerCollection);
 server.setHandler(handlerList);
 handlerList.start();
 File staticContentFile = new File(staticContentPath);
 URL targetURL = new URL(file:// +
 staticContentFile.getCanonicalPath());
 FileResource fileResource = new FileResource(targetURL);
 resourceHandler.setBaseResource(fileResource);
 
  -Original Message-
  From: Benson Margulies [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 16, 2007 8:48 PM
  To: cxf-user@incubator.apache.org
  Subject: RE: Getting the HTTP server off the bus
 
  Dan and Willem,
 
  It looks to me like I'm fairly nearly stuck until you let me fully
  control the server wiring unless I'm willing to do some fairly
 extensive
  rewiring of your wiring.
 
  The jetty doc isn't precisely helpful here, but I have reached the
  following tentative view of the situation:
 
  As things are, the org.mortbay.jetty.Server has, as its singular
  handler, a ContextHandlerCollection, which has (at least one)
  ContextHandler. ContextHandlers are all about Servlet contexts, of
  course.
 
  Once a ContextHandlerCollection has at least one ContextHandler, it
  ignores any ordinary handlers that it has when handling any request
 that
  begins with '/'.
 
  So, to get a ResourceHandler into the game, I think that I'd have to
  create a HandlerList and have that point off to the
  ContextHandlerCollection as well as the ResourceHandler, and install
 it
  as the server's handler.
 
  I have a giant feeling here that there's something basic I'm missing
  about Jetty that is supposed to make this easier, but I'm pretty
near
 to
  accusing the folks who run the Jetty web site of intentionally
making
  the version 6 docs less helpful than the version 5 docs to sell more
  consulting.
 
  Probably just sour grapes on my part.
 
  --benson
 
 
 Princeton Retirement Group, Inc - Important Terms
 This E-mail is not intended for distribution to, or use by, any person
or
 entity in any location where such distribution or use would be
contrary to
 law or regulation, or which would subject Princeton Retirement Group,
Inc.
 or any affiliate to any registration requirement within such location.
 This E-mail may contain privileged or confidential information or may
 otherwise be protected by work product immunity or other legal rules.
No
 confidentiality or privilege is waived or lost by any mistransmission.
 Access, copying or re-use of information by non-intended or
non-authorized
 recipients is prohibited. If you are not an intended recipient of this
E-
 mail, please notify the sender, delete it and do not read, act upon,
print,
 disclose, copy, retain or redistribute any portion of this E-mail.
 The transmission and content of this E-mail cannot be guaranteed to be
 secure or error-free. Therefore, we cannot represent that the
information
 in this E-mail is complete, accurate, uncorrupted, timely or free of
 viruses, and Princeton Retirement Group, Inc. cannot accept any
liability
 for E-mails that have been altered in the course of delivery

@WebFault, I think there's a mistake on the Wiki

2007-07-17 Thread Benson Margulies
http://cwiki.apache.org/CXF20DOC/developing-a-service.html

 

This page states that @WebFault goes on methods. However, it looks to me
as if @WebFault only goes on exception classes. The page could also use
an example.

 

XFire had a whole discussion about faults, which doesn't seem to have
percolated onto the CXF Wiki. As previously reported, simply throwing
any old exception does not seem to result in a specific client-side
class. I'm about to discover if adding @WebFault on the server side will
result in what I want.

 



RE: Aegis tests and exceptions ...

2007-07-17 Thread Benson Margulies
Dan,

Reading the code of 2.0, I see no evidence of any client-side code
capable of taking a soap fault and turning it into a custom exception
class. The two interceptors I see (the 1.1 and 1.2 versions) both end up
throwing the CXF-specific SoapFault class.

What am I missing?

--benson


 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 4:10 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Aegis tests and exceptions ...
 
 Hi Benson,
 
 More tests are always welcome! Just send along a patch. Cheers,
 - Dan
 
 On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  I note that the source tree contains some careful set up of
exceptions
  to allow for some testing of exceptions, but no exceptions are
tested.
  Does this reflect some state of the implementation, or just that no
one
  has had time to fill in more test cases? I'd volunteer to make tests
  that try the exceptions.
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


RE: @WebFault, I think there's a mistake on the Wiki

2007-07-17 Thread Benson Margulies
At some risk of redundancy:

Step 1: set up Aegis+JAX-WS environment with some exceptions on the
service interface (and of course implementation).

Step 2: observe that WSDL seems plausible.

Step 3: run unit test. The throw is
org.apache.cxf.binding.soap.SoapFault, not any of mine.

Step 4: In a state of distraction, leap to the stupid conclusion that
the use of @WebFault could somehow result in better behavior.

Step 5: Discover error of ways.

Step 6: Read source code and fail to locate any sign of a capability to
map a fault to a custom exception class on client -- which might only
prove that I can't read.

Step 7: send this message amongst others.



shell scripts tools versus cygwin

2007-07-17 Thread Benson Margulies
Java2wsdl (the shell script) does not react well to being run from a
cygwin shell. It ends up with the wrong path separators.

 

If this isn't in the queue, I'll post a JIRA with a patch.



java2wsdl from ant

2007-07-17 Thread Benson Margulies
I know that ant tasks are pending. Until then, I tried to roll my own.
And I crashed with a complaint that cxf.xml was not found in classpath.
What jar file is supposed to contain it for this purpose?



java2wsdl rejects class that is acceptable to the aegis universe

2007-07-17 Thread Benson Margulies
Is there something special I have to do to run java2wsdl for an aegis
environment? As it is, I get a very mysterious rejection letter until I
ask for -verbose, and then I get the following...

org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
 [java] INFO: Could not find the configuration file cxf.xml on the
classpath.
 [java] Jul 17, 2007 10:27:45 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromC
lass
 [java] INFO: Creating Service
{urn:com.basistech.rnm.index.ws}NameIndex from class
com.basistech.rnm.index.ws
.impl.NameIndexServiceImpl
 [java] Error :
org.apache.cxf.service.factory.ServiceConstructionException
 [java] 
 [java] java.lang.RuntimeException:
org.apache.cxf.service.factory.ServiceConstructionException
 [java] at
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
viceFactory.java:31)
 [java] at
org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaToP
rocessor.java:87)
 [java] at
org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLCon
tainer.java:59)
 [java] at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
84)
 [java] at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
52)
 [java] at
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
39)
 [java] at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
 [java] at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
 [java] Caused by:
org.apache.cxf.service.factory.ServiceConstructionException
 [java] at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:269)
 [java] at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
FromClass(ReflectionSer
viceFactoryBean.java:220)
 [java] at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionSe
rviceFactoryBean.java:248)
 [java] at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean
.java:136)
 [java] at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractE
ndpointFactory.java:83)
 [java] at
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
viceFactory.java:29)
 [java] ... 7 more
 [java] Caused by:
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of
IllegalAnnotationExcep
tions
 [java] Class has two properties of the same name scheme
 [java] this problem is related to the following location:
 [java] at public int
com.basistech.rnm.Transliteration.getScheme()
 [java] at com.basistech.rnm.Transliteration
 [java] at public com.basistech.rnm.Transliteration[]
com.basistech.rnm.Name.getTransliterations()
 [java] at com.basistech.rnm.Name
 [java] at public com.basistech.rnm.Name[]
com.basistech.rnm.Entity.getNames()
 [java] at com.basistech.rnm.Entity
 [java] this problem is related to the following location:
 [java] at public int
com.basistech.rnm.Transliteration.scheme
 [java] at com.basistech.rnm.Transliteration
 [java] at public com.basistech.rnm.Transliteration[]
com.basistech.rnm.Name.getTransliterations()
 [java] at com.basistech.rnm.Name
 [java] at public com.basistech.rnm.Name[]
com.basistech.rnm.Entity.getNames()
 [java] at com.basistech.rnm.Entity











RE: Getting the HTTP server off the bus

2007-07-16 Thread Benson Margulies
Willem,

When I call getServant, I get back the JettyHTTPHandler.  Which,
interestingly enough, will cheerfully return the Jetty Server object
which I was asking for in the first place.

The ContextHandler in which the JettyHTTPHandler lives is somewhat
obscurely connected, I haven't found the trail of breadcrumbs for it
yet, but I'm working on it.

--benson


 -Original Message-
 From: Willem Jiang [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 16, 2007 4:44 AM
 To: cxf-user@incubator.apache.org
 Subject: Re: Getting the HTTP server off the bus
 
 Benson,
 
 I just noticed that you can get the context handler by the below code
 when you get the service engine.
 
 ...
 
 JettyHTTPDestination destination =
 (JettyHTTPDestination)df.getDestination(epi);
 ServerEngine engine= destination.getEngine();
 ContextHandler context = (ContextHandler) engine.getServant(new
 URL(address));
 ...
 
 And you can use this context to add the static resource handler.
 
 Willem.
 
 Benson Margulies wrote:
  Before I finish the story I started, I see that I could get what I
want
  around here by making a mutant copy of JettyHTTPServerEngine and
using
  it by imposing my own subclass of JettyHTTPServerEngineFactory. So
I'm
  looking around to see where I can configure THAT trick.
 
 
  In XFire, I made a variation on XFireHttpServer in which I could
have
  the following ...
 
  ResourceHandler rh = new ResourceHandler();
  rh.setDirAllowed(true);
  context.addHandler(rh);
  context.setResourceBase(staticContentDirectory);
 
 
 
 


RE: Getting the HTTP server off the bus

2007-07-16 Thread Benson Margulies
For now, I can ask the org.mortbay.jetty.Server for its list of
Handlers. There is only one in this case, and it's the ContextHandler. I
think that your proposed accessor makes perfect sense when you get
around to it.

 -Original Message-
 From: Jiang, Ning (Willem) [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 16, 2007 11:47 AM
 To: cxf-user@incubator.apache.org
 Subject: RE: Getting the HTTP server off the bus
 
 Hi Beanson,
 
 My bad to take  the JettyHTTPHandler as ContextHandler.
 
 I just checked the Jetty's handler api, and I didn't find a way to get
the
 parent handler form a childer handler.
 
 Maybe you can find the Context handler by looking up the context path
from
 server, or we can add the getContextHandler method in the
 JettyHTTPServerEngine.
 
 Willem.
 
 
 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Mon 7/16/2007 22:53
 To: cxf-user@incubator.apache.org
 Subject: RE: Getting the HTTP server off the bus
 
 Willem,
 
 When I call getServant, I get back the JettyHTTPHandler.  Which,
 interestingly enough, will cheerfully return the Jetty Server object
 which I was asking for in the first place.
 
 The ContextHandler in which the JettyHTTPHandler lives is somewhat
 obscurely connected, I haven't found the trail of breadcrumbs for it
 yet, but I'm working on it.
 
 --benson
 
 
  -Original Message-
  From: Willem Jiang [mailto:[EMAIL PROTECTED]
  Sent: Monday, July 16, 2007 4:44 AM
  To: cxf-user@incubator.apache.org
  Subject: Re: Getting the HTTP server off the bus
 
  Benson,
 
  I just noticed that you can get the context handler by the below
code
  when you get the service engine.
 
  ...
 
  JettyHTTPDestination destination =
  (JettyHTTPDestination)df.getDestination(epi);
  ServerEngine engine= destination.getEngine();
  ContextHandler context = (ContextHandler) engine.getServant(new
  URL(address));
  ...
 
  And you can use this context to add the static resource handler.
 
  Willem.
 
  Benson Margulies wrote:
   Before I finish the story I started, I see that I could get what I
 want
   around here by making a mutant copy of JettyHTTPServerEngine and
 using
   it by imposing my own subclass of JettyHTTPServerEngineFactory. So
 I'm
   looking around to see where I can configure THAT trick.
  
  
   In XFire, I made a variation on XFireHttpServer in which I could
 have
   the following ...
  
   ResourceHandler rh = new ResourceHandler();
   rh.setDirAllowed(true);
   context.addHandler(rh);
   context.setResourceBase(staticContentDirectory);
  
  
  
  



RE: Getting the HTTP server off the bus

2007-07-16 Thread Benson Margulies
Well, you can ignore the first paragraph. The rest of my analysis turned
out to be correct. 

Would anyone care to see the following on a wiki?

EndpointInfo ei = new EndpointInfo();
ei.setAddress(serviceFactory.getAddress());
Destination destination = df.getDestination(ei);
JettyHTTPDestination jettyDestination =
(JettyHTTPDestination) destination;
ServerEngine engine = jettyDestination.getEngine();
Handler handler = engine.getServant(new
URL(serviceFactory.getAddress()));
org.mortbay.jetty.Server server = handler.getServer();
Handler serverHandler = server.getHandler();
ContextHandlerCollection contextHandlerCollection =
(ContextHandlerCollection)serverHandler;
HandlerList handlerList = new HandlerList();
ResourceHandler resourceHandler = new ResourceHandler();
handlerList.addHandler(resourceHandler);
handlerList.addHandler(contextHandlerCollection);
server.setHandler(handlerList);
handlerList.start();
File staticContentFile = new File(staticContentPath);
URL targetURL = new URL(file:// +
staticContentFile.getCanonicalPath());
FileResource fileResource = new FileResource(targetURL);
resourceHandler.setBaseResource(fileResource);

 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED]
 Sent: Monday, July 16, 2007 8:48 PM
 To: cxf-user@incubator.apache.org
 Subject: RE: Getting the HTTP server off the bus
 
 Dan and Willem,
 
 It looks to me like I'm fairly nearly stuck until you let me fully
 control the server wiring unless I'm willing to do some fairly
extensive
 rewiring of your wiring.
 
 The jetty doc isn't precisely helpful here, but I have reached the
 following tentative view of the situation:
 
 As things are, the org.mortbay.jetty.Server has, as its singular
 handler, a ContextHandlerCollection, which has (at least one)
 ContextHandler. ContextHandlers are all about Servlet contexts, of
 course.
 
 Once a ContextHandlerCollection has at least one ContextHandler, it
 ignores any ordinary handlers that it has when handling any request
that
 begins with '/'.
 
 So, to get a ResourceHandler into the game, I think that I'd have to
 create a HandlerList and have that point off to the
 ContextHandlerCollection as well as the ResourceHandler, and install
it
 as the server's handler.
 
 I have a giant feeling here that there's something basic I'm missing
 about Jetty that is supposed to make this easier, but I'm pretty near
to
 accusing the folks who run the Jetty web site of intentionally making
 the version 6 docs less helpful than the version 5 docs to sell more
 consulting.
 
 Probably just sour grapes on my part.
 
 --benson



RE: customizing the HTTP transport factory

2007-07-15 Thread Benson Margulies
By the way, here's what was really surprising about this. 

When I first hit the NPE, I thought, OK, I need to set some transport
IDs. Let's see what the standard version of the class has.

So, I turned off my class and set a breakpoint at the spot that looked
at the transport ids. It was never called.

I apologize for not capturing the details, but, in general, when the
code is setting up lazily as a result of a call to get a server for a
service, the rest of the (un)initialization status causes the logic to
assume that there will be no transport ids, and it makes some
assumptions, instead. By creating and advertising a factory on the bus
before entering that code, I'm obviating all of that.

Now, ignorantly, I would suggest that I should be able to arrange the
same convenient treatment for my subclass as the standard class gets. 

Or, alternatively, your concept might be: 

As soon as you (ahem) open the jar and start customizing things, we
recommend spring wiring, and look at the supplied files to see how it's
done.



 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Saturday, July 14, 2007 1:57 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: customizing the HTTP transport factory
 
 Hi Benson,
 
 You're very close to getting it to work :-)  If you look at the
 cxf-extension-http-jetty.xml file you'll see that we associate several
 transport IDs with that transport:
 
 bean class=
 org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory
 lazy-init=true
 property name=bus ref=cxf/
 property name=transportIds
 list
 valuehttp://schemas.xmlsoap.org/soap/http/value
 valuehttp://schemas.xmlsoap.org/wsdl/http//value

valuehttp://schemas.xmlsoap.org/wsdl/soap/http/value
  valuehttp://www.w3.org/2003/05/soap/bindings/HTTP/
 /value

valuehttp://cxf.apache.org/transports/http/configuration
 /value
 valuehttp://cxf.apache.org/bindings/xformat/value
 /list
 /property
 /bean
 
 In code form, this is equivalent to:
 
 SetString tids = new HashSetString();
 tids.add(http://schemas.xmlsoap.org/soap/http;);
 ... etc for all transport ids
 
 httpTransport.setTransportIds(tids);
 
 for (String tid : tids) {
   dfm.registerDestinationFactory(tid, httpTransport);
 }
 
 We should really write some docs on the transport layer, but hopefully
 this
 will get you going in the meantime.
 
 Thanks,
 - Dan
 
 
 On 7/13/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  I set out to replace JettyHTTPTransportFactory with a slightly
modified
  version. So, I wrote the code below.
 
  The effect is an NPE when my factory object is asked for its
  transportIds, of which it has none. When I don't try to set this up,
the
  default transport factory does not get asked for its transport ids,
  apparently because other things that aren't initialized protect it
from
  being asked.
 
  I think I see what the transport Id has to be for SOAP, so I can
just
  set it, but is this idea supposed to work without that?
 
 
 
 Bus bus =  BusFactory.getDefaultBus();
  DestinationFactoryManager dfm =
  bus.getExtension(DestinationFactoryManager.class);
  JettyHTTPTransportFactoryForStaticContent transportFactory =
new
  JettyHTTPTransportFactoryForStaticContent();
  transportFactory.setBus(bus);
 
 
dfm.registerDestinationFactory(http://cxf.apache.org/transports/http/co
  nfiguration, transportFactory);
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


RE: customizing the HTTP transport factory

2007-07-14 Thread Benson Margulies
Dan,

The most interesting thing that dawned on me is that a JettyHTTPHandler
\is a/ Jetty \Handler/. Thus, I can instantiate Jetty's standard static
content handler and call it from a subclass of JettyHTTPHandler, since
the same arguments that come into JettyHTTPHandler can be delegated to
the handlers in Jetty and thus avoid the need for what you sent.

To use what you sent, I'd need to fill in the suffix-to-mime-type
department. Not the end of the world, and borrowable from Jetty, but
still clumsy compared to just using Jetty's stuff.

I appreciate your coaching on the transport factory. You presumably saw
the JIRA I created when I tried to reduce the number of extra classes I
had to create by registering my own subclass of the server engine
factory as the bus extension instead of using my own transport factory
to return my own server engine factory to return my own server engine. 

Ironically, I want to get rid of the program I have that uses the
embedded server and replace it with a spring deployment inside a WAR
inside Jetty. However, it was going to be easier on various people if I
got it working, instead.

I have this feeling that I don't have an adequate design understanding
of the relationship between the bus, the spring wiring, and the
hardcoded defaults, so please excuse anything goofy I send.

--benson





RE: javascript clients?

2007-07-13 Thread Benson Margulies
We came up with our own attempt at wsdl2js that generates clients that
can be run in browsers, and were hoping to retire it.

 -Original Message-
 From: Jeff Zhang [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 12, 2007 10:13 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: javascript clients?
 
 Hi,
 
 Now it use rhino lib to call java JaxWS frontend.
 
 Thanks
 Jeff
 
 - Original Message -
 From: Benson Margulies [EMAIL PROTECTED]
 To: cxf-user@incubator.apache.org
 Sent: Friday, July 13, 2007 9:51 AM
 Subject: javascript clients?
 
 
 Reading the doc on Javascript service implementations, I'm led to
wonder
 if you have got a code generator to emit Javascript clients?



RE: Getting the HTTP server off the bus

2007-07-13 Thread Benson Margulies
Willem,

In 2.0, there is no JettyHttpTransportFactory.
There is a JettyHTTPTransportFactory.

But it has no getEngine().

?


 -Original Message-
 From: Willem Jiang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 11, 2007 10:35 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Getting the HTTP server off the bus
 
 Hi Benson,
 
 All the Jetty related stuff of CXF are in the
 cxf-rt-transports-http-jetty module.
 You can get the serverEngine which wraps the Jetty instance from the
 JettyHttpTransportFactory.
 
 You can use the below codes to get the serverEngine.
 
 Bus bus =  BusFactory.getDefaultBus();
 DestinationFactoryManager dfm =
 bus.getExtension(DestinationFactoryManager.class);
 JettyHttpTransportFactory df = (JettyHttpTransportFactory)

dfm.getDestinationFactory(http://cxf.apache.org/transports/http/configu
ra
 tion);
ServerEngine engine= df.getEngine();
 
 The you just need to extends JettyHTTPHandler to deal with the static
 content directory, and add it into the engine by call addServant(URL
 url, JettyHTTPHandler handler).
 
 You can find the detail information about the ServerEngine and
 JettyHTTPHandler from this directory
 

https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/transports/http-
 jetty/src/main/java/org/apache/cxf/transport/http_jetty
 
 Enjoy hacking the code !
 
 Willem.
 
 
 Benson Margulies wrote:
  Could someone reveal how to ask the default bus for the running
Jetty
  instance? I want to add a static content directory for it to handle.
 
 
 
 
 
 
 


RE: WSDL service-name

2007-07-13 Thread Benson Margulies
Out of curiosity, if I wanted the primary source of annotations to be
the interface, then the cure would be to put endpointInterface on the
interface?

 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Friday, July 13, 2007 5:46 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: WSDL service-name
 
 If you take away the serviceFactory.setServiceclass() line I think
it'll
 fix
 your problem. Effectively you're telling CXF not to look at the
 @WebService
 annotation on the NameIndexServiceImpl, which I don't think is what
you
 want
 to do :-). CXF will automatically introspect the service bean and find
the
 endpoint interface via the @WebService.endpointInterface annotation,
so
 that
 line is completely not needed.
 
 Cheers,
 - Dan
 
 On 7/13/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  This annotation is on the implementation class (named
  NameIndexServiceImpl)
 
  @WebService(serviceName = NameIndex, endpointInterface =
  com.basistech.rnm.index.ws.NameIndexService,
  targetNamespace=urn:com.basistech.rnm.index.ws)
 
  This annotation is on the interface (named NameIndexService)
 
  @WebService(name=NameIndex,
  targetNamespace=urn:com.basistech.rnm.index.ws)
 
  The startup looks like this:
 
  serviceFactory.setAddress(http://localhost:; + port +
  /NameIndex);
  serviceFactory.setServiceBean(new
  NameIndexServiceImpl(configPath));
  serviceFactory.setServiceClass(NameIndexService.class);
 
  And the wsdl comes out like this: ...
 
  wsdl:definitions name=NameIndexServiceService
  targetNamespace=urn:com.basistech.rnm.index.ws
 
  How do I get rid of the extra 'service'?
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


RE: Getting the HTTP server off the bus

2007-07-13 Thread Benson Margulies
Willem,

The recipe in 2.0 looks like:

Bus bus =  BusFactory.getDefaultBus();
DestinationFactoryManager dfm =
bus.getExtension(DestinationFactoryManager.class);
JettyHTTPTransportFactory df = (JettyHTTPTransportFactory)
dfm.getDestinationFactory(http://cxf.apache.org/transports/http/configu
ration);
EndpointInfo ei = new EndpointInfo();
ei.setAddress(serviceFactory.getAddress());
@SuppressWarnings(unused)
Destination destination = df.getDestination(ei);
JettyHTTPDestination jettyDestination =
(JettyHTTPDestination)destination; 
ServerEngine engine= jettyDestination.getEngine();

Now I wish that I could just retrieve the org.mortbay.jetty.Server from
the JettyHTTPServerEngine and talk to it, I already know how. It already
knows how to handle static content. It's kind of crazy to write my own
code to serve up static data, when the code from Jetty is out there and
can do it perfectly well.

If I offered a patch, would you take it?



 -Original Message-
 From: Willem Jiang [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 11, 2007 10:35 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Getting the HTTP server off the bus
 
 Hi Benson,
 
 All the Jetty related stuff of CXF are in the
 cxf-rt-transports-http-jetty module.
 You can get the serverEngine which wraps the Jetty instance from the
 JettyHttpTransportFactory.
 
 You can use the below codes to get the serverEngine.
 
 Bus bus =  BusFactory.getDefaultBus();
 DestinationFactoryManager dfm =
 bus.getExtension(DestinationFactoryManager.class);
 JettyHttpTransportFactory df = (JettyHttpTransportFactory)

dfm.getDestinationFactory(http://cxf.apache.org/transports/http/configu
ra
 tion);
ServerEngine engine= df.getEngine();
 
 The you just need to extends JettyHTTPHandler to deal with the static
 content directory, and add it into the engine by call addServant(URL
 url, JettyHTTPHandler handler).
 
 You can find the detail information about the ServerEngine and
 JettyHTTPHandler from this directory
 

https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/transports/http-
 jetty/src/main/java/org/apache/cxf/transport/http_jetty
 
 Enjoy hacking the code !
 
 Willem.
 
 
 Benson Margulies wrote:
  Could someone reveal how to ask the default bus for the running
Jetty
  instance? I want to add a static content directory for it to handle.
 
 
 
 
 
 
 


CXF-781

2007-07-12 Thread Benson Margulies
I went ahead and dropped an issue report for a problem I encountered
with type management of a service that combines JSR181 with Aegis. This
is the only apparent impediment to moving this codebase from xfire 1.2.5
to CXF 2.0.

I would be most grateful for any assistance here. I can play test-case
bingo and try to come up with a repro, but I was hoping that the experts
would look at it and offer some 'aha' that could guide me in isolating
the problem or working around it.



Java out of memory building 2.0 from source with maven?!

2007-07-12 Thread Benson Margulies
This belongs on the devo list, I guess, but I'm really just a user
running a build to get the rest of the javadoc. Any hints on how to get
around this? I have the current 1.5 JDK.

 

 

[INFO] Compiling 1313 source files to
C:\x\s\apache-cxf-2.0-incubator-src\testutils\target\classes

[INFO]


[ERROR] BUILD FAILURE

[INFO]


[INFO] Compilation failure

Failure executing javac, but could not parse the error:

 

 

The system is out of resources.

Consult the following stack trace for details.

java.lang.OutOfMemoryError: Java heap space

 

 

 

Failure executing javac, but could not parse the error:

 

 

The system is out of resources.

Consult the following stack trace for details.

java.lang.OutOfMemoryError: Java heap space



More javadoc

2007-07-12 Thread Benson Margulies
Is there a mvn recipe for building all the javadoc? Preferably as one
giant lump that Eclipse can associate with the one giant jar of code?



RE: CXF-781

2007-07-12 Thread Benson Margulies
No joy in current snapshot. I will try to concoct a test case.

 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Thursday, July 12, 2007 3:45 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: CXF-781
 
 Would you be willing to try one of the latest snapshots? I think this
was
 fixed post 2.0...
 
 http://incubator.apache.org/cxf/download.html
 
 If it still doesn't work, report back and I can dive into it. I've
been
 meaning to clean up that code this week anyway. :-)
 Thanks!
 - Dan
 
 On 7/12/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  I went ahead and dropped an issue report for a problem I encountered
  with type management of a service that combines JSR181 with Aegis.
This
  is the only apparent impediment to moving this codebase from xfire
1.2.5
  to CXF 2.0.
 
  I would be most grateful for any assistance here. I can play
test-case
  bingo and try to come up with a repro, but I was hoping that the
experts
  would look at it and offer some 'aha' that could guide me in
isolating
  the problem or working around it.
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


javascript clients?

2007-07-12 Thread Benson Margulies
Reading the doc on Javascript service implementations, I'm led to wonder
if you have got a code generator to emit Javascript clients?



Getting the HTTP server off the bus

2007-07-11 Thread Benson Margulies
Could someone reveal how to ask the default bus for the running Jetty
instance? I want to add a static content directory for it to handle.

 

 



<    1   2   3   4