• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 343
Mac OS X Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic