Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WSE3 ReadElementContentAsBinHex raises NotImplementedException

18 views
Skip to first unread message

TimG

unread,
May 18, 2007, 10:22:03 AM5/18/07
to
When attempting to retrieve an element of type hexBinary that is part of a
complex type I get:

System.InvalidOperationException: There is an error in the XML document.
System.NotImplementedException: The method or operation is not
implemented.
at
Microsoft.Web.Services3.Mime.XopDocumentReader.ReadElementContentAsBinHex(Byte[] buffer, Int32 index, Int32 count)
at System.Xml.Serialization.XmlSerializationReader.ReadByteArray(Boolean
isBase64)
at System.Xml.Serialization.XmlSerializationReader.ToByteArrayHex(Boolean
isNull)
...


If I inherit from Web.Services.Protocols.SoapHttpClientProtocol for the
service instead of Microsoft.Web.Services3.WebServicesClientProtocol the call
works. We need to inherit WSE3 for authentication.

Is there a solution to this problem?

--
Thanks,

Tim

Steven Cheng[MSFT]

unread,
May 20, 2007, 11:58:21 PM5/20/07
to
Hi TimG,

From your description, you're encountering the following exception in your
webservice(client proxy side) when applying the WSE 3.0 add-on ,correct?

=============


System.InvalidOperationException: There is an error in the XML document.
System.NotImplementedException: The method or operation is not
implemented.
at

===============

Based on my experience, such exception/error is usually caused by the
webservice SOAP message contains some invalid character (not conform to the
xml serialization or normalization specification) and the deserialization
failed. For your scenario, since you said that if you using a normal
soapHttpClientProtocol proxy, it works. But failed when using a WSE
specific proxy, I think the problem may be specific to the certain
character or string normalization approach of WSE(WS-* specification).
Currently, for further troubleshooting, I would suggest you try creating a
simplified service with a simple webmethod that return a object(simple
class have a certain property/field of the type) that can correctly repro
the same problem. If so, you can show me the test service and code logic so
that I can also perform some local test against it.

If you have any other finding on this, please also feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

TimG

unread,
May 23, 2007, 11:46:01 AM5/23/07
to
Thanks for the response.

I have not had time to create a test case that I can send out for you to
duplicate, but I did get it to work with WSE 3 by changing the element from
hexBinary to base64Binary, so for now that is what I will implement it.

--
Thanks,

Tim

Steven Cheng[MSFT]

unread,
May 24, 2007, 5:41:34 AM5/24/07
to
Thanks for your followup and inform the result you found.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

balukasi

unread,
Apr 15, 2010, 6:55:20 AM4/15/10
to
I am getting the same exception and couldn't figure out the reason for failing in translation from HexBinary to Byte[]. Is this a bug with WSE 3.0? Any resolutions? And everything works fine when you invoke proxy inherited from SoapHTTPClientProtocol. pls provide any inputs.
Let me knwo in case any details desired.

Thanks in advance.
Balu


stchen wrote:

RE: WSE3 ReadElementContentAsBinHex raises NotImplementedException
24-May-07

------=_NextPart_0001_41BC328E
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Sincerely,

Steven Cheng

------=_NextPart_0001_41BC328E
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Thanks for your followup and inform the result you found.
\par
\par Sincerely,
\par
\par Steven Cheng
\par
\par Microsoft MSDN Online Support Lead
\par
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }
------=_NextPart_0001_41BC328E--

Previous Posts In This Thread:

On Friday, May 18, 2007 10:22 AM
fullhous wrote:

WSE3 ReadElementContentAsBinHex raises NotImplementedException


When attempting to retrieve an element of type hexBinary that is part of a
complex type I get:

System.InvalidOperationException: There is an error in the XML document.

System.NotImplementedException: The method or operation is not
implemented.
at

Microsoft.Web.Services3.Mime.XopDocumentReader.ReadElementContentAsBinHex(Byte[] buffer, Int32 index, Int32 count)
at System.Xml.Serialization.XmlSerializationReader.ReadByteArray(Boolean
isBase64)
at System.Xml.Serialization.XmlSerializationReader.ToByteArrayHex(Boolean
isNull)

....


If I inherit from Web.Services.Protocols.SoapHttpClientProtocol for the
service instead of Microsoft.Web.Services3.WebServicesClientProtocol the call
works. We need to inherit WSE3 for authentication.

Is there a solution to this problem?

--
Thanks,

Tim

On Sunday, May 20, 2007 11:58 PM
stchen wrote:

RE: WSE3 ReadElementContentAsBinHex raises NotImplementedException
------=_NextPart_0001_38BA7D91
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi TimG,

From your description, you're encountering the following exception in your
webservice(client proxy side) when applying the WSE 3.0 add-on ,correct?

=============
System.InvalidOperationException: There is an error in the XML document.
System.NotImplementedException: The method or operation is not
implemented.
at
===============

Based on my experience, such exception/error is usually caused by the
webservice SOAP message contains some invalid character (not conform to the
xml serialization or normalization specification) and the deserialization
failed. For your scenario, since you said that if you using a normal
soapHttpClientProtocol proxy, it works. But failed when using a WSE
specific proxy, I think the problem may be specific to the certain
character or string normalization approach of WSE(WS-* specification).
Currently, for further troubleshooting, I would suggest you try creating a
simplified service with a simple webmethod that return a object(simple
class have a certain property/field of the type) that can correctly repro
the same problem. If so, you can show me the test service and code logic so
that I can also perform some local test against it.

If you have any other finding on this, please also feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


------=_NextPart_0001_38BA7D91
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Hi TimG,
\par
\par From your description, you're encountering the following exception in your webservice(client proxy side) when applying the WSE 3.0 add-on ,correct?
\par
\par =============
\par System.InvalidOperationException: There is an error in the XML document.
\par System.NotImplementedException: The method or operation is not
\par implemented.
\par at
\par ===============
\par
\par Based on my experience, such exception/error is usually caused by the webservice SOAP message contains some invalid character (not conform to the xml serialization or normalization specification) and the deserialization failed. For your scenario, since you said that if you using a normal soapHttpClientProtocol proxy, it works. But failed when using a WSE specific proxy, I think the problem may be specific to the certain character or string normalization approach of WSE(WS-* specification). Currently, for further troubleshooting, I would suggest you try creating a simplified service with a simple webmethod that return a object(simple class have a certain property/field of the type) that can correctly repro the same problem. If so, you can show me the test service and code logic so that I can also perform some local test against it.
\par
\par If you have any other finding on this, please also feel free to post here.
\par
\par Sincerely,
\par
\par Steven Cheng
\par
\par Microsoft MSDN Online Support Lead
\par
\par
\par
\par ==================================================
\par
\par Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
\par
\par
\par
\par Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx.
\par
\par ==================================================
\par
\par
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par
\par
\par
\par }
------=_NextPart_0001_38BA7D91--

On Wednesday, May 23, 2007 11:46 AM
fullhous wrote:

RE: WSE3 ReadElementContentAsBinHex raises NotImplementedException
Thanks for the response.

I have not had time to create a test case that I can send out for you to
duplicate, but I did get it to work with WSE 3 by changing the element from
hexBinary to base64Binary, so for now that is what I will implement it.

--
Thanks,

Tim


"Steven Cheng[MSFT]" wrote:

On Thursday, May 24, 2007 5:41 AM
stchen wrote:

RE: WSE3 ReadElementContentAsBinHex raises NotImplementedException
------=_NextPart_0001_41BC328E
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Sincerely,

Steven Cheng

------=_NextPart_0001_41BC328E
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg936\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang2052\f0\fs20 Thanks for your followup and inform the result you found.
\par
\par Sincerely,
\par
\par Steven Cheng
\par
\par Microsoft MSDN Online Support Lead
\par
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }
------=_NextPart_0001_41BC328E--


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Report Engine, Part 2
http://www.eggheadcafe.com/tutorials/aspnet/0ad2fa61-7f0c-485f-92c9-cf3a9ee210a7/wpf-report-engine-part-2.aspx

0 new messages