dsi
dsi

Reputation: 3359

Facing an issue while using existing Web service as wcf into VS 2012

I have one of webservice which as below method

    c.Accountdata ad = new  Accountdata();
    c.response res = ad.PostData(RequestData);

NOw, i have used above webservice into vs 2012 as add service reference so, it is added as a WCF SERVICE.

Now, i get below code.

   c.AccountdataSoapClient ad =new AccountdataSoapClient();
   c.response res = new c.response();
   ad.PostData(REQUESTHEADER,RequestData,out res).

//in above method, two argumnets are increased (HEADER AND OUT PARAMETER).

I have passed request header instance as it is not actually existed in web service. NOW, PROBLEM: it throws CLIENT FAULT EXCEPTION.

please suggst me how i could use same web service into this VS 2012 and correct such issue.

not sure, how old webservice schema map into WCF.

Thanks

Upvotes: 1

Views: 37

Answers (1)

Alexanderius
Alexanderius

Reputation: 841

If your web service is an old-style web-service (not WCF) then you should add a reference to it by this old-services compatibility menu, and use it as you are used it before: enter image description here

Upvotes: 1

Related Questions