You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bharadwaj <bh...@gmail.com> on 2015/05/20 10:46:59 UTC

Is there way to parse in camel cxf endpoint for empty tag's as

Hi Team,

I have problem with camel CXF, When there is no data / element is empty then
i am getting response as 

<name/>. I need the response as <name></name>.

Please help me.



--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-way-to-parse-in-camel-cxf-endpoint-for-empty-tag-s-as-name-name-tp5767301.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there way to parse in camel cxf endpoint for empty tag's as

Posted by bharadwaj <bh...@gmail.com>.
No buddy, name is of the element in the response. If we dont pass any data to
elements CXF is parsing it as <name/> but i need the empty tag's like this
<name></name>



--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-way-to-parse-in-camel-cxf-endpoint-for-empty-tag-s-as-name-name-tp5767301p5767408.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there way to parse in camel cxf endpoint for empty tag's as

Posted by Reji Mathews <co...@gmail.com>.
Is <name> the only tag in the response schema? If so solution is good
enough. If any other element is also there, then this approach needs to be
revisited.

Cheers
Reji

On Wed, May 20, 2015 at 2:38 PM, Sudhil <su...@gmail.com> wrote:

> <camel:setBody>
>
> <constant>&lt;name&gt;&lt;/name&gt;</constant>
>                         </camel:setBody>
>
>
>
> -----
> Thanks & Regards,
> Sudhil Mishra.
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Is-there-way-to-parse-in-camel-cxf-endpoint-for-empty-tag-s-as-name-name-tp5767301p5767307.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Is there way to parse in camel cxf endpoint for empty tag's as

Posted by Sudhil <su...@gmail.com>.
<camel:setBody>
				<constant>&lt;name&gt;&lt;/name&gt;</constant>
			</camel:setBody>



-----
Thanks & Regards,
Sudhil Mishra.
--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-way-to-parse-in-camel-cxf-endpoint-for-empty-tag-s-as-name-name-tp5767301p5767307.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there way to parse in camel cxf endpoint for empty tag's as

Posted by chaituu <ya...@gmail.com>.
can you add xml element tags in the pojo response?



--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-way-to-parse-in-camel-cxf-endpoint-for-empty-tag-s-as-name-name-tp5767301p5767306.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Is there way to parse in camel cxf endpoint for empty tag's as

Posted by Sudhil <su...@gmail.com>.
Check the condition at the end before return like if body is <name/> then set
the body to <name></name>.



-----
Thanks & Regards,
Sudhil Mishra.
--
View this message in context: http://camel.465427.n5.nabble.com/Is-there-way-to-parse-in-camel-cxf-endpoint-for-empty-tag-s-as-name-name-tp5767301p5767303.html
Sent from the Camel - Users mailing list archive at Nabble.com.