-
hexadecimal value 0x00, is an invalid character
Dear All,
I had written a mail before this regarding the same problem. From Willam
I got to know the following:
Well, Hex 0x00 is a Null character, and is not displayable nor can it
beused in places of a Null string. If you are trying to retrieve the data
for display (or to manipulate) into a string, you need to capture the fact
and handle accordinally. (I.E. strField = ds("Field"): If ds("Field") is
Nothing Then strField &= "")
Now to the problem:
I have a WebService which calls a Object's function present in another
dll. This function fetches a record for me. If the function fails it throw
an SQLException defined by me. I catch this SQLException in my WebService
and using SoapFormatter I deserialize this object into an XMLNode and pass
this XML node into the details paramter of a SoapException and throw the
SoapException. But when I throw this SoapException it gives me the error
"hexadecimal value 0x00, is an invalid character".
If I create a exception at my WebService and deserialize and send the SoapException
it Works!!.
I have tried really hard to trace the problem. But I have not been able to
as yet. Could someone help me out with this.
Thanks a lot in advance.
Many Regards
Sunil
-
Re: hexadecimal value 0x00, is an invalid character
"Sunil Menon" <sunil@itb-india.com> wrote:
>
>Now to the problem:
> I have a WebService which calls a Object's function present in another
>dll. This function fetches a record for me. If the function fails it throw
>an SQLException defined by me. I catch this SQLException in my WebService
>and using SoapFormatter I deserialize this object into an XMLNode and pass
>this XML node into the details paramter of a SoapException and throw the
>SoapException. But when I throw this SoapException it gives me the error
>"hexadecimal value 0x00, is an invalid character".
Do you mean Serialize? (not deserialize?)
>If I create a exception at my WebService and deserialize and send the SoapException
>it Works!!.
You mean a custom exception instead of the SQLException, right?
>I have tried really hard to trace the problem. But I have not been able
to
>as yet. Could someone help me out with this.
Save the SQLException XML serialized stream to a file and check to see if
it has a null character in any of the XML data. That's going to be your problem.
-Rob
-
Re: hexadecimal value 0x00, is an invalid character
>
>Do you mean Serialize? (not deserialize?)
Yes:-) I am sorry I actually wanted to write Serialize.
>
>>If I create a exception at my WebService and deserialize and send the SoapException
>>it Works!!.
>
>You mean a custom exception instead of the SQLException, right?
>
No. If I create a SQLException at my WebService also it works fine.
>Save the SQLException XML serialized stream to a file and check to see if
>it has a null character in any of the XML data. That's going to be your
problem.
I have done that too. But looking at the XML file I could not find out if
it had a NULL character. How do I find out programmatically? and replace
the NULL character with some value?
Thanks a lot in advance.
Many Regards
Sunil
-
Hi Sunil,
did you get how to replace the NULL character with some value programatically?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks