all groups > dotnet xml > june 2007 >
You're in the

dotnet xml

group:

Access to SOAP Objects


Access to SOAP Objects doug
6/29/2007 1:22:04 PM
dotnet xml:
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.

RE: Access to SOAP Objects stcheng NO[at]SPAM online.microsoft.com
7/2/2007 12:00:00 AM
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/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.



RE: Access to SOAP Objects doug
7/2/2007 3:54:00 PM
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.

[quoted text, click to view]
RE: Access to SOAP Objects stcheng NO[at]SPAM online.microsoft.com
7/3/2007 2:50:53 AM
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.
RE: Access to SOAP Objects doug
7/5/2007 3:24:01 PM
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

[quoted text, click to view]
Re: Access to SOAP Objects John Saunders [MVP]
7/5/2007 8:11:12 PM
[quoted text, click to view]

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]
Re: Access to SOAP Objects doug
7/5/2007 8:12:04 PM
Yes, I need access to the SOP Request and Response and it looks like VS and
Framework hide the Soap implementation details.

doug

[quoted text, click to view]
Re: Access to SOAP Objects John Saunders [MVP]
7/6/2007 12:02:32 AM
[quoted text, click to view]

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]
Re: Access to SOAP Objects doug
7/6/2007 8:44:05 AM
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

[quoted text, click to view]
Re: Access to SOAP Objects doug
7/6/2007 10:40:02 AM
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

[quoted text, click to view]
Re: Access to SOAP Objects doug
7/6/2007 11:06:04 AM
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

[quoted text, click to view]
Re: Access to SOAP Objects doug
7/6/2007 1:12:00 PM
I do not believe a requirement (in my case a post code/test requirement) to
capture Soap traffic is asking for all that much. I don't think asking for a
simple method that gets invoked while receiving and sending what is the
actual message sent up and down the line is an over the top request. It
apparently isn't there (except maybe as 3rd party add-on).

I have reviewed samples on web service side and client side, mostly for pre
MSVS 2005 where it seems a lot has changed. Apparently the now depreciated
Soap SDK worked. It has been superceded by WSE 1, WSE1.1, WSE2, and WSE3.
These don't seem to work. I appreciate digging into the bowels can be
hard/difficult. It was easier in ASP days. Now it is easier to code just
the work you want without coding so much housekeeping. Fine. But it
shouldn't be that complex either. Enter WSE. Previously it was suggested I
look at WSE. I found WSE v3 and it loaded fine (earlier versions are not
correct for my configuration). I configured it, used it to update my client
sde test aspx page's web.config, my code matches the sample code, and I
believe I've done all configuration tasks documented. The WSE Soap Tracing
isn't working. Searches show that others have hit the same wall I have. It
would appear MS provided a tool to capture Soap messages cleanly and somewhat
easily, yet it doesn't work, and doesn't say that it failed or even tried.
So the tool is not working or it use isn't fully documented.

I'm hoping someone can resolve my client side ASPX WSE3 Framework v2 .Net
2005 issue that seems to predominently involve changes to web.config.



[quoted text, click to view]
Re: Access to SOAP Objects John Saunders [MVP]
7/6/2007 1:31:40 PM
[quoted text, click to view]

Can you simplify the problem? In particular, can you reproduce it without
WSE?
--
John Saunders [MVP]
Re: Access to SOAP Objects John Saunders [MVP]
7/6/2007 1:43:12 PM
[quoted text, click to view]

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

Adding WSE just for tracing is a bit of overkill!
--
John Saunders [MVP]
Re: Access to SOAP Objects John Saunders [MVP]
7/6/2007 2:55:51 PM
[quoted text, click to view]

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]
Re: Access to SOAP Objects John Saunders [MVP]
7/6/2007 8:47:16 PM
[quoted text, click to view]

That's not true. The sample I cited had what you need with
SoapTraceExtension.

[quoted text, click to view]

Well, no. The SOAP SDK was superseded (for .NET code) by ASP.NET Web
Services. WSE is a set of extensions to ASP.NET Web Services. It has also
been superseded, this time by Windows Communications Framework, which is
part of .NET 3.0.

[quoted text, click to view]


You may not realize it, but you are greatly complicating your life by using
WSE. Its features are MUCH more than you seem to need, and that may be the
problem you're having with web.config.

I don't know who recommended WSE, or why, but I would reccomend against WSE
unless you need to use standards like WS-Addressing, WS-ReliableMessaging,
etc.

--
John Saunders [MVP]
Re: Access to SOAP Objects stcheng NO[at]SPAM online.microsoft.com
7/9/2007 5:50:21 AM
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/issues/04/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.

Re: Access to SOAP Objects stcheng NO[at]SPAM online.microsoft.com
7/11/2007 12:00:00 AM
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.
AddThis Social Bookmark Button