By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,435 Members | 2,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,435 IT Pros & Developers. It's quick & easy.

Access to SOAP Objects

P: n/a
I hadn't had a class yet and I had some MS help on this to set up, but I
wrote a .Net WS that creates a proxy class response using SOAP. Works fine.
And in kind of a good way, the IDE has hidden the SOAP implementation so from
my end I'm just creating, passing back my XML proxy class.

The client side consumer of WS has for 1) text file containing entire SOAP
response and recently 2) average size of response in bytes to iclude SOAP
components.

I hadn't had the time to figure out how to expose the SOAP objects, so was
only able to create file reflecting my XML class serialized out.

Now I need to figure out how to expose the SOAP objects for my own education
and troubleshooting, buit also to be able to know how to answer questions
like this.

My initial take was if this was so easy why can't client just determine size
of response as they receive it. Ought to be same number. But I would like
to know how to do this.
Jun 29 '07 #1
Share this Question
Share on Google+
15 Replies


P: n/a
Hi Doug,

From your description, you're dealing with some webservice message exchange
task and have some program accesing the SOAP message or the related
objects, correct?

As for the problem, I'm still not quite sure on your detailed scenaro,
would you provide some further explanation on the application or service
you're developing or consuming? Generally, for .NET webservice, if you're
also using .net framework based client to consume it, you simply generate
the client proxy class and calling webmethod through the client proxy, you
do not need to deal with the underlying SOAP message. Also, any objects
that can be XML serialized can be passed in the webmethod via XML
serialization(and embeded in SOAP message). Is there any particular
requirement here that you need to access the raw SOAP content?

If you do need to access the underlying SOAP XML content of webservice
method calls, you have the following means:

** through non-dev approach, you can use some http or TCP trace utility to
capture the underlying SOAP message sent between webservice server and
client

** for ASP.NET webservice, you can also use SOAP extension to
programmatically get the underlying SOAP message content(e.g create a
message logger).

#SOAP Message Modification Using SOAP Extensions
http://msdn2.microsoft.com/en-us/library/esw638yk.aspx

If there is anything I missed here or any other specific questions, please
feel free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.

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


Jul 2 '07 #2

P: n/a
There isn't any problem per se. I just want to know how to view the SOAP
implementation and objects. I was asked during initial unit testing and
system testing to supply entire SOAP message received and sent and more
recently, average size of SOAP response sent. MSVS did a wonderful
implementation that hides much and I can appreciate that. I'd just like to
look under the covers a bit. I'll look at your link. Thank you.

"Steven Cheng[MSFT]" wrote:
Hi Doug,

From your description, you're dealing with some webservice message exchange
task and have some program accesing the SOAP message or the related
objects, correct?

As for the problem, I'm still not quite sure on your detailed scenaro,
would you provide some further explanation on the application or service
you're developing or consuming? Generally, for .NET webservice, if you're
also using .net framework based client to consume it, you simply generate
the client proxy class and calling webmethod through the client proxy, you
do not need to deal with the underlying SOAP message. Also, any objects
that can be XML serialized can be passed in the webmethod via XML
serialization(and embeded in SOAP message). Is there any particular
requirement here that you need to access the raw SOAP content?

If you do need to access the underlying SOAP XML content of webservice
method calls, you have the following means:

** through non-dev approach, you can use some http or TCP trace utility to
capture the underlying SOAP message sent between webservice server and
client

** for ASP.NET webservice, you can also use SOAP extension to
programmatically get the underlying SOAP message content(e.g create a
message logger).

#SOAP Message Modification Using SOAP Extensions
http://msdn2.microsoft.com/en-us/library/esw638yk.aspx

If there is anything I missed here or any other specific questions, please
feel free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.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/subscripti...t/default.aspx.

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


Jul 2 '07 #3

P: n/a
Thanks for your reply Doug,

Sure. If you need any further help on this, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 3 '07 #4

P: n/a
Looks like the SOAP SDK is depreciated. I found a WSE download:
en_Web_Services_Enhancements_1.0.msi but on install it says it requires
Framework 1.1 (which is installed version 1.1.4322.573), but I also have
Framework v2 (version 2.0.50727.42) installed via MSVS 2005 install. It
hints this is a "beta" version (or maybe it is stating the 1.1 is beta)
neither should be unless MS shipped beta with MSVS 2005.

Our projects are all Framework v2 based.

Is there a better WSE download?

If I need to see the Soap request coming from the client will I need to
install anything in my WS to expose this or can it be gotten from my test
client listening in on my WS port?

doug

"Steven Cheng[MSFT]" wrote:
Thanks for your reply Doug,

Sure. If you need any further help on this, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 5 '07 #5

P: n/a
"doug" <dm*****@newsgroups.nospamwrote in message
news:0A**********************************@microsof t.com...
Looks like the SOAP SDK is depreciated. I found a WSE download:
en_Web_Services_Enhancements_1.0.msi but on install it says it requires
Framework 1.1 (which is installed version 1.1.4322.573), but I also have
Framework v2 (version 2.0.50727.42) installed via MSVS 2005 install. It
hints this is a "beta" version (or maybe it is stating the 1.1 is beta)
neither should be unless MS shipped beta with MSVS 2005.

Our projects are all Framework v2 based.
I don't recall your original post, so I don't recall if you need the
features of WSE.

Is there a reason you can't just use straight .NET Framework code?
--
John Saunders [MVP]

Jul 6 '07 #6

P: n/a
Yes, I need access to the SOP Request and Response and it looks like VS and
Framework hide the Soap implementation details.

doug

"John Saunders [MVP]" wrote:
"doug" <dm*****@newsgroups.nospamwrote in message
news:0A**********************************@microsof t.com...
Looks like the SOAP SDK is depreciated. I found a WSE download:
en_Web_Services_Enhancements_1.0.msi but on install it says it requires
Framework 1.1 (which is installed version 1.1.4322.573), but I also have
Framework v2 (version 2.0.50727.42) installed via MSVS 2005 install. It
hints this is a "beta" version (or maybe it is stating the 1.1 is beta)
neither should be unless MS shipped beta with MSVS 2005.

Our projects are all Framework v2 based.

I don't recall your original post, so I don't recall if you need the
features of WSE.

Is there a reason you can't just use straight .NET Framework code?
--
John Saunders [MVP]

Jul 6 '07 #7

P: n/a
"doug" <dm*****@newsgroups.nospamwrote in message
news:6F**********************************@microsof t.com...
Yes, I need access to the SOP Request and Response and it looks like VS
and
Framework hide the Soap implementation details.
Doug, there are several things you can do to get closer to the wire.

You can use a SoapExtension, for instance. These can get access to the raw
message stream coming in or going out, and can change it before the server
sees it or before the client sees it. They can also get access to a
higher-level version of the same data. See
http://support.microsoft.com/kb/320438 for a bunch of good examples.

You may also want to look at
http://msdn2.microsoft.com/en-us/library/dkwy2d72.aspx, which is the
beginning of a set of articles on "Customizing SOAP Message Formatting"
--
John Saunders [MVP]

Jul 6 '07 #8

P: n/a
I installed WSE v3, used the tool to update web.config with new settings to
enable inputtrace.webinfo and outputtrace.webinfo and I ensured permissions
for website directory set to full control for NETWORK SERVICE and ASPNET
accounts. I issued IISRESET, and reran my test aspx page. No output.
Nothing logged in event logs. I'm running everything local (web service and
client) in IDE. Web searches find others with same problem and either no
reply or replays suggests it should work.

doug

"John Saunders [MVP]" wrote:
"doug" <dm*****@newsgroups.nospamwrote in message
news:6F**********************************@microsof t.com...
Yes, I need access to the SOP Request and Response and it looks like VS
and
Framework hide the Soap implementation details.

Doug, there are several things you can do to get closer to the wire.

You can use a SoapExtension, for instance. These can get access to the raw
message stream coming in or going out, and can change it before the server
sees it or before the client sees it. They can also get access to a
higher-level version of the same data. See
http://support.microsoft.com/kb/320438 for a bunch of good examples.

You may also want to look at
http://msdn2.microsoft.com/en-us/library/dkwy2d72.aspx, which is the
beginning of a set of articles on "Customizing SOAP Message Formatting"
--
John Saunders [MVP]

Jul 6 '07 #9

P: n/a
"doug" <dm*****@newsgroups.nospamwrote in message
news:81**********************************@microsof t.com...
>I installed WSE v3, used the tool to update web.config with new settings to
enable inputtrace.webinfo and outputtrace.webinfo and I ensured
permissions
for website directory set to full control for NETWORK SERVICE and ASPNET
accounts. I issued IISRESET, and reran my test aspx page. No output.
Nothing logged in event logs. I'm running everything local (web service
and
client) in IDE. Web searches find others with same problem and either no
reply or replays suggests it should work.
Can you simplify the problem? In particular, can you reproduce it without
WSE?
--
John Saunders [MVP]

Jul 6 '07 #10

P: n/a
Reproduce what? My web service runs fine currently. Client side asked for
data pertaining to the Soap response I send back, so I want to capture the
Soap message. It seemed like WSE with trace enabled would do the trick on my
test client page without having to put code in web service directly.

doug

"John Saunders [MVP]" wrote:
"doug" <dm*****@newsgroups.nospamwrote in message
news:81**********************************@microsof t.com...
I installed WSE v3, used the tool to update web.config with new settings to
enable inputtrace.webinfo and outputtrace.webinfo and I ensured
permissions
for website directory set to full control for NETWORK SERVICE and ASPNET
accounts. I issued IISRESET, and reran my test aspx page. No output.
Nothing logged in event logs. I'm running everything local (web service
and
client) in IDE. Web searches find others with same problem and either no
reply or replays suggests it should work.

Can you simplify the problem? In particular, can you reproduce it without
WSE?
--
John Saunders [MVP]

Jul 6 '07 #11

P: n/a
"doug" <dm*****@newsgroups.nospamwrote in message
news:0B**********************************@microsof t.com...
Reproduce what? My web service runs fine currently. Client side asked
for
data pertaining to the Soap response I send back, so I want to capture the
Soap message. It seemed like WSE with trace enabled would do the trick on
my
test client page without having to put code in web service directly.
Wow. If you ever posted that, then I forgot it.

Adding WSE just for tracing is a bit of overkill!
--
John Saunders [MVP]

Jul 6 '07 #12

P: n/a
Overkill? Maybe. We are in serious testing phase and client side says they
are having and issue, please email the Soap response I created to them. From
my side, not having had any .Net formal .Net training but have many years of
VB and ASP XML based webservices, this is my first Soap experience, and MS
was clever in hiding the implemtation details so code doesn't care how it may
have been invoked - knowing how to capture Soap request/response seems like a
normal thing to want. If that makes it overkill, that was a design choice
made by MS not me.

doug

"John Saunders [MVP]" wrote:
"doug" <dm*****@newsgroups.nospamwrote in message
news:0B**********************************@microsof t.com...
Reproduce what? My web service runs fine currently. Client side asked
for
data pertaining to the Soap response I send back, so I want to capture the
Soap message. It seemed like WSE with trace enabled would do the trick on
my
test client page without having to put code in web service directly.

Wow. If you ever posted that, then I forgot it.

Adding WSE just for tracing is a bit of overkill!
--
John Saunders [MVP]

Jul 6 '07 #13

P: n/a
"doug" <dm*****@newsgroups.nospamwrote in message
news:5F**********************************@microsof t.com...
Overkill? Maybe. We are in serious testing phase and client side says
they
are having and issue, please email the Soap response I created to them.
From
my side, not having had any .Net formal .Net training but have many years
of
VB and ASP XML based webservices, this is my first Soap experience, and MS
was clever in hiding the implemtation details so code doesn't care how it
may
have been invoked - knowing how to capture Soap request/response seems
like a
normal thing to want. If that makes it overkill, that was a design choice
made by MS not me.
Ok, I didn't know the background.

BTW, the implementation details they're hiding aren't the sort that would
let you easily figure out how to capture the request/response. It's more
complicated than that.

When you get some time, you may want to look at
http://support.microsoft.com/kb/320438, which is an article with web service
sample code in a download. It includes a SoapTraceExtension sample. I have
used one of these to trace request and response messages in production code.
I based it on another MSDN article I can't find any longer.

Another reason to look at the SoapTraceExtension sample is that it will at
least give you an idea of how complicated an environment you're actually
working in. You'll be glad that Microsoft hid the implementation details
from you!
--
John Saunders [MVP]

Jul 6 '07 #14

P: n/a
Hi Doug,

So your current concern is still capture the underlying SOAP xml message of
the webservice request/response, correct?

As I mentioned, earilier, for ASP.NET webservice, without any add-on
component(such a WSE), you can use custom SoapExtension to capture
request/response SOAP messages.

#Using SOAP Extensions in ASP.NET
http://msdn.microsoft.com/msdnmag/is.../03/ASPColumn/

You can register your custom soapextension at either server-side service or
client-side webservice proxy through application configuration file. If you
feel necessary, I can also send a simple demo soapextension that logs soap
message I've ever write for test.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Jul 9 '07 #15

P: n/a
Hi Doug,

Any further question on this? If you need any other help on this ,please
don't hesitate to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 11 '07 #16

This discussion thread is closed

Replies have been disabled for this discussion.