Re: contract-first with only xsd

2007-09-18 Thread James Mao
moraleslos wrote: Hi-- Having gone through the Spring Web Services (SWS) manifesto about contract-first as well as their sample examples, I wonder how CXF matches up with SWS. I know that CXF allows contract-first development, but is it as simple as SWS? For example, with SWS, all I need to do

Re: Strange problem with wsdl2java

2007-09-18 Thread James Mao
Which version of cxf are you using? I would suggest try the 2.0.2 [1] If the problem still there, then, you should file an issue in jira, and mark the affected version as 2.0.2, and we will fix it for 2.1 Regards, James [1] http://people.apache.org/~dkulp/stage_cxf/2.0.2-incubator-take2/ I

Re: HashMap as parameter for web service call

2007-09-18 Thread James Mao
I can give you more information on this (you probably already know), in java2wsdl, if we detected there's java.util.Date, java.util.Calendar, we will generate the binding file automatically, so if you generate the stub from the generated wsdl and binding files, you got the DateAdapter already.

Re: HashMap as parameter for web service call

2007-09-18 Thread Willem Jiang
FYI , this blog shows you how to use HashMap in the JAXB. http://weblogs.java.net/blog/kohsuke/archive/2005/04/xmladapter_in_j.html Willem. James Mao wrote: Jaxb is quite plugable, you can use XmlTypeAdapter to marshal/unarshal to/from HashMap James HashMap is not supported by JAXB binding.

Re: HashMap as parameter for web service call

2007-09-18 Thread James Mao
Jaxb is quite plugable, you can use XmlTypeAdapter to marshal/unarshal to/from HashMap James HashMap is not supported by JAXB binding. More discussions about this can be found from http://www.nabble.com/DataBinding-problems-%28Timestamp-and-HashMap%29-using-JAXB-tf4283645.html#a12193877 Che

Re: Wsdl Versioning

2007-09-18 Thread Dave Kallstrom
I was wondering about that. I'll give that a shot tomorrow. Thanks a lot for the help. On 9/18/07, Liu, Jervis <[EMAIL PROTECTED]> wrote: > > Ok, I see the tricks. MultipleEndpointObserver only steps in when there > are more than one endpoint registered on the same address. > MultipleEndpointObser

Re: CXF+ACEGI

2007-09-18 Thread Willem Jiang
Hi Matt I did not see any url in your mail below :(. Could you send them again ? Willem. mattmadhavan wrote: Hello All, Please refer to this blog. Seems to be one of the most popular blog. Please look at the client code! (Test case). Any ideas? If some one has a complete ACEGI security solutio

RE: Wsdl Versioning

2007-09-18 Thread Liu, Jervis
Ok, I see the tricks. MultipleEndpointObserver only steps in when there are more than one endpoint registered on the same address. MultipleEndpointObserver is the one who initializes the endpoint set. So the config below works:

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread Benson Margulies
When I expanded an existing test case to send some data containing a map, it failed. See CXF-1036. I'm not 100% sure that I did the test case correctly, but I'm reasonably clear. More news as I get it. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday

RE: HashMap as parameter for web service call

2007-09-18 Thread Liu, Jervis
HashMap is not supported by JAXB binding. More discussions about this can be found from http://www.nabble.com/DataBinding-problems-%28Timestamp-and-HashMap%29-using-JAXB-tf4283645.html#a12193877 Cheers, Jervis > -Original Message- > From: Kaleb Walton [mailto:[EMAIL PROTECTED] > Sent: 2

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread Benson Margulies
Hmm. Let me check the inventory of test cases. > -Original Message- > From: kayteeem [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 18, 2007 8:55 PM > To: cxf-user@incubator.apache.org > Subject: RE: Map contains no data when returned from remote call - Aegis > databinding - empty Ma

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread Benson Margulies
Sorry, I wasn't clear. You only need the .aegis.xml if you don't like what Aegis comes up with on its own. It will come up with Something for a map. I'll look into what it does. > -Original Message- > From: kayteeem [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 18, 2007 8:54 PM > To

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread kayteeem
Forgot to add Ref to Aegis Mapping doc: http://xfire.codehaus.org/Mapping+collections kayteeem wrote: > > According to XFire Aegis docs (CXF doesn't contain the info yet, just a > reference to it) if you are using Java 5 & Generics you shouldn't need > .aegis.xml mapping files (only required fo

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread kayteeem
According to XFire Aegis docs (CXF doesn't contain the info yet, just a reference to it) if you are using Java 5 & Generics you shouldn't need .aegis.xml mapping files (only required for jdk1.4, but it may only apply to Collections section of doc) Does this not apply to java.util.Map? In other wo

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread Benson Margulies
Right, indeed, Aegis does \something/, and any other kit will consume the resulting XML Schema, we hope. But this only helps if you are willing to supplement or replace all your @'s with .aegis.xml files. > -Original Message- > From: kayteeem [mailto:[EMAIL PROTECTED] > Sent: Tuesday, Sept

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread kayteeem
Thanks for the reply. Yes JaxB definitely has issues with returning java.util.Map type. According to the Aegis databinding docs: it supports Maps, but doesn't seem to be working. "Aegis Supported Types" * Basic types: int, double, float, long, byte[], short, String, BigDecimal

RE: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread Benson Margulies
There is a complex question about how a Map can be represented in XML Schema. As I recall, in JAXB, the rather complex annotation for the purpose is only in 2.1, which CXF doesn't do yet. We switched from a Map to an explicit data structure to get around this. > -Original Message- > From:

Re: Map contains no data when returned from remote call - Aegis databinding - empty Map?

2007-09-18 Thread kayteeem
Searching through the forum, it seems that no-one else seems to have issues with returning java.util.Map. Is this true? Is anyone returning a Map from CXF with no issues? I think this is a known issue with BEA Weblogic 9.2 then, from there web site: "Weblogic Workshop 8.1 supported returning the

marshaling issue with empty, xsi:nil="true" arrays... ?

2007-09-18 Thread Brad Harper
I have a bean property which is a List that doesn't seem to be marshaling in correctly. When the array is empty in the soap request and xsi:nil="true", the List is being set with a single null item. Multiple items are passed in correctly. wsdl snippet: soap request snippet: bean snippet:

HashMap as parameter for web service call

2007-09-18 Thread Kaleb Walton
I cannot seem to get a HashMap to work as a parameter when making a web service call via PHP. Has anyone else experienced this? I want to encapsulate my parameters in a more complex object that extends HashMap. Regards, Kaleb

Re: Specifying an exception as a WebFault using Simple Server (simple:server)

2007-09-18 Thread Kaleb Walton
Ok got a bit further - this was in the debug logs: org.apache.cxf.interceptor.Fault: Marshalling Error: a.b.c.ServiceException is not known to this context At least that takes me one step further - if anyone has a quick answer I'd appreciate it. I'll post my solution when it's found. Regards, K

Specifying an exception as a WebFault using Simple Server (simple:server)

2007-09-18 Thread Kaleb Walton
Exceptions that I throw are not rendered as Fault's to web service clients even after specifying WebFault annotations on the Exception class. I can see the ServiceException in the WSDL but the methods themselves are just ignoring the fact that I'm throwing exceptions. Can anyone point me in the r

Re: Wsdl Versioning

2007-09-18 Thread Dave Kallstrom
And here is my cxf.xml file

Re: Wsdl Versioning

2007-09-18 Thread Dave Kallstrom
It is most likely my as I am not all that smart. Here is my cxf.xml file and my version interceptor.. I know that my interceptor is being called however the endpoint set is always null. public class VersionInterceptor extends AbstractEndpointSelectionInterceptor { public VersionInterceptor()

Using Client in WebApplication (JBoss)

2007-09-18 Thread Axel Becker
Hello, i wrote a small webapplikation to display some small webservice results. but on the first call i got these error javax.xml.ws.WebServiceException: Cannot create SAAJ factory instance. org.apache.cxf.jaxws.binding.soap.SOAPBindingImpl.getSOAPFactory(SOAPBindingImpl.java:118) org.

Sharing session with multiple services

2007-09-18 Thread John McLaughlin
Hi, I've just started to look at CXF, and have successfully managed to quickly develop/deploy. The scenario I have is that I will have multiple web services running in Tomcat, and I want to maintain a session across them. I'm defining the services using JAX-WS (newbie here too!) I can s

Strange problem with wsdl2java

2007-09-18 Thread Ryan Moquin
I decided to convert one of my servicemix services over to cxf which was working great on xfire. I added the cxf wsdl2java plugin for maven like this: org.apache.cxf cxf-codegen-plugin ${cxf-version} org.apache.cxf cxf-rt-bindin

Re: CXF without Spring?

2007-09-18 Thread bobbydole
Hello, I downloaded the latest snapshot, apache-cxf-2.1-incubator-20070918.014642-3, I'm still getting the same error: java.lang.NullPointerException at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpointInfo(AbstractEndpointFactory.java:172) at org.apache.cxf.frontend.

Re: CXF+ACEGI + Anybody out there?

2007-09-18 Thread Eric Miles
Actually, here is the code. Attached is the WSS4J callback class and the CXF interceptor that uses the Acegi authentication manager for authentication. Pretty simple and straight forward. If you look at the callback handler, you can see my comment regarding the WSS4J engine. I do have one conce

Re: CXF+ACEGI + Anybody out there?

2007-09-18 Thread Eric Miles
It was a bit of extra coding, as there is some dis join between what WS-Security wants to do and what Acegi wants to do (at least for UsernameToken authentication). We also have a business requirement due to some legacy data setup that proved to be problematic with WSS4J. WSS4J wants you to retur

Re: CXF+ACEGI + Anybody out there?

2007-09-18 Thread mattmadhavan
Eric, Do you mind posting a complete example. May be we can have a very constructive discussions based on that. Thanks Matt BigEHokie wrote: > > Dan, > > What sort of solution are you looking for? We are using an > Acegi/Spring/CXF implementation at our company where we are using > WS-Sec

Re: CXF+ACEGI

2007-09-18 Thread mattmadhavan
Hello All, Please refer to this blog. Seems to be one of the most popular blog. Please look at the client code! (Test case). Any ideas? If some one has a complete ACEGI security solution and posts it it will be Awesome! Ray do you mind posting a complete sample. It will be greatly beneficial to e

RE: contract-first with only xsd

2007-09-18 Thread Mulligan, Patrick
On the service endpoints. As I understand it, the annotations on the classes are mainly done by the compiler from the XSD? I suppose you can "tweak" them as well for runtime stuff. I am exploring the code-first approaches. Like when I use a tool to go from IDL as a starting point, it generates

Re: contract-first with only xsd

2007-09-18 Thread moraleslos
Thanks Eric. Just what I needed! I'll use your sample as a template. Thanks again! -los BigEHokie wrote: > > Here's just a quick sample. > > I'm not stating this is the proper or correct way to do anything. > However, this is how we are currently using CXF. > > The CXF guys can provide y

RE: contract-first with only xsd

2007-09-18 Thread Eric Miles
Are you talking about the annotations on your JAXB stubs? Or on your service endpoints? FWIW, we're not using JaxMe, we're using the JAXB2 maven plugin from dev.java.net: https://maven-jaxb2-plugin.dev.java.net/ On Tue, 2007-09-18 at 10:25 -0400, Mulligan, Patrick wrote: > I suppose that would

Re: contract-first with only xsd

2007-09-18 Thread Eric Miles
Here's just a quick sample. I'm not stating this is the proper or correct way to do anything. However, this is how we are currently using CXF. The CXF guys can provide you with better direction on how you SHOULD be creating your services. They might tell you this approach is a bad approach. Eri

RE: contract-first with only xsd

2007-09-18 Thread Mulligan, Patrick
I suppose that would be using the JaxMe plugin. I see there are other toolkits as well to do this. Anyone care to comment on those? I guess I was wondering if there was a tool to take the type info, the annotations, etc, all in one shot? -Original Message- From: Eric Miles [mailto:[EMAI

RE: contract-first with only xsd

2007-09-18 Thread Eric Miles
We're using the Maven2 JAXB plugin. You need stubs for the schema to manipulate the objects within your endpoint implementation. On Tue, 2007-09-18 at 10:05 -0400, Mulligan, Patrick wrote: > What are you using to generate the jaxb stubs? > > Can't the annotations drive it all? > > -Orig

contract-first with only xsd

2007-09-18 Thread moraleslos
Hi-- Having gone through the Spring Web Services (SWS) manifesto about contract-first as well as their sample examples, I wonder how CXF matches up with SWS. I know that CXF allows contract-first development, but is it as simple as SWS? For example, with SWS, all I need to do is define the XSD

RE: contract-first with only xsd

2007-09-18 Thread Jean-François Daune
This is what we do too. Generate mapping code from XSD using JAXB, then create endpoints using those stubs as argument/return value. You end up controlling the payload of your SOAP requests, which is what is important. Cheers, J-F -Message d'origine- De : Eric Miles [mailto:[EMAIL P

RE: contract-first with only xsd

2007-09-18 Thread Mulligan, Patrick
What are you using to generate the jaxb stubs? Can't the annotations drive it all? -Original Message- From: Eric Miles [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 18, 2007 10:00 AM To: cxf-user@incubator.apache.org Subject: Re: contract-first with only xsd Los, It is just as e

Re: contract-first with only xsd

2007-09-18 Thread Eric Miles
Los, It is just as easy to define contract first, without having to create a WSDL. For our project, we create our XSDs, generate stubs with JAXB, create our endpoint implementations (we use annotations), and wire it all up with Spring. CXF takes care of the WSDL generation. It really is easy.

RE: Using a spring-configured web service client from Java code

2007-09-18 Thread Glen Mazza
Thanks...it just occurred to me to Google an example, this one (which uses a CXF sample) looks not too bad: http://preview.tinyurl.com/2vkrjr Glen Am Dienstag, den 18.09.2007, 07:16 -0400 schrieb Benson Margulies: > Something like the following? It's isn't CXF, but it's from the main > function

RE: Using a spring-configured web service client from Java code

2007-09-18 Thread Benson Margulies
Something like the following? It's isn't CXF, but it's from the main function of a plain old java command line that uses Spring to set up some things. GenericApplicationContext appContext = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);

Using a spring-configured web service client from Java code

2007-09-18 Thread Glen Mazza
Hello, for a Spring-defined web service client as shown here: http://cwiki.apache.org/confluence/display/CXF20DOC/Client+HTTP +Transport#ClientHTTPTransport-Example Does anyone know of a simple Java Program that calls a bean like this? As far as I can see, the documentation gives us half the sto

ClassCastException in Proxy class for client

2007-09-18 Thread Peter.Liljenberg
I'm getting ClassCastExceptions from within a dynamically created proxy when using CXF as a client against a webservice. The WSDL for the service is attached, but some parts are shown here: All classes are genereated with WSDL2Java, the resulting interface for

Re: CXF+ACEGI + Anybody out there?

2007-09-18 Thread Dan Diephouse
I guess I'm interesting in seeing any code that could be shared between users come into CXF. Specifically, if I remember correctly from the solutions that I've seen, the WS-Security integration in particular takes an extra bit of coding. Would be very happy to include your contributions. Chee

Re: CXF without Spring?

2007-09-18 Thread Willem Jiang
Hi, I just check the stack trace , current CXF trunk add a null pointer checker at that point , can you try the latest SNAPSHOT? If you want to use the ServletTransport with the simple front end API, you still need to add the CXFServlet into you web.xml. The cxf-servlet.xml just contains the

Re: jaxws:endpoint and wsdlLocation

2007-09-18 Thread Willem Jiang
Hi The cxf-servlet.xml[1] is came form the RI's endpoint.xml which just describe the jaxws front end endpoint's information, you need to write it by yourself. It has nothing to do with the spring context listener which will try to load the spring context before the CXF servlet is initiated. Ju