For the record, I gave up and switched to jaxws ri.  As noted below, it
generates essentially the same binding so we switched over to typed
collections.  This handy table here has a breakdown of the basic bindings
you get from JAX-WS vs. JAX-RPC:

http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc2.html

I may return to CXF at some point, the level of activity here is encouraging
and leads me to think CXF will improve over time.  However -- and really, I
don't mean to knock you guys on your own list but I've kicked the tires of
just about every WS framework out there so I'm just rendering my opinion --
for _my tastes_ CXF is too "heavy".  I'm not particularly a fan of the
Spring baggage.  I like Spring, but I prefer it in my application if I use
it, not in my framework dependencies.

It in _completely_ non-scientific exercise I just ran these on my system:
$ du -sh apache-cxf-2.0-incubator
 34M    apache-cxf-2.0-incubator

$ du -sh jaxws-ri
8.5M    jaxws-ri

Whether these represent code, documentation, and/or samples they match my
perceived "weight" as I used the two implementations.  For example the
existing CXF command-line tools appear to essentially bring CXF all the way
up (initialized with Spring), emit the wsdl/code and then spool down.  This
doubled our build times.  But I do understand that CXF has some new
command-line generators coming, that's definitely a plus and welcome.

Everyone I've interacted with here was _very_ helpful and it was
appreciated.  I wish the CXF project all the best.  I'm a big believer in
cooperation within an open source project and competition between them,
everybody wins.

-Brett


On 8/9/07 10:03 PM, "James Mao" <[EMAIL PROTECTED]> wrote:

> Hi Doug,
> 
> Well, i tried yesterday, i have the same results as you gave, the
> previous binding file is not correct, you can not put the wsdl location
> inside the schemaLocation.
> 
> The interface really did not change, what changed is the type class, you
> can see there is String[], but it use the List indeed
> I also tried the jaxws ri, what i got is the same results.
> 
> I guess you must use String[] here, so hope someone else can shed some
> lights here.
> 
> 
> James
> 
> 
>> If I explicitly modify the generated WSDL file as follows:
>> 
>> <wsdl:types>
>> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
>>      xmlns:tns="urn:srv"
>>      attributeFormDefault="unqualified"
>>      elementFormDefault="unqualified"
>>      targetNamespace="urn:srv"
>>      xmlns:jxb="http://java.sun.com/xml/ns/jaxb";
>>      jxb:version="1.0" >
>>   <xs:annotation>
>>     <xs:appinfo>
>> <!--      <jxb:globalBindings collectionType="java.util.ArrayList"/> -->
>>       <jxb:globalBindings collectionType="indexed"/>
>>     </xs:appinfo>
>>   </xs:annotation>
>> 
>> [snip]
>> 
>> <xs:complexType name="getApplicationPushletIDsResponse">
>> <xs:sequence>
>> <xs:element maxOccurs="unbounded" minOccurs="0" name="return"
>> type="xs:string"/>
>> </xs:sequence>
>> </xs:complexType>
>> 
>> [cut]
>> 
>> then wsdl2java runs without any exceptions and I still end up with
>> java.util.List responses:
>> 
>> @WebService(targetNamespace = "urn:srv", name = "PfC")
>> public interface PfC {
>>     @ResponseWrapper(targetNamespace = "urn:srv", className
>> = "au.net.mmsn.pfc.servlet.pfcws.GetApplicationPushletIDsResponse", localName
>> = "getApplicationPushletIDsResponse")
>>     @RequestWrapper(targetNamespace = "urn:srv", className
>> = "au.net.mmsn.pfc.servlet.pfcws.GetApplicationPushletIDs", localName
>> = "getApplicationPushletIDs")
>>     @WebResult(targetNamespace = "", name = "return")
>>     @WebMethod
>>     public java.util.List<java.lang.String> getApplicationPushletIDs();
>> 
>> 
>> My original prototype interface was:
>> 
>> @WebService(name="PfC",
>>             targetNamespace="urn:srv",
>>             serviceName="PfCService",
>>             portName="PfC")
>> @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL,
>>              parameterStyle = ParameterStyle.WRAPPED)
>> public interface PfC extends java.rmi.Remote {
>>     // primary pushlet url
>>     public java.lang.String   getPushletURL() throws
>> java.rmi.RemoteException;
>>     public java.lang.String[] getApplicationPushletIDs() throws
>>              java.rmi.RemoteException;
>>     ...
>> 
>> 
>> The commandline was:
>> wsdl2java -verbose -server -compile -classdir
>> /home/timeout/ddb/MMSN/gridsphere-2.2.7/projects/pfc/build/classes -impl -d
>> /home/timeout/ddb/MMSN/gridsphere-2.2.7/projects/pfc/src -p
>> au.net.mmsn.pfc.servlet.pfcws PfC.wsdl
>> wsdl2java - 2.0-incubator
>> 
>> 
>> Changing the collectionType attribute to an ArrayList has no effect iether.
>> 
>> 
>> Hope somone can see what I am doing wrong.
>> thanks
>> Doug
>> 
>> 
>> On Thursday 09 August 2007 17:00, doug wrote:
>>   
>>> Hi list,
>>> I apologise in advance for my ignorance but I am trying to
>>> convert my Axis 1 SOAP client/services to CXF, and as a complete
>>> newbie to CXF and JAXB, am having quite a few difficulties.
>>> 
>>> My latest issue is the same as a recent correspondent (Brett) in that my
>>> web service interface methods that ought to return arrays are being
>>> converted into java.util.Lists.
>>> 
>>> Also some of my original java prototype interface methods had
>>>        throws RemoteException
>>> clauses which apparently do not propogate through the WSDL to the
>>> generated java source.
>>> 
>>> On the first issue, James Mao replied to Brett:
>>> ---------------------------
>>> Yes, There are two ways
>>> 
>>> Put the customization section into your schema in the wsdl,
>>> 
>>>    <xsd:annotation>
>>>    <xsd:appinfo>
>>>        <jxb:globalBindings collectionType="indexed"/>
>>>    </xsd:appinfo>
>>>    </xsd:annotation>
>>> 
>>> 
>>> or change it to an external style, and feed the 'binding file' to the
>>> 
>>>> wsdl2java -b $YOUR_BINDNIG_FILE
>>> 
>>> -----------------------------
>>> 
>>> Trying to use the second method, I have a bindings.jxb file that
>>> looks like the following, where  ./PfC.wsdl is m
>>> java2wsdl generated file:
>>> 
>>> <jxb:bindings jxb:version="1.0"
>>>       xmlns:jxb="http://java.sun.com/xml/ns/jaxb";
>>>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl";
>>>       xmlns:xsd="http://www.w3.org/2001/XMLSchema"; >
>>>   <jxb:bindings schemaLocation="./PfC.wsdl" node="/xsd:schema">
>>>     <jxb:globalBindings collectionType="indexed">
>>>     </jxb:globalBindings>
>>>   </jxb:bindings>
>>> </jxb:bindings>
>>> 
>>> Unfortunately it doesn't seem to work for me when I run
>>> wsdl2java -b bindings.jxb ...
>>> because, although it runs without throwing any exsceptions,
>>> the array return methods still return java.util.Lists
>>> As I mentioned, I am a complete novice to this, so would
>>> appreciate if someone could provide a more explicit answer
>>> (and also a pointer to how to solve the exception returning problem)
>>> 
>>> Should I have explicitly annotated all the array return methods in my
>>> original java prototype interface somehow?
>>> 
>>> Many thanks
>>> Doug
>>> 
>>> P.S. running wsdl2java - 2.0-incubator
>>>     
>> 
>>   

Reply via email to