473,569 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 PendingSyncRequ est._SubmitWrit e 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 6115
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/cpconalteringso apmessageusings oapextensions.a sp

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:

<configuratio n>
<system.web>
<webServices>
<soapExtensionT ypes>
<add
type="WebServic eProgress.Progr essExtension, WebServiceProgr ess"
priority="1" group="0" />
</soapExtensionTy pes>
</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.con fig". You can add
"winapp.exe.con fig" 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="TraceExte nsion" 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.TraceExtensi on" 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:

<configuratio n>
<system.web>
<webServices>
<soapExtensionT ypes>
<add
type="WebServic eProgress.Progr essExtension, WebServiceProgr ess"
priority="1" group="0" />
</soapExtensionTy pes>
</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="WebServic eProgress.Progr essExtension, WebServiceProgr ess"
priority="1" group="0" />
"WebServiceProg ress.ProgressEx tension" is the full class name with
namespace; WebServiceProgr ess 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
3273
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 be OK. The problem I am facing is that I can't seem to authenticate myself. I have made a small change to ZSI.client so that when I get a "401...
8
2568
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
2301
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 consume it with a C# application, I get the following runtime error from C#: Cannot assign object of type System.Xml.XmlNode to an object of type...
3
6876
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 as per RFC 2617 (http://www.faqs.org/rfcs/rfc2617.html). My attempts to authenticate are failing. The server requires the header to be present with...
3
7706
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 value for the UserName token. Is it possilbe at all to do this from VBScript (or jscript?)? I know I will be limited with what I can do with the SOAP...
5
10380
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 they need to consume this web service using HTTP. The developer's IDE is Notepad. Yeah, weird I know. How is this done? I guess if I can get it to...
1
1604
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 reqyest, it will work with my webservice. The problem is my client cannot send soap method, they will be sending normal httpstream to me. I want the Web...
2
6750
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 definitely getting a hit when I use a browser to get to my hibye.cgi server (well, a blank page rather than a 404). However, when I run my hibye.pl...
0
2228
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. The problem I have is the first record gets processed fine where as the second record always; reason being the EAI expects it to be a seperate call...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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. ...
0
7983
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...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5223
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...
0
3657
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...
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.