cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@iona.com>
Subject Re: Unmarshalling error
Date Mon, 14 May 2007 03:40:09 GMT
Hi Richard,

Sorry, correct one thing, what ensure me that the unmarshalling on 
server side is correct is I print out the parameter in server method like
System.out.println(parameters.getSource());
        System.out.println(parameters.getIDDataForSet().get(0).getID());
        
System.out.println(parameters.getIDDataForSet().get(0).getSample().get(0).getTimestamp());
        System.out.println(parameters.getIDDataForSet().get(0).
            getSample().get(0).getChannelData().get(0).getIntValue());
        System.out.println(parameters.getIDDataForSet().get(0).
                           
getSample().get(0).getChannelData().get(0).getChannelNamespace());

and the result is what I want
traffic
1
0400-01-01T00:00:00
11
journeyTime

Thanks very much

Freeman

Freeman Fang wrote:
> Hi Richard,
>
> We do support choice in wsdl now.
> I test your wsdl with latest cxf. It works  perfectly.
>
> The client code like
>
> DataAccessService ss = new DataAccessService(wsdl, serviceName);
>        DataAccessI port = ss.getDataAccessPort();
>        SetData data = new SetData();
>        data.setSource("traffic");
>        IDDataForSet set = new IDDataForSet();
>        set.setID("1");
>        Sample sample = new Sample();
>        sample.setTimestamp(XMLGregorianCalendarImpl.LEAP_YEAR_DEFAULT);
>        sample.setStatus("");
>        ChannelData channelData = new ChannelData();
>        channelData.setIntValue(11);
>        channelData.setChannelNamespace("journeyTime");
>        sample.getChannelData().add(channelData);
>        set.getSample().add(sample);
>        data.getIDDataForSet().add(set);
>        String rep = port.setData(data);
>
> the inbound message from server side is
> <soap:Envelope 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><SetData

> xmlns:ns2="http://www.w3.org/2005/08/addressing/wsdl" 
> xmlns="http://www.atkinsglobal.com/inform/dataaccess/types"><IDDataForSet><ID>1</ID><Sample><Status></Status><Timestamp>0400-01-01T00:00:00</Timestamp><ChannelData><ChannelNamespace>journeyTime</ChannelNamespace><IntValue>11</IntValue></ChannelData></Sample></IDDataForSet><Source>traffic</Source></SetData></soap:Body></soap:Envelope>

>
> It's exact the same as your client outbound message. so unmarshalling 
> on server side is correct by my test.
>
> Would you please try the latest CXF version and if there si still 
> problem, please send me the client , server code you are running.
> Would you please double check the WebService annotation in your 
> service impl class, it should be
> @WebService(serviceName = "DataAccessService",
>            portName = "DataAccessPort",
>            endpointInterface = 
> "com.atkinsglobal.inform.dataaccess.DataAccessI",
>            targetNamespace = 
> "http://www.atkinsglobal.com/inform/dataaccess")
>
> Thanks very much
>
> Freeman
>
> James Mao wrote:
>> Looks like a bug, what about create a simple wsdl with just the 
>> choice stuff inside, and if it's re-producible  then fire an issue on 
>> [1]
>> I search the source repository, i can not see any wsdl contain the 
>> "choice", so it could be a problem.
>> We need this test case.
>>
>> Thanks,
>> James.
>>
>> [1] https://issues.apache.org/jira/browse/CXF
>>
>>
>>> Can anybody help me decide why when I call the setData operation in 
>>> the attached wsdl I end up with a null object in my service. It gets 
>>> to the correct operation but all the parameters are null.
>>>  
>>> My client is written using CXF too and it has output the following -
>>>  
>>> <soap:Envelope 
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><SetData

>>> <http://schemas.xmlsoap.org/soap/envelope/%22%3E%3Csoap:Body%3E%3CSetData>

>>> xmlns:ns2="http://www.w3.org/2005/08/addressing/wsdl" 
>>> xmlns="http://www.atkinsglobal.com/inform/dataaccess/types"><IDDataForSet><ID>1</ID><Sample><Status></Status><Timestamp>2007-05-12T11:14:50</Timestamp><ChannelData><ChannelNamespace>journeyTime</ChannelNamespace><IntValue>11</IntValue></ChannelData></Sample></IDDataForSet><Source>traffic</Source></SetData></soap:Body></soap:Envelope

>>> <http://www.atkinsglobal.com/inform/dataaccess/types%22%3E%3CIDDataForSet%3E%3CID%3E1%3C/ID%3E%3CSample%3E%3CStatus%3E%3C/Status%3E%3CTimestamp%3E2007-05-12T11:14:50%3C/Timestamp%3E%3CChannelData%3E%3CChannelNamespace%3EjourneyTime%3C/ChannelNamespace%3E%3CIntValue%3E11%3C/IntValue%3E%3C/ChannelData%3E%3C/Sample%3E%3C/IDDataForSet%3E%3CSource%3Etraffic%3C/Source%3E%3C/SetData%3E%3C/soap:Body%3E%3C/soap:Envelope>>

>>>
>>>  
>>> All I can think of is that it is something to do with the choice.
>>>  
>>> BTW - I'm using 2.0 RC
>>>  
>>> Thanks
>>>  
>>> Richard Shaw
>>>  
>>>
>>>
>>> *This email and any attached files are confidential and copyright 
>>> protected. If you are not the addressee, any dissemination of this 
>>> communication is strictly prohibited. Unless otherwise expressly 
>>> agreed in writing, nothing stated in this communication shall be 
>>> legally binding.*
>>>
>>> The ultimate parent company of the Atkins Group is WS Atkins plc.  
>>> Registered in England No. 1885586.  Registered Office Woodcote 
>>> Grove, Ashley Road, Epsom, Surrey KT18 5BW.
>>>
>>> P *Consider the environment.* *Please don't print this e-mail unless 
>>> you really need to.*
>>>
>>
>>
>
>


Mime
View raw message