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.

 

 



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



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

2007-07-12 Thread Benson Margulies
That did fix it.



> -Original Message-
> From: Jiang, Ning (Willem) [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 12, 2007 9:28 AM
> To: cxf-user@incubator.apache.org
> Subject: RE: Java out of memory building 2.0 from source with maven?!
> 
> This is a common issue of the wsdl2java maven plugin,
> if you wsdl is very large , the out of memory exception will be
thrown.
> 
> Please try this
> 
> export MAVEN_OPTS=-Xmx512M
> 
> Cheers,
> 
> Willem.
> 
> -Original Message-
> From: Benson Margulies [mailto:[EMAIL PROTECTED]
> Sent: Thu 7/12/2007 20:49
> To: cxf-user@incubator.apache.org
> Subject: Java out of memory building 2.0 from source with maven?!
> 
> 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
Can do. 

> -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


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


RE: CXF-781

2007-07-12 Thread Benson Margulies
Dan,

I attached a repro to the issue. It's a set of files that drop into
org.apache.cxf.aegis.test.java5. I didn't make use of the base class for
the test, but if you keep this as a unit test I'm sure that won't be
hard.

My original code fails with the snapshot. I only tried the test case in
the 2.0 hierarchy.

--benson



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?



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: 
> 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?



WSDL service-name

2007-07-13 Thread Benson Margulies
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: ...



How do I get rid of the extra 'service'?



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: ...
> >
> >  > 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.
> >
> >
> >
> >
> >
> >
> >


RE: Getting the HTTP server off the bus

2007-07-13 Thread Benson Margulies
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);

>


customizing the HTTP transport factory

2007-07-13 Thread Benson Margulies
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);


RE: WSDL service-name

2007-07-14 Thread Benson Margulies
Yes.

> -Original Message-
> From: Dan Diephouse [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 14, 2007 12:17 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: WSDL service-name
> 
> I'm pretty sure that per the JAX-WS spec, the serviceName goes on the
impl
> class regardless. So I think you still need @WebService on the impl
and on
> the interface. Does that answer your question?
> 
> - Dan
> 
> On 7/13/07, Benson Margulies <[EMAIL PROTECTED]> wrote:
> >
> > 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: ...
> > > >
> > > >  > > > 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
> >
> 
> 
> 
> --
> 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: 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:
> 
>  lazy-init="true">
> 
> 
> 
> http://schemas.xmlsoap.org/soap/http
> http://schemas.xmlsoap.org/wsdl/http/
>
http://schemas.xmlsoap.org/wsdl/soap/http
>  http://www.w3.org/2003/05/soap/bindings/HTTP/
> 
>
http://cxf.apache.org/transports/http/configuration
> 
> http://cxf.apache.org/bindings/xformat
> 
> 
> 
> 
> In code form, this is equivalent to:
> 
> Set tids = new HashSet();
> 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: Getting the HTTP server off the bus

2007-07-16 Thread Benson Margulies
Yes, indeed, this is really a superior solution. It's much better than
trying to replace factories.

Now, if I only knew why the jetty FileResource constructs over a URL
instead of a pathname :-)

Thanks!

> -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
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
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: 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



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,
expected but
was
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.

@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.

 



Aegis tests and exceptions ...

2007-07-17 Thread Benson Margulies
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.



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: 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)
> >  [ja

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 copy&paste,
> 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:
> 
>id="mockWebServiceEndpoint"
>   implementor="#mockWebService"
>   wsdlLocation="mockWebService.wsdl"
>   address="local://MockWebService">
>   
> 
>   
> 
>   
> 
> 
> 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.(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?



RE: WSDL Generation problem using Aegis binding

2007-07-18 Thread Benson Margulies
Is there a .aegis.xml file in the neighborhood of your problem?

> -Original Message-
> From: Clough, Samuel (USPC.PRG.Atlanta)
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 18, 2007 3:02 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: WSDL Generation problem using Aegis binding
> 
> Thanks for the clarification.  I wonder what's making Aegis omit the
> namespace.  I found it odd since Aegis doesn't seem to generate the
> element node for another service I looked at, but your explanation
makes
> perfect sense.
> 
> -Original Message-
> From: omatzura [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 18, 2007 2:57 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: WSDL Generation problem using Aegis binding
> 
> 
> Hi Samuel,
> 
> Just to clarify the error: an element definition like this is fine,
the
> problem in this particular case is that the type for the element is
not
> namespace qualified, so it basically means that for the
> 
> 
> 
> element, the type getDataWarnings is expected to be in the default
> namespace
> (which is the xmlschema namespace, as the error message implies.. )
> 
> What's missing is a namespace-prefix declaration for the target
> namespace
> and then that prefix on your elements' type.. ie
> 
> http://www.w3.org/2001/XMLSchema";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://service.afp.prg.com/";>
> 
> should be something like
> 
> http://www.w3.org/2001/XMLSchema";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://service.afp.prg.com/";
> xmlns:tns="http://service.afp.prg.com/";>
> 
> and the element should then be
> 
> 
> 
> Don't know if this helps you resolve the error, but maybe at least
> understand it in more detail..
> 
> kind regards, and thanks for using soapUI !
> 
> /Ole
> eviware.com
> 
> 
> Clough, Samuel (USPC.PRG.Atlanta) wrote:
> >
> > Below is a snippet of the WSDL that's getting generated using Aegis
> > binding with the embedded server and causing errors.  We're doing
Java
> > first development, no annotations or anything as these are all
> internal
> > appsl.  When the .NET client tried to connect we were getting a
> bizarre
> > error which I believe I have been able to track down using soapui.
At
> > the bottom of this message is a fragment of the wsdl generated.  I
am
> > very green at wsdl, but the problem seems to be that for every
complex
> > type being defined in the schema, before the complexType node there
is
> > an "element" node by the same name.  SoapUI is what led me to this
> > conclusion because it rasies an error trying to pull in the wsdl
that
> > the type is not defined at http://www.w3.org/2001/XMLSchema.  So, I
> > believe the "element" node that is preceding each complexType node
is
> an
> > error.  The bizarre thing is that we have other classes generating
> wsdl
> > just fine and on those services there is not element node preceding
> each
> > complexType node of the same name.  Any clue what could be causing
> this
> > error?
> >
> >  > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > xmlns:ns1="http://service.afp.prg.com/";
> > xmlns:ns2="http://schemas.xmlsoap.org/soap/http";
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
name="AFPManagerService"
> > targetNamespace="http://service.afp.prg.com/";>
> >   
> > http://www.w3.org/2001/XMLSchema";
> > attributeFormDefault="qualified" elementFormDefault="qualified"
> > targetNamespace="http://service.afp.prg.com/";>
> > 
> > 
> >  > nillable="true" type="string"/>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> >  type="getDataWarningsResponse"/>
> > 
> > 
> >  > type="ArrayOfString"/>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> >
> > 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 compl

Contribution of wsdl2js tool

2007-07-19 Thread Benson Margulies
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

 



Missing type in wsdl from Aegis

2007-07-19 Thread Benson Margulies
I've got a WSDL from Aegis that is missing a type altogether. Here's the
front of it, for what it's worth. The type ns1:Transliteration is
completely missing. I will try to cook this into a test case unless
someone tells me that this is a known problem.



http://ws.index.rnm.basistech.com";
xmlns:ns1="http://ws.index.rnm.basistech.com";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns2="urn:com.basistech.rnm.index"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
  
http://www.w3.org/2001/XMLSchema";
xmlns:ns0="http://util.basistech.com"; attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="urn:com.basistech.rnm">















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


RE: Eclipse XSD validation for jaxws.xsd

2007-07-19 Thread Benson Margulies
Type 'catalog' into the window/preferences filter box.

> -Original Message-
> From: Durgaprasad Rao [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 19, 2007 12:30 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: Eclipse XSD validation for jaxws.xsd
> 
> Thanks for the reply.  I found the location of this jar containing
> jaxws.xsd.  How can I export this XSD to Eclipse so that it finds this
> schema. Currently my eclipse reports : Failed to read schema document
> 'http://cxf.apache.org/schema/jaxws.xsd'. Eclipse could able to find
> spring related name spaces but not the CXF related ones.  Any help is
> appreciated.
> 
>   Thanks,
>   Durga
> 
> Christopher Moesel <[EMAIL PROTECTED]> wrote:
>   The jaxws.xsd file is packaged in the
> cxf-rt-frontend-jaxws-2.0-incubator.jar as well as the uber
> cxf-2.0-incubator.jar. In both cases, you can find it under /schemas.
> 
> -Chris
> 
> -Original Message-
> From: gdprao [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 19, 2007 11:35 AM
> To: cxf-user@incubator.apache.org
> Subject: Eclipse XSD validation for jaxws.xsd
> 
> 
> I am new to CXF and trying to use it with spring. When I am trying to
> use
> beans.xml file with jaxws.xsd namespace, Eclipse reports that this
> namespace
> is not found. How can I add this schema to the eclipse so that it can
> find
> the schema and does not report validation errors. Any help is
> appreciated.
> --
> View this message in context:
>
http://www.nabble.com/Eclipse-XSD-validation-for-jaxws.xsd-tf4111858.htm
> l#a11691580
> Sent from the cxf-user mailing list archive at Nabble.com.
> 
> 
> 
> 
> -
> Yahoo! oneSearch: Finally,  mobile search that gives answers, not web
> links.


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: 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


 



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: 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
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.



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.



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: 
> 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: 
> > 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: Cannot find the declaration of element 'wsdl:definitions'

2007-07-25 Thread Benson Margulies
Could some kind person explain what's going on with the jar files here?
This manifest jar business is a new one on me. If we put a jar in the
classpath with a MANIFEST.MF with a classpath, are the pathnames in the
MANIFEST.MF interpreted relative to the path of the manifest jar? And
why does it matter for the schemata?

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 25, 2007 7:14 AM
> To: cxf-user@incubator.apache.org
> Cc: James Mao
> Subject: Re: Cannot find the declaration of element 'wsdl:definitions'
> 
> 
> Wow.   Good catch.   I would have never thought about the bundle jar
> being the issue.
> 
> James: can you log a Jira so I can track it in the release notes?
> 
> Dan
> 
> 
> On Wednesday 25 July 2007 05:05, James Mao wrote:
> > Sorry, you do have the stacktrace attached
> >
> > And i can reproduce your problem now, it's caused by the bundle jar,
> > some schemas can not be accessed from the bundle jar.
> > And I'm sure, you're using the bundle jar
> >
> > humm... i'll try to fix this.
> >
> > The work around solution is to use the manifest jar, i.e move the
> > bundle jar out of the lib directory, copy the jars in the modules to
> > the lib
> >
> > You will get the correct result.
> >
> > Regards,
> > James
> >
> > > Strange, i tried with the latest kit, the output is like this:
> > >
> > >
> > >
C:\src\java\apache\cxf\distribution\target\apache-cxf-2.1-incubator-
> > >SNAPSHOT\bin>wsdlvalidator -V HelloWorld.wsdl
> > > wsdlvalidator -V HelloWorld.wsdl
> > > wsdlvalidator - 2.1-incubator-SNAPSHOT
> > >
> > > Passed Validation : Valid WSDL
> > >
> > > It's a valid wsdl.
> > >
> > >
> > > Can you turn on the verbose mode, and send us the stacktrace?
> > >
> > >
> > > P.S
> > >
> > >
C:\src\java\apache\cxf\distribution\target\apache-cxf-2.1-incubator-
> > >SNAPSHOT\bin>java -version
> > > java version "1.5.0_10"
> > > Java(TM) 2 Runtime Environment, Standard Edition (build
> > > 1.5.0_10-b03) Java HotSpot(TM) Client VM (build 1.5.0_10-b03,
mixed
> > > mode, sharing)
> > >
> > >
> > > Thanks,
> > > James
> > >
> > >> I upgraded to snapshot 20070724 and I'm still getting the same
> > >> error.
> > >>
> > >> I case it's some obscure incoding issue, I'm attaching the actual
> > >> file (hoping the mailing list won't eat it).
> > >> Also, I'm on a mac and java -version gives:
> > >>
> > >> java version "1.5.0_07"
> > >> Java(TM) 2 Runtime Environment, Standard Edition (build
> > >> 1.5.0_07-164) Java HotSpot(TM) Client VM (build 1.5.0_07-87,
mixed
> > >> mode, sharing)
> > >>
> > >> 2007/7/25, James Mao <[EMAIL PROTECTED]>:
> > >>> I fixed a problem in the wsdlvalidator yesterday, should be
fixed
> > >>> in the
> > >>> latest snapshot, try the latest one.
> > >>>
> > >>> Regards,
> > >>> James
> > >>>
> > >>> > Hi,
> > >>> >
> > >>> > Using the (currently) latest snapshot, namely
> > >>> > apache-cxf-2.1-incubator-20070720.011624-1(.zip).
> > >>> >
> > >>> > An error (see bellow) is produced when you expose the
following
> > >>> > WSDL file to the wsdlvalidator application:
> > >>> >
> > >>> > = The WSDL =
> > >>> > 
> > >>> >  > >>> >xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > >>> >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> > >>> >xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> > >>> >xmlns:xs="http://www.w3.org/2001/XMLSchema";
> > >>> >xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> > >>> >xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";>
> > >>> >
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> >  > >>> > transport="http://schemas.xmlsoap.org/soap/http"/>
> > >>> > 
> > >>> >  > >>> > soapAction="http://unwire.dk/SayHello"/> 
> > >>> >  > >>> > namespace="http://ws.unwire.dk/"/>
> > >>> > 
> > >>> > 
> > >>> >  > >>> > namespace="http://ws.unwire.dk/"/>
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> >  > >>> > binding="HelloWorldSOAP">  > >>> > location="http://localhost:8080/Services/HelloWorld"/>
> > >>> > 
> > >>> > 
> > >>> > 
> > >>> >
> > >>> >
> > >>> >
> > >>> > = The Error =
> > >>> >
> > >>> > wsdlvalidator -verbose
> > >>> >
/Users/vest/workspace/Service/src/main/resources/HelloWorld.wsdl
> > >>> > wsdlvalidator - 2.1-incubator-SNAPSHOT
> > >>> >
> > >>> > WSDLValidator Error :
> > >>> > line 8 column 56 of
> > >>>
> > >>>
>
file:/Users/vest/workspace/Statistics2/src/main/resources/HelloWorld.wsd
l:
> > >>> > cvc-elt.1: Cannot find the declaration of element
> > >>> > 'wsdl:definitions'.
> > >>> >
> > >>> > [+] Verbose turned on
> > >>> >
> > >>> > org.apache.cxf.tools.common.ToolException:
> > >>> > line 8 column 56 of
> > >>>
> > >>

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 List 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.
> >
> >  > bindingUri=" http://apache.org/cxf/binding/http";
> > address="/cxf/CollectiveServices" >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> >
> > 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


ArrayOfAnyType (ping to Dan)

2007-07-30 Thread Benson Margulies
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:



From: 

@WebMethod
public abstract List 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?



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:
> >
> > 
> >
> > From:
> >
> > @WebMethod
> > public abstract List 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


Aegis vs. jaxws:endpoint

2007-07-30 Thread Benson Margulies
Could some kind soul tell me how to modify this to use Aegis instead of
jaxb?

Also, has anyone got a recipe to get Eclipse and Spring to look at the
CXF included bean definitions?




RE: Aegis vs. jaxws:endpoint

2007-07-30 Thread Benson Margulies
I answered my own question, and this might help someone else ...



   
   
 
 
   
   



  




> -Original Message-
> From: Benson Margulies [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 30, 2007 7:01 PM
> To: cxf-user@incubator.apache.org
> Subject: Aegis vs. jaxws:endpoint
> 
> Could some kind soul tell me how to modify this to use Aegis instead
of
> jaxb?
> 
> Also, has anyone got a recipe to get Eclipse and Spring to look at the
> CXF included bean definitions?
> 
>  id="index_service_endpoint"
> implementor="#index_service"
> address="/NameIndex" />


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 _._

 



bean stalks

2007-08-01 Thread Benson Margulies
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: 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 
 some verbose description
 

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.


 
   
 
 
   
   










 
   
  
  



> -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: 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?
> >
> >
> >
> >
> >
> >
> >


RE: Should schema location URLs be valid?

2007-08-02 Thread Benson Margulies
Yes, but not all XML editors participate in this sort of thing -- in
particular, try to get one to look inside a JAR file.

In my rather quirky opinion, if you use a URL, it should be a working
URL. The stuff in the JAR is an optimization.

If you don't want to have a working URL, use a URI instead.

In particular, I've has some bad experiences with Java tools that give
very mysterious errors when they try to touch a URL and get an error
code.

> -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?
> >
> >
> >
> >
> >
> >
> >


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
> > > > unavaila

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.


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.(DefaultTypeM
appingRegistry.java:153)
at
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.(DefaultTypeM
appingRegistry.java:143)
at
org.apache.cxf.aegis.databinding.AegisDatabinding.(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)
at
org.springf

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.(DefaultTypeM
> appingRegistry.java:153)
>   at
>
org.apache.cxf.aegis.type.DefaultTypeMappingRegistry.(DefaultTypeM
> appingRegistry.java:143)
>   at
>
org.apache.cxf.aegis.databinding.AegisDatabinding.(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

schema choice elements

2007-08-17 Thread Benson Margulies
Hi,

 

If I wsdl2java  with a schema with a 'choice' element, what shows up in
the Java code? I know, I could try an experiment, but I imagine that
someone reading this could tell me in 20 seconds or so.

 

--benson

 



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:
> > >>
> > >>  > >>  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";>
> > >>  
> > >>  http://soa.centerra.de/ns/is/kbform/";>
> > >>  
> > >>  -101
> > >>  
> > >>  Error in EDPEditor: Kann Button
nicht
> drücken
> > >>  bstart(0); nested exception is
> > >>
>   de.abas.ceks.jedp.CantChangeFieldValException: Kann
> > >>  Button nicht drücken
bstart(0)
> > >>  
> > >>  
> > >>  
> > >>  
> > >>  
> > >>  
> > >> 
> > >>
> > >> If you modify the response to:
> > >>
> > >> ...
> > >>  > >> xmlns:nsi="http://soa.centerra.de/ns/is/kbform/";> ...
> > >> 
> > >> ...
> > >>
> > >> 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


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

2007-08-17 Thread Benson Margulies
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]
> 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: 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

 



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(Class 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 Set 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 

 

   Map, 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: SOAPBinding Use.ENCODED ?

2007-08-22 Thread Benson Margulies
CXF doesn't support Encoded.

> -Original Message-
> From: Chris Campbell [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 22, 2007 5:22 PM
> To: cxf-user@incubator.apache.org
> Subject: SOAPBinding Use.ENCODED ?
> 
> I need encoded response, since some of my data has "Illegal
> character (NULL, unicode 0) encountered"
> 
> I added
> 
> @SOAPBinding(style=Style.RPC, use=Use.ENCODED)
> 
> to my service interface, but the generated wsdl has use=literal, for
> example
> 
> 
> 
>   
> http://query.soap.quaris.com/"; use="literal"/>
> 
>   
> http://query.soap.quaris.com/"; use="literal"/>
> 
> 
> 
> Am I missing something?
> 
> Thanks.
> 



RE: choice versus map

2007-08-24 Thread Benson Margulies
We've decided to just maintain a 'union' class that has get methods for
all the possible items that can get into the map.

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 24, 2007 1:11 PM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: choice versus map
> 
> 
> With JAX-WS 2.0, I don't think theres a "clean" way to do this.   You
> could do something like:
> 
> Object getAnnotation(String classOfAnnotation);
> 
> and on the client side, provide a utility like:
> 
> public T getAnnotation(Class classOfAnnotation) {
> return classOfAnnotation.cast(
>  service.getAnnotation(classOfAnnotation.getName());
> );
> }
> 
> That kind of sucks though.With JAX-WS 2.1, you MIGHT be able to
use
> the @XmlJavaTypeAdapter annotation on the Class parameter to map it to
a
> String in the wsdl to do much of that automatically.   To do that with
> 2.0 would require you to use wrapped doc/lit and to write
> a "GetAnnotationRequest" class that hadd the @XmlJavaTypeAdapter on
> the "classOfAnnotation" property.
> 
> 
> The other issue you will run into is getting all the possible types of
>  into the JAXB contexts so that they can be marshalled.   The
> jaxb.index files can come in there as well as the spring
configurations
> for the JAXB databindings and such.
> 
> 
> Dan
> 
> 
> On Tuesday 21 August 2007, Benson Margulies wrote:
> > 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(Class 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 Set 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
> >
> >
> >
> >Map, 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?
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


RE: Aegis binding and property/fiels removal

2007-08-27 Thread Benson Margulies
I tried something like this once in an effort to take control of
namespace prefix selection. I failed. However, it looks here as if the
protocol facilitates what you want here, unlike (sadly) what I wanted.

> -Original Message-
> From: Dan Diephouse [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 27, 2007 1:23 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis binding and property/fiels removal
> 
> Hi Guillaume
> 
> This is a little bit tricky, but doable I think.
> 
> Step 1: Write your own TypeCreator which initializes a MyBeanType with
> your
> own BeanTypeInfo. BeanTypeInfos provides metadata about how to map
beans
> to
> xml.
> 
> public class MyTypeCreator extends DefaultTypeCreator {
> @Override
> public Type createDefaultType(TypeClassInfo info) {
> MyBeanType type = new MyBeanType();
> type.setSchemaType(createQName(info.getTypeClass()));
> type.setTypeClass(info.getTypeClass());
> type.setTypeMapping(getTypeMapping());
> 
> BeanTypeInfo typeInfo = type.getTypeInfo();
> typeInfo.setDefaultMinOccurs
> (getConfiguration().getDefaultMinOccurs());
> typeInfo.setExtensibleAttributes
> (getConfiguration().isDefaultExtensibleAttributes());
> typeInfo.setExtensibleElements
> (getConfiguration().isDefaultExtensibleElements());
> 
> return type;
> }
> }
> Step 2: Write the MyBeanType class which creates a MyBeanTypeInfo:
> 
> public class MyBeanType extends BeanType {
> 
> public BeanTypeInfo createTypeInfo() {
> MyBeanTypeInfo inf = new MyBeanTypeInfo(getTypeClass(),
> getSchemaType().getNamespaceURI());
> 
> inf.setTypeMapping(getTypeMapping());
> 
> return inf;
> }
> }
> 
> Step3: Write a MyBeanTypeInfo:
> 
> public class MyBeanTypeInfo extends BeanTypeInfo {
> ... write constructors
> 
> protected boolean isElement(PropertyDescriptor desc) {
>   // add some custom logic to determine if you want this property
to
> be
> mapped
>   return true;
> }
> }
> 
> Step 4: Write your own type registry to return your own TypeCreator
> 
> public class MyTypeMappingRegistry extends DefaultTypeMappingRegistry
{
> 
> protected AbstractTypeCreator createDefaultTypeCreator() {
> AbstractTypeCreator creator = new MyTypeCreator();
> creator.setConfiguration(getConfiguration());
> return creator;
> }
> }
> 
> Step 5: use it:
> 
> ServerFactoryBean sfb = new ServerFactoryBean();
> 
> AegisDatabinding db = new AegisDataBinding();
> db.setTypeMappingRegistry(new MyTypeMappingRegistry());
> sfb.setDatabinding(db);
> ...
> 
> Hope that works for you!
> 
> - Dan
> 
> On 8/27/07, tog <[EMAIL PROTECTED]> wrote:
> >
> > Hiya
> >
> > I have some automatically generated classes that I use to generate a
> > server
> > using Aegis. This is done programmaticaly. I am using an
> > AegisServiceConfiguration class to avoid publishing methods that I
want
> to
> > remove. I would like similarly to remove some fields/properties from
the
> > serialization process.
> > How is that possible (programmaticaly) ?
> >
> > Thanks for your help.
> >
> > Guillaume
> >


thread safety

2007-08-30 Thread Benson Margulies
The question about thread pools leads me to ask a dumb question:
definitionally, are SEI classes required to be reentrant? It seems from
this thread that the default behavior includes entry in multiple jetty
threads.


wsdl2java and faults

2007-08-30 Thread Benson Margulies
The objects generated by wsdl2java for faults seem unnecessarily clumsy.

 

I get a POJO + annotations that corresponds to the fault type. Call it
'X'.

 

Then I get XFault.

 

To construct an XFault over a Throwable, I need to provide a message ---

 

(String message, X x, Throwable cause)

 

Could there not be no-message constructor? All the information I want to
transmit is inside the x object.

 

 

 

 



followup on threads

2007-08-30 Thread Benson Margulies
This is perhaps really a spring question, but the readers of this list
must have hit this before.

 

SEI classes are reentrant.

 

CXF services are frequently deployed in Spring and constructed with
Spring-managed beans.

 

Spring doesn't seem to offer much in the multithreading department.

 

To be a bit more concrete, consider an SEI class that is handed a set of
supporting beans via IoC. If those objects are reentrant themselves,
well, life is good. What if they are not?

 

The SEI can synchronize and single-thread their use. Effective, but not
popular when trying to achieve high usage of multiple processors.

 

Or, we could abandon IoC here, and let the SEI make Spring calls to
obtain new instances of the beans (declaring them appropriately) and
stash them in thread local storage. 

 

This would work best if CXF was keeping some sort of pool of SEI's
around to go with the threads, and I haven't researched that yet.

 

It seems a shame to have to decorate the SEI class with a bunch of
spring interactions. I suppose that a trick could be had: an
intermediate bean that served as a factory for the non-thread-safe
objects, and which hid the interactions with the IoC container inside of
itself.

 

 

 



RE: wsdl2java and faults

2007-08-30 Thread Benson Margulies
I was hoping for one more constructor on the exception object


FaultException(FaultObject, Throwable);

If that's not consistent with the standard, then I won't waste
everyone's time with a JIRA. It would never be something important.

> -Original Message-
> From: James Mao [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 30, 2007 10:43 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: wsdl2java and faults
> 
> Hi,
> 
> The artifacts generated by wsdl2java is JAX-WS 2.0 compliant, so
> everything generated by the tool is defined in the spec.
> Not really know the exact request here.
> Do you mind send your sample wsdl, and tell us what kind of artifacts
> you're looking for
> 
> If there's bug to fix or improvements we can make, you are welcomed to
> file jira on https://issues.apache.org/jira/browse/CXF
> 
> Regards,
> James
> 
> > The objects generated by wsdl2java for faults seem unnecessarily
clumsy.
> >
> >
> >
> > I get a POJO + annotations that corresponds to the fault type. Call
it
> > 'X'.
> >
> >
> >
> > Then I get XFault.
> >
> >
> >
> > To construct an XFault over a Throwable, I need to provide a message
---
> >
> >
> >
> > (String message, X x, Throwable cause)
> >
> >
> >
> > Could there not be no-message constructor? All the information I
want to
> > transmit is inside the x object.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >


Troubles with namespaces

2007-08-31 Thread Benson Margulies
2.0.1 seems to have regressed some of the problems we've seen with
mis-assignment of namespaces when combining JAX-WS and Aegis. Please
see:

 

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

 



RE: wsdl2java and faults

2007-08-31 Thread Benson Margulies
I was feeling somewhat overwhelmed by three copies of the same string.
My fault object was designed to carry the contents of a java exception,
and then I have to come up with that string, and then I pass the
throwable and get the contents again.

I think we should just write this up to my being cranky at 11pm.

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 31, 2007 12:13 PM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: wsdl2java and faults
> 
> 
> Benson,
> 
> The "message" parameter is used to set the "faultString" element in
the
> on the wire fault.It should be set to something useful.   That
said,
> I THINK we could add a constructor that doesn't have it, you would
just
> get some default behavior in the faultString. (whatever the default
> Exception.getMessage() returns, I think the class name?)
> 
> Feel free to log a bug request.  (and a patch would be nice too ;-)
> 
> Dan
> 
> On Thursday 30 August 2007, Benson Margulies wrote:
> > I was hoping for one more constructor on the exception object
> >
> >
> > FaultException(FaultObject, Throwable);
> >
> > If that's not consistent with the standard, then I won't waste
> > everyone's time with a JIRA. It would never be something important.
> >
> > > -Original Message-
> > > From: James Mao [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 30, 2007 10:43 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: wsdl2java and faults
> > >
> > > Hi,
> > >
> > > The artifacts generated by wsdl2java is JAX-WS 2.0 compliant, so
> > > everything generated by the tool is defined in the spec.
> > > Not really know the exact request here.
> > > Do you mind send your sample wsdl, and tell us what kind of
> > > artifacts you're looking for
> > >
> > > If there's bug to fix or improvements we can make, you are
welcomed
> > > to file jira on https://issues.apache.org/jira/browse/CXF
> > >
> > > Regards,
> > > James
> > >
> > > > The objects generated by wsdl2java for faults seem unnecessarily
> >
> > clumsy.
> >
> > > > I get a POJO + annotations that corresponds to the fault type.
> > > > Call
> >
> > it
> >
> > > > 'X'.
> > > >
> > > >
> > > >
> > > > Then I get XFault.
> > > >
> > > >
> > > >
> > > > To construct an XFault over a Throwable, I need to provide a
> > > > message
> >
> > ---
> >
> > > > (String message, X x, Throwable cause)
> > > >
> > > >
> > > >
> > > > Could there not be no-message constructor? All the information I
> >
> > want to
> >
> > > > transmit is inside the x object.
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


RE: followup on threads

2007-08-31 Thread Benson Margulies
Can I sell you a patch to introduce 1.5 generics in place of Object
(semi-serious)? This looks very interesting, thanks.

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 31, 2007 12:05 PM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: followup on threads
> 
> 
> Benson,
> 
> The jaxws:server/endpoint elements in the spring config do allow for a
> custom "invoker" bean.  (implements our Invoker interface)   You could
> write a custom invoker that pools instances, assigns them per thread,
> etc... On trunk, I just added a method to our base invoker class that
we
> use (AbstractInvoker) that could make it easier.   For jaxws, you
could
> subclass the JAXWSMethodInvoker and override the two methods:
> 
> public abstract Object getServiceObject(final Exchange context);
> public void releaseServiceObject(final Exchange context, Object
obj);
> 
> to do whatever book keeping you need.
> 
> Dan
> 
> On Thursday 30 August 2007, Benson Margulies wrote:
> > This is perhaps really a spring question, but the readers of this
list
> > must have hit this before.
> >
> >
> >
> > SEI classes are reentrant.
> >
> >
> >
> > CXF services are frequently deployed in Spring and constructed with
> > Spring-managed beans.
> >
> >
> >
> > Spring doesn't seem to offer much in the multithreading department.
> >
> >
> >
> > To be a bit more concrete, consider an SEI class that is handed a
set
> > of supporting beans via IoC. If those objects are reentrant
> > themselves, well, life is good. What if they are not?
> >
> >
> >
> > The SEI can synchronize and single-thread their use. Effective, but
> > not popular when trying to achieve high usage of multiple
processors.
> >
> >
> >
> > Or, we could abandon IoC here, and let the SEI make Spring calls to
> > obtain new instances of the beans (declaring them appropriately) and
> > stash them in thread local storage.
> >
> >
> >
> > This would work best if CXF was keeping some sort of pool of SEI's
> > around to go with the threads, and I haven't researched that yet.
> >
> >
> >
> > It seems a shame to have to decorate the SEI class with a bunch of
> > spring interactions. I suppose that a trick could be had: an
> > intermediate bean that served as a factory for the non-thread-safe
> > objects, and which hid the interactions with the IoC container
inside
> > of itself.
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


Please review and commit patch to cxf-959

2007-09-04 Thread Benson Margulies
This patch consists of installing the namespace map into the XmlSchema
object. Apparently, the author of AegisDatabinding thought that the
commons code would do this sensible thing for itself.

 

I would be most grateful for a snapshot with this fix in it.

 

I did not propose any change to target namespace handling. I'll open a
separate JIRA since I'm not sure what is right.

 

The patch does not include the test case. That's new files, which is
more complex.

 



RE: Please review and commit patch to cxf-959

2007-09-04 Thread Benson Margulies
Dan,

Whoops. I'm sorry. That was stupid of me not to rerun the full
regression. I apologize.

I will be preparing a patch adding my test case as penance.

--benson


> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 04, 2007 1:37 PM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: Please review and commit patch to cxf-959
> 
> 
> Benson,
> 
> On Tuesday 04 September 2007, Benson Margulies wrote:
> > This patch consists of installing the namespace map into the
XmlSchema
> > object. Apparently, the author of AegisDatabinding thought that the
> > commons code would do this sensible thing for itself.
> 
> I've applied the patch and committed it.   I'll try and get a snapshot
up
> later tonight.
> 
> One note for the future though:  the patch ended up breaking a couple
of
> unit tests in the aegis databinding.   The patch should have also
> included fixes for those tests.   I went ahead and fixed the tests.
> 
> 
> 
> > I would be most grateful for a snapshot with this fix in it.
> >
> >
> >
> > I did not propose any change to target namespace handling. I'll open
a
> > separate JIRA since I'm not sure what is right.
> >
> >
> >
> > The patch does not include the test case. That's new files, which is
> > more complex.
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


RE: Aegis and JAXB-WS

2007-09-05 Thread Benson Margulies
Let's open a JIRA that CXF should create a TNS prefix and use it.

> -Original Message-
> From: Glen Mazza [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 05, 2007 12:08 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis and JAXB-WS
> 
> I'm not sure, but:
> 
> 1.) If you reverse the order of "ArrayOfBook" and "Book" in your WSDL
> (see below), that might fix the problem, because the former is
> referencing the latter, so the latter would need to be listed first I
> believe.
> 
> 2.) I think that ArrayOfBook is meant to reference the book type below
> it, so your prefix is wrong--"ns1" refers to your "DefaultNamespace"
URI
> you have listed, but the tns of the schema is "type.acme.com".
> 
> 3.) I think your top-level prefix of "ns1" should be "tns" for
> readability, because ns1's URI is the WSDL's target namespace.
> 
> HTH,
> Glen
> 
> http://www.w3.org/2001/XMLSchema";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://type.acme.com";>
> 
> 
> 
>  type="ns1:Book"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> > Hiya
> >
> > I have a server based on the Aegis binding. I connect to that server
> > using the dynamic client (JAXB). I get the following exception
during
> > the compilation phase of the schema.
> >
> > Is that a problem already known and similar to the one reported by
> > Benson ?
> >
> > I also attached the wsdl.
> >
> > Cheers
> > Guillaume
> >
> > java.lang.RuntimeException: Error compiling schema from WSDL at
> > {http://localhost:6981/BookService?wsdl}: undefined simple or
complex
> > type 'ns1:Book'
> > at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > $InnerErrorListener.error(DynamicClientFactory.java:409)
> > at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > (SchemaCompilerImpl.java:264)
> > at
> >
>
com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.jav
a:
> 61)
> > at com.sun.xml.xsom.impl.parser.ParserContext
> > $2.error(ParserContext.java:156)
> > at com.sun.xml.xsom.impl.parser.ParserContext
> > $1.reportError(ParserContext.java:134)
> > at
> >
>
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.jav
a:
> 131)
> > at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > (DelayedRef.java:90)
> > at
> > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
> > at
> >
>
com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:
94)
> > at com.sun.xml.xsom.parser.XSOMParser.getResult
> > (XSOMParser.java:190)
> > at
> > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> > at
> >
>
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImp
l.
> java:216)
> > at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > (SchemaCompilerImpl.java:69)
> > at
> >
>
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
cC
> lientFactory.java:166)
> > at
> >
>
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
cC
> lientFactory.java :137)
> >
> >
> > --
> >
> > Best Regards
> > Guillaume



RE: Aegis and JAXB-WS

2007-09-05 Thread Benson Margulies
I'm changing the subject, sorry. I happened to notice yesterday that
when it *is* CXF that generates, it lets targetNamespace items fall into
ns1.

> -Original Message-
> From: Glen Mazza [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 05, 2007 1:16 PM
> To: cxf-user@incubator.apache.org
> Subject: RE: Aegis and JAXB-WS
> 
> I don't think so; AFAICT this is a WSDL that *he* created manually,
no?
> 
> Glen
> 
> Am Mittwoch, den 05.09.2007, 13:01 -0400 schrieb Benson Margulies:
> > Let's open a JIRA that CXF should create a TNS prefix and use it.
> >
> > > -Original Message-
> > > From: Glen Mazza [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, September 05, 2007 12:08 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Re: Aegis and JAXB-WS
> > >
> > > I'm not sure, but:
> > >
> > > 1.) If you reverse the order of "ArrayOfBook" and "Book" in your
WSDL
> > > (see below), that might fix the problem, because the former is
> > > referencing the latter, so the latter would need to be listed
first I
> > > believe.
> > >
> > > 2.) I think that ArrayOfBook is meant to reference the book type
below
> > > it, so your prefix is wrong--"ns1" refers to your
"DefaultNamespace"
> > URI
> > > you have listed, but the tns of the schema is "type.acme.com".
> > >
> > > 3.) I think your top-level prefix of "ns1" should be "tns" for
> > > readability, because ns1's URI is the WSDL's target namespace.
> > >
> > > HTH,
> > > Glen
> > >
> > > http://www.w3.org/2001/XMLSchema";
> > > attributeFormDefault="qualified" elementFormDefault="qualified"
> > > targetNamespace="http://type.acme.com";>
> > >
> > > 
> > > 
> > >  > nillable="true"
> > > type="ns1:Book"/>
> > > 
> > > 
> > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> > > 
> > >
> > >
> > > Am Mittwoch, den 05.09.2007, 17:10 +0200 schrieb tog:
> > > > Hiya
> > > >
> > > > I have a server based on the Aegis binding. I connect to that
server
> > > > using the dynamic client (JAXB). I get the following exception
> > during
> > > > the compilation phase of the schema.
> > > >
> > > > Is that a problem already known and similar to the one reported
by
> > > > Benson ?
> > > >
> > > > I also attached the wsdl.
> > > >
> > > > Cheers
> > > > Guillaume
> > > >
> > > > java.lang.RuntimeException: Error compiling schema from WSDL at
> > > > {http://localhost:6981/BookService?wsdl}: undefined simple or
> > complex
> > > > type 'ns1:Book'
> > > > at org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> > > > $InnerErrorListener.error(DynamicClientFactory.java:409)
> > > > at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error
> > > > (SchemaCompilerImpl.java:264)
> > > > at
> > > >
> > >
> >
com.sun.tools.xjc.util.ErrorReceiverFilter.error(ErrorReceiverFilter.jav
> > a:
> > > 61)
> > > > at com.sun.xml.xsom.impl.parser.ParserContext
> > > > $2.error(ParserContext.java:156)
> > > > at com.sun.xml.xsom.impl.parser.ParserContext
> > > > $1.reportError(ParserContext.java:134)
> > > > at
> > > >
> > >
> >
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.reportError(NGCCRuntimeEx.jav
> > a:
> > > 131)
> > > > at com.sun.xml.xsom.impl.parser.DelayedRef.resolve
> > > > (DelayedRef.java:90)
> > > > at
> > > > com.sun.xml.xsom.impl.parser.DelayedRef.run(DelayedRef.java:65)
> > > > at
> > > >
> > >
> >
com.sun.xml.xsom.impl.parser.ParserContext.getResult(ParserContext.java:
> > 94)
> > > > at com.sun.xml.xsom.parser.XSOMParser.getResult
> > > > (XSOMParser.java:190)
> > > > at
> > > > com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:500)
> > > > at
> > > >
> > >
> >
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImp
> > l.
> > > java:216)
> > > > at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind
> > > > (SchemaCompilerImpl.java:69)
> > > > at
> > > >
> > >
> >
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> > cC
> > > lientFactory.java:166)
> > > > at
> > > >
> > >
> >
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dynami
> > cC
> > > lientFactory.java :137)
> > > >
> > > >
> > > > --
> > > >
> > > > Best Regards
> > > > Guillaume
> >



RE: Aegis and JAXB-WS

2007-09-05 Thread Benson Margulies
I'll do it, and I promise to run the tests :-)

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 05, 2007 5:51 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis and JAXB-WS
> 
> 
> This actually wouldn't be hard to do if someone wants to pick it up.
> There are only three places that we create XmlSchema objects:
> 
> 1) AegisDatabinding.java - around line 268 add a
> e.addNamespaceDeclaration(...) call
> 
> 2) ReflectionServiceFactoryBean - in getOrCreateSchema add a tns to
the
> nsMap.
> 
> 3) JAXBSchemaInitializer - in createBridgeXsElement and
> buildExceptionType, add tns to the nsMap.
> 
> There are probably a BUNCH of unit tests that would then also need to
be
> updated.   Tests that do xpath asserts will need to be adjusted,
etc
> 
> Dan
> 
> 
> On Wednesday 05 September 2007, Glen Mazza wrote:
> > OK, I would agree then, "tns" is indeed more readable than "ns1" for
> > the target namespace.
> >
> > Glen
> >
> > Am Mittwoch, den 05.09.2007, 13:18 -0400 schrieb Benson Margulies:
> > > I'm changing the subject, sorry. I happened to notice yesterday
that
> > > when it *is* CXF that generates, it lets targetNamespace items
fall
> > > into ns1.
> > >
> 
> 
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


Does CXF support package-info.aegis.xml?

2007-09-07 Thread Benson Margulies
Does CXF look for package-info.aegis.xml for namespace? If not, is
anyone opposed to having it do so?



RE: returning tabular data from a webmethod

2007-09-07 Thread Benson Margulies
I thought 2.0.1 was good enough. Could you please send more details? Are
you using the CXF wsdl2java or someone elses? What error do you get?

> -Original Message-
> From: Drew Hite [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 07, 2007 9:26 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: returning tabular data from a webmethod
> 
> 2.0.1.  Do you recommend moving to a snapshot build?
> 
> On 9/7/07, Benson Margulies <[EMAIL PROTECTED]> wrote:
> >
> > What version do you have? Nested arrays were not feeling too swift
in
> > 2.0.
> >
> > > -Original Message-
> > > From: Drew Hite [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, September 07, 2007 9:07 AM
> > > To: cxf-user@incubator.apache.org
> > > Subject: returning tabular data from a webmethod
> > >
> > > Hello,
> > > I started using CXF a few days ago, and I'm trying to implement a
> > "Java
> > > first" web service.  I created the web service in the "Spring way"
as
> > > outlined here:
> > >
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
> > and I
> > > generated the client using WSDL2Java.  I would like one of the
methods
> > to
> > > return data in a manner similar to java.sql.Resultset with rows
and
> > > columns.  I've tried making the return type String[][] and also
> > > List, but in both instances I get errors when I test
using
> > the
> > > WSDL2Java generated proxies. Delimiting each column with a special
> > > character
> > > like a pipe and returning a String[] does work, but I would like
to
> > return
> > > the data in a more structured format.  Is there a tried and true
way
> > for
> > > returning data returned from a database query for a CXF web
service?
> > >
> > > Thanks,
> > > Drew
> >


RE: returning tabular data from a webmethod

2007-09-07 Thread Benson Margulies
What version do you have? Nested arrays were not feeling too swift in
2.0.

> -Original Message-
> From: Drew Hite [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 07, 2007 9:07 AM
> To: cxf-user@incubator.apache.org
> Subject: returning tabular data from a webmethod
> 
> Hello,
> I started using CXF a few days ago, and I'm trying to implement a
"Java
> first" web service.  I created the web service in the "Spring way" as
> outlined here:
> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
and I
> generated the client using WSDL2Java.  I would like one of the methods
to
> return data in a manner similar to java.sql.Resultset with rows and
> columns.  I've tried making the return type String[][] and also
> List, but in both instances I get errors when I test using
the
> WSDL2Java generated proxies. Delimiting each column with a special
> character
> like a pipe and returning a String[] does work, but I would like to
return
> the data in a more structured format.  Is there a tried and true way
for
> returning data returned from a database query for a CXF web service?
> 
> Thanks,
> Drew


RE: Aegis mappings not reflecting in wsdl method parameters

2007-09-10 Thread Benson Margulies
Could you post a JIRA with an entire test case, by some chance? If so,
I'll look for the fix.

> -Original Message-
> From: Tawfik [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 10, 2007 4:22 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Aegis mappings not reflecting in wsdl method parameters
> 
> 
> Has anyone see anything relating to this issue?  We are trying to
migrate
> from xfire to cxf but will not be able to unless we find a way to get
this
> working.  Our main concern is the minoccurs for method parameters, we
> cannot
> have is set to 0 in the wsdl.  Did the default change from 1 in xfire
to 0
> in cxf?
> 
> I would appreciate ANY help to move forward.
> 
> Thanks
> 
> 
> Tawfik wrote:
> >
> >
> >
> > Tawfik wrote:
> >>
> >> I am trying to migrate from xfire to cxf but need to re-use the
aegis
> >> mapping files we already have. I have tried using both the simple
> >> frontend and the jax-ws front end but I get the same problem. Here
is
> my
> >> config:
> >>
> >> http://www.springframework.org/schema/beans";
> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >> xmlns:simple="http://cxf.apache.org/simple";
> >> xsi:schemaLocation="http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans.xsd
> >> http://cxf.apache.org/simple
http://cxf.apache.org/schemas/simple.xsd";>
> >>
> >> 
> >> 
> >> 
> >> 
> >>
> >> >> address="/SpatialQuery">
> >>   
> >>   class="org.apache.cxf.aegis.databinding.AegisDatabinding"
> >> />
> >>   
> >>   
> >>  
> >>   
> >>   
> >>
> >> 
> >>
> >> The aegis mapping files are taking effect for the object model and
the
> >> schema for all objects look as they should. The problem is limited
to
> >> method parameters. What I get in the wsdl for one of the methods
looks
> >> like this:
> >>
> >> 
> >>  
> >>   
> >>   
> >>   
> >>   
> >>   
> >>
> >> but it should be (based on the aegis mapping files and the wsdl
from
> >> xfire with those same mapping files):
> >>
> >> 
> >>  
> >>  
> >>nillable="true"
> >> type="tns:Envelope" />
> >>>> nillable="true" type="tns:SpatialQueryOptions" />
> >>>> type="xsd:string" />
> >>   
> >>   
> >>
> >> Note that I do see that the mapping file for the service is being
read
> >> but it is just not reflecting on the wsdl:
> >> [01 Sep 07 09:35:25][main XMLTypeCreator DEBUG][getDocument:112]
Found
> >> mapping file : /ISpatialQuery.aegis.xml
> >>
> >> Any help is appriciated
> >>
> >> Thanks
> >>
> >>
> >
> >
> 
> --
> View this message in context:
http://www.nabble.com/Aegis-mappings-not-
> reflecting-in-wsdl-method-parameters-tf4388442.html#a12602039
> Sent from the cxf-user mailing list archive at Nabble.com.



RE: Can't figure out why I'm getting this error or how to troubleshoot it

2007-09-10 Thread Benson Margulies
The service you are talking to is very unhappy with you. Can you get a
trace of the message traffic?

> -Original Message-
> From: Ryan Moquin [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 10, 2007 7:59 PM
> To: cxf-user@incubator.apache.org
> Subject: Can't figure out why I'm getting this error or how to
> troubleshoot it
> 
> I've been trying to use the generated files from my WSDL to access an
> external webservice that uses SSL and authentication.  I setup an
> http-conduit (I was getting the protocol error when I didn't have it
setup)
> for SSL and now I get the following error, anyone have any ideas what
I
> can
> do from here?:
> 
> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:169)
> at $Proxy101.sendNotification(Unknown Source)
> at service.NotificationServiceClient.sendNotification(
> NotificationServiceClient.java:88)
> at service.NotificationServiceClientTest.testSendNotification(
> NotificationServiceClientTest.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> :552)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> at
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> :114)
> at org.testng.TestRunner.privateRun(TestRunner.java:693)
> at org.testng.TestRunner.run(TestRunner.java:574)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> at
org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> TestNGExecutor.java:64)
> at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:75)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.run(
> SurefireBooter.java:139)
> at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> SurefirePlugin.java:376)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
> at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
yc
> le
> (DefaultLifecycleExecutor.java:480
> )
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
> at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Fa
> ilures
> (DefaultLifecycleExecutor.java
> :311)
> at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
> at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
> at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> at java.util.ArrayList.get(ArrayList.java:321)
> at org.apache.cxf.message.MessageContentsList.get(
>

RE: Can't figure out why I'm getting this error or how to troubleshoot it

2007-09-10 Thread Benson Margulies
http://cwiki.apache.org/CXF20DOC/debugging.html

> -Original Message-
> From: Ryan Moquin [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 10, 2007 7:59 PM
> To: cxf-user@incubator.apache.org
> Subject: Can't figure out why I'm getting this error or how to
> troubleshoot it
> 
> I've been trying to use the generated files from my WSDL to access an
> external webservice that uses SSL and authentication.  I setup an
> http-conduit (I was getting the protocol error when I didn't have it
setup)
> for SSL and now I get the following error, anyone have any ideas what
I
> can
> do from here?:
> 
> javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> JaxWsClientProxy.java:169)
> at $Proxy101.sendNotification(Unknown Source)
> at service.NotificationServiceClient.sendNotification(
> NotificationServiceClient.java:88)
> at service.NotificationServiceClientTest.testSendNotification(
> NotificationServiceClientTest.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> :552)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> at
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> :114)
> at org.testng.TestRunner.privateRun(TestRunner.java:693)
> at org.testng.TestRunner.run(TestRunner.java:574)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> at
org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> TestNGExecutor.java:64)
> at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> TestNGXmlTestSuite.java:75)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
> at org.apache.maven.surefire.booter.SurefireBooter.run(
> SurefireBooter.java:139)
> at org.apache.maven.plugin.surefire.SurefirePlugin.execute(
> SurefirePlugin.java:376)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
> at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
yc
> le
> (DefaultLifecycleExecutor.java:480
> )
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
> at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Fa
> ilures
> (DefaultLifecycleExecutor.java
> :311)
> at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
> at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java:143)
> at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java
> :430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.RangeCheck(ArrayList.java:546)
> at java.util.ArrayList.get(ArrayList.java:321)
> at org.apache.cxf.message.MessageContentsList.get(
> MessageContentsList.java:76)
> at
>
org.apac

RE: Can't figure out why I'm getting this error or how to troubleshoot it

2007-09-10 Thread Benson Margulies
If it really is never talking to the server (which would be really
surprising) then you should be able to create a standalone test case
that we could debug into?

> -Original Message-
> From: Ryan Moquin [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 10, 2007 8:39 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: Can't figure out why I'm getting this error or how to
> troubleshoot it
> 
> I tried and it appears that no request has been sent.  I used
TCPMonitor
> and
> changed the URL that my client was pointing to.  When I run the
client, no
> message comes across TCPMonitor and I still get the same error.  It
> appears
> that it's trying to do something with the headers when constructing
the
> SOAP
> message?  I was trying get a debug point to work in netbeans in order
to
> try
> to get an idea what CXF is trying to do at the time the exception
occurs,
> but so far I haven't had luck getting netbeans to make the association
to
> the source code so that the breakpoint is hit.
> 
> On 9/10/07, Benson Margulies <[EMAIL PROTECTED]> wrote:
> >
> > The service you are talking to is very unhappy with you. Can you get
a
> > trace of the message traffic?
> >
> > > -Original Message-
> > > From: Ryan Moquin [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, September 10, 2007 7:59 PM
> > > To: cxf-user@incubator.apache.org
> > > Subject: Can't figure out why I'm getting this error or how to
> > > troubleshoot it
> > >
> > > I've been trying to use the generated files from my WSDL to access
an
> > > external webservice that uses SSL and authentication.  I setup an
> > > http-conduit (I was getting the protocol error when I didn't have
it
> > setup)
> > > for SSL and now I get the following error, anyone have any ideas
what
> > I
> > > can
> > > do from here?:
> > >
> > > javax.xml.ws.soap.SOAPFaultException: Index: 1, Size: 1
> > > at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> > > JaxWsClientProxy.java:169)
> > > at $Proxy101.sendNotification(Unknown Source)
> > > at service.NotificationServiceClient.sendNotification(
> > > NotificationServiceClient.java:88)
> > > at
service.NotificationServiceClientTest.testSendNotification(
> > > NotificationServiceClientTest.java:62)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:39)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:25)
> > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > at
> > org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java
> > > :552)
> > > at
org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
> > > at
> > org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
> > > at
> > org.testng.internal.TestMethodWorker.run(TestMethodWorker.java
> > > :114)
> > > at org.testng.TestRunner.privateRun(TestRunner.java:693)
> > > at org.testng.TestRunner.run(TestRunner.java:574)
> > > at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
> > > at org.testng.SuiteRunner.run(SuiteRunner.java:145)
> > > at
org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
> > > at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
> > > at
> > org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(
> > > TestNGExecutor.java:64)
> > > at
> > org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(
> > > TestNGXmlTestSuite.java:75)
> > > at
org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:39)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:25)
> > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > at
> > >
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > > SurefireBooter.java:225)
> > > at org.apache.maven.surefire.booter.SurefireBooter.run(
> > > Sur

  1   2   3   4   5   >