I have a simple SOAP service which takes one parameter(long) and returns a string. I have used SOAP UI and I am able to access the service fine and get a successful response.
What is that iam trying to achieve
SQL store procedure which will fetch the ID from the database (parameter for the service). Make a call to C# assembly (SQL CLR) C# assembly returns the result string back to SQL.
I have tried the following
Aproach 1
Create a c# class library with service reference to my service. The method is exposed correctly e.g., GetConfigPath(long id) However when I try to install the library into SQL I get a error. The assembly looks for System.ServiceModel and it is not found in SQL blah.
Approach 2
I used the following link and followed step by step (obviously changed the parameters to suit my requirement etc)
[https://code.msdn.microsoft.com/Calling-WCF-Service-from-a-8071ceaa#content][1]
When i was adding webreference as shown in the link above, I noticed that my method had an additional parameter e.g., GetConfigPath(long id, bool idpassedin)
I thought it might be default so I continued and installed the stored procedure into the database exactly as show in the link above. The installation script works fine. However when I run the stored procedure I get the following error.
The request failed with HTTP status 400: Bad Request.
I am using the following tools VS2015 SQL 2014