Jax-WS - To Remove Empty Tags from Request XML

Mugar

New Member
I'm trying to consume a web service exposed by a provider. The Provider has a strict checking at his end that the request xml should not contain tags which don't have values. I'm using Jax-WS. If i don't set value in a particular object, it is being sent as empty tag and the tag is present. PFB the example illustrating my issue.Client XML : \[code\]<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:host="http://host.testing.webservice.com/"> <soapenv:Header/> <soapenv:Body> <host:testingMathod> <arg0> <PInfo> <IAge>45</IAge> <strName>Danny</strName> </PInfo> <strCorrId>NAGSEK</strCorrId> <strIpAddress></strIpAddress> </arg0> </host:testingMathod> </soapenv:Body></soapenv:Envelope>\[/code\]In this, the value for IpAddress is not been given and hence the empty tag is been sent. Hence kindly let us me know what needs to be done to remove the empty tags in request xml. Is Handlerchain is the only solution for the same?Thanks,Naveen.
 
Back
Top