473,387 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

using .Net soap client wrappers - any way to get to post data?

Hi...

I used wsdl.exe to generate some wrapper classes from someone's soap web
service, and I'm looking for some way to look at what the soap request packet
actually looks like. The webservice I'm consuming is https, so packet
sniffing won't help.

I put a demo in the debugger, and I found that if I get a non-200 status
from the Invoke(), I can catch the error and drill down into the object
hierarchy in the debugger to the PendingSyncRequest._SubmitWrite buffers, but
the VS debugger only shows those as numeric byte values (all 1035 of them);
I'd have to hand-translate all those byte codes to reconstruct the document.

I haven't seen it yet, but is there any method or api I can call at some
point to see what the POST data is? The <xml> soap request package?

Thanks
_mark

Nov 23 '05 #1
8 6103
Hi Mark,

If it wasn't https, we can use packet sniffing as you said, or a simple
trace utility in Soap ToolKit. If you can build a test enviroment with
http, this will be the easiest way.

Wth Https (SSL), we cannot trace the message from network layer. I suggest
you may take a look at Soap Extensions in .NET. Here is two articles about
it:

Digging into SOAP Headers with the .NET Framework
http://msdn.microsoft.com/library/de...us/dnservice/h
tml/service06182002.asp

Altering the SOAP Message Using SOAP Extensions
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconalteringsoapmessageusingsoapextensions.asp

With Soap Extensions, we can access the soap message at BeforeSerialize or
AfterSerialize, and log its content somewhere.

Luke

Nov 23 '05 #2
Hi...

Thanks for the links; that's been very helpful. The sample SoapExtension is
basically what I wanted to do. The gap I'm finding in the documentation,
however, is how to get the SoapExtension plugged in and working. There are
some references to how to configure a web.config for ASP.Net, and in another
spot a small reference to gaccing your extensions and plugging them into the
machine.config for everything, but I'm not having any luck figuring out out
to phrase it for an app.config just for my test case.

Probably won't need a <system.web> wrapper, don't know if I'll need a
<webServices> wrapper. For an app.config, will I need a section header to
specify this, or will these be recognized as "built in"?

Thanks
-mark

Nov 23 '05 #3
Hi Mark,

On server side, you can put it in web.config. On client side, we need to
add it in app.config, for example:

<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add
type="WebServiceProgress.ProgressExtension, WebServiceProgress"
priority="1" group="0" />
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
Luke
Nov 23 '05 #4
Hi Luke...

Thanks for responding. I took the TraceExtension example right out of the
msdn doc page you pointed me to, and then made a local config exactly like
the one below, except with TraceExtension in the add type.

I had the config file in the bin\debug directory with the project build.
First I called it app.config, then I called it <app>.exe.xml (which one msdn
page said should be the form. Neither worked, in that I don't get into the
extension code at all. And I didn't see any build/startup errors shown, so
I'm not sure what I'm doing wrong.

Should the app.config be somewhere else? Should it be built into the app as
a resource?

Thanks
_mark

Nov 23 '05 #5
Hi Mark,

If your windows application named "winapp.exe", your config file should be
in same folder and named "winapp.exe.config". You can add
"winapp.exe.config" mannually, or VS.NET compiler will help you generate it:

In VS.NET IDE, you can open the app.config and edit it. Then compile the
project.

Luke
Nov 23 '05 #6
Thanks Luke... When you create an extension, do you need to register it in
the GAC or something? As I said, I copy and pasted the TraceExtension code
directly from the msdn webpage into my project and then added
<add type="TraceExtension" priority="1" group="0"/>

in the application config. Now that I've got the app config in the right
place, it blows up saying that the type value is illegal. Then I changed it
from being a free-range class to being in the app namespace and put
"t.TraceExtension" but it still blows up saying the type value is illegal,
but it doesn't say what's illegal about it.

Thanks
_mark
"[MSFT]" wrote:
Hi Mark,

On server side, you can put it in web.config. On client side, we need to
add it in app.config, for example:

<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add
type="WebServiceProgress.ProgressExtension, WebServiceProgress"
priority="1" group="0" />
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
Luke

Nov 23 '05 #7
Hello,

For the "type" element, we need to specify the full class name like:

<add
type="WebServiceProgress.ProgressExtension, WebServiceProgress"
priority="1" group="0" />
"WebServiceProgress.ProgressExtension" is the full class name with
namespace; WebServiceProgress is the assembly name in the application
folder.

Luke
Nov 23 '05 #8
Hello Mark,

I think we have you add an assembly name here even the class is define in
same assembly. Also, the class name should be full name with namespace.

Luke
Nov 23 '05 #9

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

Similar topics

1
by: trapeze.jsg | last post by:
Hi. I am trying to get through to Microsoft MapPoint Services using ZSI for soap handling. I can generate the service classes and also the soap-requests generated by the service classes seem to...
8
by: FS Liu | last post by:
Hi, I am writing ATL Service application (XML Web service) in VS.NET C++. Are there any sample programs that accept XML as input and XML as output in the web service? Thank you very much.
0
by: Peter Conrey | last post by:
I have a perl web service (using SOAP::Lite) with a method called "Detail" that returns a strucure (hash reference to be exact). It works fine when consumed by a Perl client, but when I try to...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
5
by: David Lozzi | last post by:
Howdy, I wrote a web service in .Net for my customer. My customer has another vendor who now has to consume it but they are not using Visual Studio. Most of their pages are jsp, and they said...
1
by: Heena Patel | last post by:
Hi, I have a implemented a web service interface that has a webmethod accepting xml, but I need to also have post option available to my webservice. I understand if a client Posts a SOAP...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.