java - JAX-WS and character encoding questions -


i have question on sending xml string in webservice. 1 of our providers has developed webservice should use. webservice transport mechanism own request/response messages, e.g. class myrequest serialized xml string using jaxb passed setrequest method in webservice, because easiest way them or maybe because wanted high transparency in application... don't know.

anyhow. here question.

if have webservice has character encoding iso_8859-1 serialized xml has character encoding utf-8 (or other encoding supporting more characters iso_8859-1) these serialized , deserialized correctly? or have send information content of string? , if so, how can that?

the server side of webservice written in .net. how compability between java , .net? there encodings in .net isn't supported in java or vice versa?

/ andreas

if implement web service correctly (and too), don't need worry character encoding, because:

  1. (well-formed) xml has built-in metadata allows character encoding used found out and
  2. xml allows unicode character represented in encoding, due numeric character references

so summarize: make sure both sides handle text in unicode-capable environment (c# , java fine this) , use correct xml libraries (both environments come those) , don't mess manually, should fine.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -