Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Upananda Singha

Greenhorn
+ Follow
since Jan 12, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Upananda Singha

Hi Peer,

Thanks for your quick reply.
Yeah thats possible to remove the empty tags / attributes using some outflow handler.
But as a general assumption introducing another layer of xml parsing and manipulating using a handler
might slow down the total request - response cycle if I am not wrong. This would be critical to any high
load Application.

Anyway I will try this if it can be done without much overhead to the processing...
I just wonder how it's handled in JBoss4.2.2 (which provides ws2.0 and it's on top of Axis).
So what I felt is Axis2 should have that feature built in to it as it's the latest version Axis1.4.1.

Thanks
Upananda
11 years ago
Hi,

I am also facing a similar situation. Anybody got any idea.....
I need to remove the empty tags that are coming in the response, even if not
set in the server side. I want to remove the empty tags from the response coming
from the axis2 deployed service as .aar

The same is working fine using JBoss4.2.2 deployment where the empty tags are automatically
removed while sending back the response to client. I verified the empty tags in the etheral logs as well
as through soap UI.

sample response with empty tags...

-----------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">;
<soapenv:Body>
<ns:createProfileResponse xmlns:ns="http://example">;
<ns:return xmlns:ax230="http://example/xsd"; type="example.Response">
<ax230:desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="true"/>
<ax230:respCode>0000</ax230:respCode>
<ax230:respStr>Your name - hello, Age- 1</ax230:respStr>
<ax230:tokenId xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="true"/>
</ns:return>
</ns:createProfileResponse>
</soapenv:Body>
</soapenv:Envelope>
-----------------------------------------------------------------------------------

The last tag (attribute) is empty tag which I don't want in soap response at all. This is something to
do with backward compatibility. If the older client does not know of a newly added attribute/tag in
the new version, it will fail while parsing the response. This is not an issue with both the server and clients
as java but will be an issue if the client is non java and will fail.

what I want is the following without the empty tag...

-----------------------------------------------------------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">;
<soapenv:Body>
<ns:createProfileResponse xmlns:ns="http://example">;
<ns:return xmlns:ax230="http://example/xsd"; type="example.Response">
<ax230:desc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="true"/>
<ax230:respCode>0000</ax230:respCode>
<ax230:respStr>Your name - hello, Age- 1</ax230:respStr>
</ns:return>
</ns:createProfileResponse>
</soapenv:Body>
</soapenv:Envelope>
-----------------------------------------------------------------------------------


Ideally spaking if any empty tag is there it should be removed by default which works fine if
I deploy the service in JBoss. But is not if I deploy it on Axis2 + Tomcat environment.

Thanks in advance...
11 years ago
Hi all,

I am also getting exactly the same problem. Not getting the wsdl1 generated if I use annotations
and bundle as a jar without the services.xml file.

Hi Srikanth, have you got any solution to this...

Can anybody help please.

Upananda
11 years ago