WCF Web Service Call Timeout

I am using a web service from a url. When I test using SoapUI, I immediately get a response (see image below) and that the request data that I sent went to the other end.

So, in my C # application, I did the same thing, I used the wsdl web service and automatically created a proxy class. I create a request based on this proxy class with the same request data that I used in SoapUI and sent. I confirmed that, on the other hand, they successfully received my data, and there were no errors.

However, I never get any identifier, and after a while I get this exception:

Error HTTP request to http://someURLWebservice.com/WSoperation 'exceeded the allocated timeout 00: 00: 59.9470000. The time allotted for this operation may have been part of a longer timeout.

Am I missing something? I downloaded WSDL and generated the mock service using SoapUI, and if I make a call to this web service layout locally, I will return it right away. The ID back.

Here is my code:

string serverURL = Settings.Default.ExtensionServiceURL; //Get Proxy class client ext.ExtWSPortTypeClient client = new ext.ExtWSPortTypeClient(); EndpointAddress addr = new EndpointAddress(serverURL); try { client.Endpoint.Address = addr; Uri site = new Uri(serverURL); client.Endpoint.ListenUri = site; ExtensionData eData = new ExtensionData(); client.ChannelFactory.CreateChannel(); Console.WriteLine("Sending Locator Event Request to Web Service"); ext.locatorEventResponse1 resp = await client.locatorEventAsync(eData.GenerateLocatorEventRequest(ev)); } catch (Exception ex) { Console.WriteLine("Error " + ex.Message); } finally { if (client != null) { ((ICommunicationObject)client).Close(); } } 

enter image description here

+6
source share
3 answers

So, I decided to configure Fiddler2 to sniff my SoapUI request and compare it with my application request. In the application request header, I saw the following:

 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Host: engage.ext-inc.com Content-Length: 1036 **Expect: 100-continue** 

Waiting: 100-continue is not in the SoapUI request, which successfully sent and received a response. With that in mind, I took the SoapUI request in Fiddler and created a new base on it ... except that I set Expect: 100-continue and guess that I did not receive a response.

After reading about this, I came across this link

And voila, setting ServicePointManager.Expect100Continue = false; In my code, before I make a web service call, I immediately get a response.

+3
source

In a similar situation, I started with the following:

Test with the WCF client and write the trace file:

Test the soapUI client and write down the Http Log

  • Clear soapUI http log (one of the tabs below)
  • Send message via soapUI test request
  • Save Http Log

Once you have the trace information for both clients, you should be able to compare transactions and hopefully determine the source of the problem. In particular, I would suggest confirming the service addresses on both sides, and then compare the SOAP envelope to make sure the WCF bindings are set in series with the soapUI settings.

In addition, you can also use Fiddler to view web service messages. The next SO post provides good reference links. Fiddler and Web Service Traffic Monitoring

Hope this helps. Yours faithfully,

+3
source

Check your message quota settings, your service may be sending more than configured.

0
source

All Articles