简体   繁体   中英

Hosting 2 WCF services locally for debugging purposes

This problem may be a little broad, but I'm going to go ahead and put it out there and then elaborate as needed on details.

My overall goal is a WCF rest service that when hit calls a WCF soap service, then parses the response of the soap service and extracts desired information and sends it back via http post (to a mobile device eventually).

I am having a problem getting the soap response to the rest service.

This is what is happening:

  1. Console application calls rest service via http post. this is working
  2. Rest service submits message to soap service. this is working
  3. Soap service recognizes message and performs requested operation. this is working

After that, the return value is being generated in the soap service, but it isn't making it back to the rest service. I have tried numerous things. I've got the bindings identical, I've checked and double checked and triple checked the data contracts. I've tried quite a few things and what I'm wondering is if there is a problem using localhost to host 2 services. Both services are hosted locally and both are wcf services.

Would this cause a problem like the one I am seeing?

I will elaborate on the problem as needed as much as I can.

After fixing the problem, I can answer with confidence that running 2 services will not cause a problem. The actual problem in my case was caused by the bindings not being quite identical, once they were, it ran fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM