.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Seeing the SOAP request sent from a Web Service Client/Consumer

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :WCF
 
Hello, I am building a web service consumer in C# in VS2010.  Using the provided WSDL, I need to build appropriate headers and use certificates, SSL (user name & pass), & WS security.  I am getting an error from the webservice side, specifically processing the <wsse:Security> header. Is it possible for me to see the exact request I am sending to the Webservice? I'd like to see the values of the pieces of the header that get put in and such. Is it possible to have human readable serialization of what's being passed in right before the error? Thank You


View Complete Post


More Related Resource Links

Need help in reading Soap request and response on invoking WCF client assembly

  
Hi All,   I'm new to WCF and i'm using .Net 3.5. I have created a library from the proxy class generated through svcutil. I'm able to succesfully invoke service methods. I was wondering how to capture the request and response soap xmls so that i could render it on browser. If you have any code piece for this kind of problem please share it with me. Regards, Rahul

Signing The Body of a Web Service Request (From Client)

  
Hello, I attempting to consume a webservice, which has numerous security factors, one of which is SSL. I am using WS-Security and attempting to sign the body of my request.  Right now it is only currently signing the timestamp and to: (endpoint).  I've been scouring the forums, but seem to come to a dead end with threads dying off... http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/034f71cd-408e-447c-a95c-e0cf4baa5742 I'm assuming I will have to modify the reference.cs file or maybe even the WSDL, but here's some of the code I've done for the binding..is this on the right track? WSHttpBinding myBinding = new WSHttpBinding(); myBinding.Security.Mode = SecurityMode.TransportWithMessageCredential; myBinding.Security.Message.ClientCredentialType = MessageCredentialType.Certificate; myBinding.Security.Message.NegotiateServiceCredential = false; myBinding.Security.Message.EstablishSecurityContext = false;

consuming wcf Data service in different format in client - SOAP (including a WDSL), XML, JSON, etc.

  
Hi I have implemented wcf data service with entity framework with the following steps, i want to know i can we consume this WCF Data service in different format like (SOAP, JSON, XML, PLIST). it will be helpfull if some one help on this. - Created web application with VS2010 and added edmx file and selected tables,views and SPs that i want to use - imported SP with complex type by using function import. - Created WcfDataservice (.svc File). - in SVC File i have added [webget] method as follows.         [WebGet]        public List<GetSearchResultWithComplextype_Result> GetSearchResultComplextype(string email, string Title, string Color)        {            Entities db = new Entities();            var query = db.GetSearchResultWithComplextype(email, Title, Color);            List<GetSearchResultWithComplextype_Result> caseList = query.ToList<GetSearchResultWithComplextype_Result>();            return caseList;        } - created one more client application and added service reference. here i want to cons

consuming wcf Data service in different format in client - SOAP (including a WDSL), XML, JSON, etc.

  
Hi  I have implemented wcf data service with entity framework with the following steps, i want to know i can we consume this WCF Data service in different format like (SOAP, JSON, XML, PLIST). it will be helpfull if some one help on this. - Created web application with VS2010 and added edmx file and selected tables,views and SPs that i want to use - imported SP with complex type by using function import. - Created WcfDataservice (.svc File). - in SVC File i have added [webget] method as follows.         [WebGet]         public List<GetSearchResultWithComplextype_Result> GetSearchResultComplextype(string email, string Title, string Color)         {             Entities db = new Entities();             var query = db.GetSearchResultWithComplextype(email, Title, Color);             List<GetSearchResultWithComplextype_Result> caseList = query.ToList<GetSearchResultWithComplextype_Result>();             return caseList;         } - created one more client application and added service reference. here i wan

Sign outgoing client request SOAP body with WSE 3.0

  

Hi,

We currently have the code in WCF to sign the outgoing client requests' SOAP Body, however we need the same code for use with WSE 3.0.  I can't find any examples of this.  

Is it possible?  If so, does anyone have an example?

Thank you,


Fetch raw XML for SOAP request and response inside WCF client

  
Hi,

I've got a basis WinForms test harness that's implementing a WCF client (.NET 3.5) which calls a SOAP web service.  I need to be able to write the HTTP request and response and output the two XML documents so I can load them back into WebBrowser controls on the form.

It looks like the way to accomplish this is to implement a custom IClientMessageInspector and an IEndpointBehavior, apply the behavior to the binding and then do the work of capturing the XML inside AfterReceiveReply and BeforeSendRequest (inside IClientMessageInspector implementation).

So my questions are:

1. This seems like a rather exhaustive process, is there a more straightforward approach to doing this? 

2.  If I am on the right path, does anyone have links to related articles/code samples related to this?

3. In what I have coded so far, I am held up trying to get the behaviorExtension to register properly (inside app.config), it looks as if I must register my classes that implement behavior Extenshions in the GAC in order to make use of them, is this true? 

Thanks in advance for taking time away to help a fellow developer!


IIS memory increasing for each client request in asmx web service

  

A customer reported that our asmx web service is continually increasing in memory (mem usage as well as private bytes).  We are able to reproduce the problem in our lab with Windows 2003 Server SP2 (fully patched) on some of the machines.  The customer is using Windows 2008.

We created a Hello World web service targeting the 2.0 framework built under VS2005 SP1 and a test client that continues to call it.  The memory increases steadily - approximately 40K per client request.  If the test app is paused, the memory remains the same.  When it is closed, the memory drops.  Explicit calling of GC.Collect does not drop the memory.

We have run the memory profiler on the service and the leak is all native memory.  We have uninstalled/re-installed the Framework on one of the machines but no difference.  To our knowledge all of the security and IIS settings are not modified.  We have compared app pool, default web site and virtual directory properties to  machines that have no problem and they are identical.

 
Has anyone else experienced this?  Any suggestions?


400 Bad Request from Web Service - client in China

  

Hi Folks,

I have a standard .NET 2.0 web service which has been working for several years. We're trying to connect in a client PC in China, and its coming up with 400 Bad Request.

The browser (ie6) can access the web server through https://dnsname

The browser can also access the webservice itself though https://dnsname/webservice.asmx

But the actual client software is still coming up with 400 bad request - any ideas please ?

We could successfully connect to it from PCs in the UK. The web server is in usa.

thanks

 

 

 


How do I add the client certificate to a soap request?

  

hello all,


I want to add the client certificate to the web request, but i'm unable to do it because it's not visible. here are the examples:


I have a web test project. if i add an asmx webservice to the web protect, i am able to do this

 

void buttonclick()
{
   WebService1 ws = new WebService1();
   ws.URL = ... someURL;
   ws.ClientCertificates.Add(new certificate in here); 

 

here's the problem,
if i add a webserivce project to the current solution (web test solution). And I reference the webservice. and when i do this:

 

void buttonclick()
{
  InstantName.Service1 ws = new InstantName.Service1();
  ws.URL ...??? Don't see it
  ws.ClientCertificates.Add( ... not here ... ) 

 

both web services class inherits the System.Web.Services.Protocols.SoapHttpClientProtocol


i don't get it ... anyone has experience with this, please give some input .. thank you.


Problem to obtain client IP on web service

  

Friends,

I'm having problems to obtain the client IP on web service. Here's my scenario:

One server with Windows 2003, hosting the web service using .Net Framework 2.0, with IP 10.0.2.50 and host name ServerTransaction.
Other server with Windows 2003, hosting a web application using .Net Framework 2.0, that consuming the web service on  ServerTransaction, with IP 10.0.2.51 and host name ServerApplication.
Many other computers on the local network (IPs: 10.0.2.80, 10.0.2.81, 10.0.2.82, ...) acessing the web application on ServerApplication.

On the code of the web service I've tried to use HttpContext.Current.Request.UserHostAddress or HttpContext.Current.Request.ServerVariables("REMOTE_ADDR") or HttpContext.Current.Request.ServerVariables("HTTP_X_FORWARDED_FORR"), but always I can only get the IP of ServerApplication (10.0.2.51).

Any idea or tip?


Thanks and sorry for my bad english.


.Net Frameword 4 SOAP Web Service

  

 Hi

We want to upgrade from VS2005 to VS2010. Before we do that, I would like some clarity about some things.

Q1:

Can we build typical SOAP webservices with the 4 Framework as I could with 2.0?

Q2:

Would a WCF Service allow me to have both REST/SOAP services in one application?

Q3:

Is Framework 4 ONLY for REST services and I need to stick to 3.5 for SOAP?

 

I downloaded the free Web Developer 2010, but I cannot seem to get anywhere trying to figure this out.

 

Thanks for any input.

 

Johan

 

 


Smart Client: Building Distributed Apps with NHibernate and Rhino Service Bus, Part 2

  

Smart client applications are responsive and promote interactivity with the user. In this article, we continue building a smart client application using NHibernate for data access and Rhino Service Bus for reliable communication with the server.

Oren Eini

MSDN Magazine August 2010


Smart Client: Building Distributed Apps with NHibernate and Rhino Service Bus

  

Smart client applications are responsive and promote interactivity with the user. In this article, we start the processes of planning and building a smart client application using NHibernate for data access and Rhino Service Bus for reliable communication with the server.

Oren Eini

MSDN Magazine July 2010


Extreme ASP.NET: Client-Side Web Service Calls with AJAX Extensions

  

Microsoft AJAX Library and the ASP.NET 2.0 AJAX Extensions provide a number of compelling features ranging from client-side data binding, to DHTML animations and behaviors. Learn all about them here.

Fritz Onion

MSDN Magazine January 2007


Service Station: WSE 3.0, SOAP Transports, and More

  

It's that time again. Time to answer some of the questions I get on a regular basis. This month I'll look at service orientation and policy-based compatibility, SOAP's transport-neutral design, and Web Services Enhancements (WSE) 3.0.

Aaron Skonnard

MSDN Magazine June 2006


SOAP: Using ATL Server to Build an Asynchronous SOAP Client in Unmanaged C++

  

SOAP opens up a new world of Web Services, letting you make function calls across a network or the Internet. But this flexibility creates new problems when your app needs to wait for calls to return from halfway around the world. What you need is an asynchronous SOAP client that takes advantage of threading to continue execution while waiting for calls over the wire. This article covers the basics of building such a client with ATL.

Pranish Kumar and Bogdan Crivat

MSDN Magazine April 2002


Develop a Web Service: Up and Running with the SOAP Toolkit for Visual Studio

  

The new Simple Object Access Protocol (SOAP) Toolkit for Visual Studio 6.0 provides the infrastructure for developers to build, expose, and consume Web services. With a few exceptions that are outlined in the toolkit, the SOAP Toolkit complies with the SOAP version 1.1 specification. It includes the Remote Object Proxy Engine (ROPE), a Service Description and Code Generation Wizard, and code that provides ASP and ISAPI reference implementations of SOAP listeners. This article describes the tools and the object model of the SOAP Toolkit, and then demonstrates ASP and ISAPI implementations of a functional Web service using this toolkit.

Rob Caron

MSDN Magazine August 2000


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend