You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by nhrraj <ra...@gmail.com> on 2012/06/07 01:29:15 UTC

Webservice response mismatch between WAS 6.1 and WAS 8

Hello,

We have a java server app(jdk 1.5) deployed in WAS6.1. We are currently
upgrading to jdk1.6 and WAS8. While testing the web services after the
ugrade, client is facing lot of deserialize issues with null xml elements.

For example:

an null xml tag is seen as below in was6.1 and was8

WAS 6.1
---------


WAS 8
-------


Can someone please tell me what could be wrong here?

thanks.

--
View this message in context: http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-6-1-and-WAS-8-tp5709311.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by nhrraj <ra...@gmail.com>.
I am able to get around this issue by setting the string members as nillable
= false in the aegis mapping xml.

This guarantees that the null element will not be sent back to the client.

Will I hit any other issue with this approach?

thanks.

--
View this message in context: http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-6-1-and-WAS-8-tp5709311p5709709.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by Mark Streit <mc...@gmail.com>.
I would think it is likely possible that there is a classloader issue (Dan
alludes to that below in terms of what Stax parser is being picked up) and
here are some things to consider:

1) AFAIK - JAX-WS support *in WAS 6.1 *had to be provided with some sort of
"Feature Pack" add-on installation (uses Axis2)
2) For WAS 8, it now has all the JAX-WS support built-in already in the
same way WAS 7 did and again, it uses Axis2 - there was no "Feature Pack"
mess to deal with in WAS 7.
3) I would assume you had to do things like Glen Mazza's blog discusses to
"get around" the IBM stack where CXF (or Metro for that matter - anything
other than Axis2) would be used:
http://www.jroller.com/gmazza/entry/deploying_webservices_on_websphere
This talks about getting the CXF stack to be the JAX-WS engine and avoid
all the Axis2 stuff on the server side.
4) Since the issue is being seen on the CLIENT side here, you may want to
check the *classloader setting for the client side application* that is
making the call to the backend service since you want it to see the CXF
distribution BEFORE it picks up the IBM/Axis2 stack components as well.

Hope this helps...

On Mon, Jun 11, 2012 at 2:05 PM, Daniel Kulp <dk...@apache.org> wrote:

> On Friday, June 08, 2012 02:50:22 PM nhrraj wrote:
> > Thanks Dan for responding.
> >
> > I understand those tags are interchangeable.
> >
> > The issue is with the client deserializing framework which deserializes
> > the first tag into a null element and the second one into a empty
> > string('')
>
> CXF isn't the client framework, is it?   For CXF clients, both of them
> should be deserialized to an empty string.
>
>
> > This happens only when I use aegis databinding with simple frontend
> > configuration.
> >
> > Why is the aegis databinding with simple frontend configuration behaving
> > differently when deployed in was6.1 and was8?
>
> Likely a different Stax parser being picked up.     Aegis pretty much ends
> up calling:
> writer.writeStartElement(....);
> writer.writeEndElement();
>
> The parser MAY be doing something to  optimize them down into a single tag.
> Don't really know.
>
> Dan
>
>
> > Please let me know if you have any suggestions.
> >
> > --
> > View this message in context:
> >
> http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-
> > 6-1-and-WAS-8-tp5709311p5709441.html Sent from the cxf-user mailing list
> > archive at Nabble.com.
>

Mark

*
*

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by Daniel Kulp <dk...@apache.org>.
On Friday, June 08, 2012 02:50:22 PM nhrraj wrote:
> Thanks Dan for responding.
> 
> I understand those tags are interchangeable.
> 
> The issue is with the client deserializing framework which deserializes
> the first tag into a null element and the second one into a empty
> string('')

CXF isn't the client framework, is it?   For CXF clients, both of them 
should be deserialized to an empty string.

 
> This happens only when I use aegis databinding with simple frontend
> configuration.
> 
> Why is the aegis databinding with simple frontend configuration behaving
> differently when deployed in was6.1 and was8?

Likely a different Stax parser being picked up.     Aegis pretty much ends 
up calling:
writer.writeStartElement(....);
writer.writeEndElement();

The parser MAY be doing something to  optimize them down into a single tag.  
Don't really know.

Dan

 
> Please let me know if you have any suggestions.
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-
> 6-1-and-WAS-8-tp5709311p5709441.html Sent from the cxf-user mailing list
> archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by nhrraj <ra...@gmail.com>.
The client is .net CF.

Also, I tried the class loader changes and setting the DisableIBMJAXWSEngine
property to true. But no luck.

Also, I am using cxf2.2.3 jars on jdk 1.6 and WAS 8.0.3

Is there a problem with the above versions?

thanks.

--
View this message in context: http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-6-1-and-WAS-8-tp5709311p5709560.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by Daniel Kulp <dk...@apache.org>.
On Monday, June 11, 2012 10:42:08 AM nhrraj wrote:
> I would like a null object attribute to be serialized in the below format.
> 
> <name/>
> 
> and not in <name></name> format.
> 
> Is this possible using some aegis configuration?

Not that I see.   There are no calls to writeEmptyElement anywhere that I 
can see/grep.

Dan



> 
> Please help.
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-
> 6-1-and-WAS-8-tp5709311p5709531.html Sent from the cxf-user mailing list
> archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by nhrraj <ra...@gmail.com>.
I would like a null object attribute to be serialized in the below format.

<name/>

and not in <name></name> format.

Is this possible using some aegis configuration?

Please help.

--
View this message in context: http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-6-1-and-WAS-8-tp5709311p5709531.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by nhrraj <ra...@gmail.com>.
Thanks Dan for responding.

I understand those tags are interchangeable.

The issue is with the client deserializing framework which deserializes the
first tag into a null element and the second one into a empty string('')

This happens only when I use aegis databinding with simple frontend
configuration.

Why is the aegis databinding with simple frontend configuration behaving
differently when deployed in was6.1 and was8?

Please let me know if you have any suggestions.

--
View this message in context: http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-6-1-and-WAS-8-tp5709311p5709441.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday, June 07, 2012 02:38:45 PM nhrraj wrote:
> Please find below how the xml tags are displayed
> 
> WAS 6.1 - <name/>
> 
> WAS 8 - <name></name>

Those two tags are 100% compatible and interchangeable with each other.  
What seems to be the isse with it?

Dan


> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-
> 6-1-and-WAS-8-tp5709311p5709373.html Sent from the cxf-user mailing list
> archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Webservice response mismatch between WAS 6.1 and WAS 8

Posted by nhrraj <ra...@gmail.com>.
Please find below how the xml tags are displayed

WAS 6.1 - <name/>

WAS 8 - <name></name>

--
View this message in context: http://cxf.547215.n5.nabble.com/Webservice-response-mismatch-between-WAS-6-1-and-WAS-8-tp5709311p5709373.html
Sent from the cxf-user mailing list archive at Nabble.com.