473,811 Members | 3,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to determine encodingStyle in SoapExtension SoapClientMessa ge?

Can anyone tell me how to access the encodingStyle in a client from a
SoapExtension? In particular, I'd like to know the style in
SoapClientMessa ge in the SoapMessageStag e.BeforeSeriali ze.
I'm trying to determine if the message encodingStyle is document/literal or
rpc/encoding (or document/encoding).

From the SoapClientMessa ge I can see in the debugger that there is a value
for message.protoco l.EncodingNs and for message.Client. EncodingNs of
"http://schemas.xmlsoap .org/soap/encoding/", but i get errors that these
members are "inaccessib le due to its protection level" if I try to access them
at compile time. Is there a way using reflection to access these, or some
other way?

Thanks,
Martha Borkan
May 1 '06 #1
3 1821
"M Borkan" <MB*****@discus sions.microsoft .com> wrote in message
news:12******** *************** ***********@mic rosoft.com...
Can anyone tell me how to access the encodingStyle in a client from a
SoapExtension? In particular, I'd like to know the style in
SoapClientMessa ge in the SoapMessageStag e.BeforeSeriali ze.
I'm trying to determine if the message encodingStyle is document/literal
or
rpc/encoding (or document/encoding).

From the SoapClientMessa ge I can see in the debugger that there is a value
for message.protoco l.EncodingNs and for message.Client. EncodingNs of
"http://schemas.xmlsoap .org/soap/encoding/", but i get errors that these
members are "inaccessib le due to its protection level" if I try to access
them
at compile time. Is there a way using reflection to access these, or some
other way?


Martha:

Reflection should work. I would try it if I were you.

Regards,

--
Martin Kulov
http://www.codeattest.com/blogs/martin

MVP, MCT, MCSD.NET Early Achiever

May 1 '06 #2
I'm not very familiar with reflection, and I'm not sure what I should be
relecting on in this case. Here are some possibilites:

message.Method : System.Web.Serv ices.Protocols. SoapClientMetho d
// unfortunately the message.Method and message.method are
// inaccessible due to protection.
// Won't accessing these at runtime just throw FieldAccessExce ption
// or some other Exception?
message.MethodI nfo System.Web.Serv ices.Protocols. LogicalMethodIn fo
message.Client. ClientType : System.Web.Serv ices.Protocols. SoapClientType

How do I find out whether there was a SoapRpcMethodAt tribute applied to
the method (on the message.MethodI nfo which is a LogicalMethodIn fo)?
on its CustomAttribute Provider? or somewhere else?
or a SoapRpcServiceA ttribute applied to the Serice/Class?
(Shouldn't the service attributes propogate down to the methods in
the service)?
Where do I look to see if any of these attibutes are applied?

Thanks in advance,
Martha
May 1 '06 #3
"M Borkan" <MB*****@discus sions.microsoft .com> wrote in message
news:58******** *************** ***********@mic rosoft.com...
I'm not very familiar with reflection, and I'm not sure what I should be
relecting on in this case.
Where do I look to see if any of these attibutes are applied?


Hi Martha,

Look at the links below. I think they will help you.

[1]
http://msdn.microsoft.com/library/de...natruntime.asp

[2] http://msdn2.microsoft.com/en-us/library/a4a92379.aspx

Martin

May 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1748
by: fred carter | last post by:
I would like to be able to set an arbitrary http header from a SoapExtension when said extension is acting on behalf of a client. I have not seen a means for doing so. For incoming messages or their responses (i.e. when the soap extension is intercepting a message as a server function), HttpContext... provides access to the underlying request/response http messages, so headers can be obtained or added from there. So that's fine. ...
0
1373
by: fred carter | last post by:
I would like to be able to set an arbitrary http header from a SoapExtension when said extension is acting on behalf of a client. I have not seen a means for doing so. For incoming messages or their responses (i.e. when the soap extension is intercepting a message as a server function), HttpContext... provides access to the underlying request/response http messages, so headers can be obtained or added from there. So that's fine. ...
0
267
by: fred carter | last post by:
I would like to be able to set an arbitrary http header from a SoapExtension when said extension is acting on behalf of a client. I have not seen a means for doing so. For incoming messages or their responses (i.e. when the soap extension is intercepting a message as a server function), HttpContext... provides access to the underlying request/response http messages, so headers can be obtained or added from there. So that's fine. ...
0
278
by: fred carter | last post by:
I would like to be able to set an arbitrary http header from a SoapExtension when said extension is acting on behalf of a client. I have not seen a means for doing so. For incoming messages or their responses (i.e. when the soap extension is intercepting a message as a server function), HttpContext... provides access to the underlying request/response http messages, so headers can be obtained or added from there. So that's fine. ...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10403
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6893
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3868
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.