This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to add exactly 2 NON XML caracters at the end of a SOAP body

 
foo char
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all I am trying to add two (and only two) extra non xml caracters "AA" at the END of a SOAP body using the JAXWS handlers as so:



The problem is that if you try to add them to the SOAP body (see code below) you get a XML Unmarshalling exception. If I add "AA" as a soap attachment I get MORE than 2 caracters after the SOAP body (which I don't want)
Here is the my SOAPHandler code :


so my question is this: is there any way to add exactly 2 non xml caracters at the end of the soap body using jaxws handlers ? I have spent several weeks on this so it is not an easy question...

Thanks,

Fred.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can you explain the business rationale for doing this?

XML is XML and it should adhere to certain standards.

WP
 
foo char
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply ! I am developing a webservice that is taking to a complex system which I cannot touch. This system seems to want two extra caracters at the end of each SOAP messages (and exactly two) else it will discard these messages (don't ask who did this). It was particularly hard to see in GUI network monitoring tools (SOAP UI and tcp mon) as the two caracters were /r/n ...

But the thing that is frustrating to me is that I am sure there is a way to do something as simple as this in JAXWS ... I mean it doesn't violate any network protocols or nothing (it would be like adding a small attachment). I did manage to do it using CFX interceptors but the dependencies are just too heavy for me to warrant its use for such a small feature ...

Any ideas on how to proceed/hack is most appreciated ! ( I am going to start looking if using reflection would help but I don't know how stable this would be ...)

Thanks,

Fred.
 
Palak Mathur
Ranch Hand
Posts: 342
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
foo char wrote:thanks for the reply ! I am developing a webservice that is taking to a complex system which I cannot touch. This system seems to want two extra caracters at the end of each SOAP messages (and exactly two) else it will discard these messages (don't ask who did this). It was particularly hard to see in GUI network monitoring tools (SOAP UI and tcp mon) as the two caracters were /r/n ...

But the thing that is frustrating to me is that I am sure there is a way to do something as simple as this in JAXWS ... I mean it doesn't violate any network protocols or nothing (it would be like adding a small attachment). I did manage to do it using CFX interceptors but the dependencies are just too heavy for me to warrant its use for such a small feature ...

Any ideas on how to proceed/hack is most appreciated ! ( I am going to start looking if using reflection would help but I don't know how stable this would be ...)

Thanks,

Fred.


Why will you want to bypass Soap Schema?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic