Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
0 down vote
favorite
I am trying to create a SOAP request instead of adding service reference that generates proxy classes. The main challenge am facing is with Authentication part. The service provider has 2 URLs 1) Security Token Service [STS] 2) Main service to be called for certain functionality.

The service provider has issued us the public certificate(X.509). This needs to be passed when a call is made to the STS. This service then issues us the SAML token which needs to be part of request to the main service.

With adding service reference approach it was easy to achieve as we just need to create a custom binding object where all the necessary properties are set related to authentication. This binding object was then passed as a parameter along with endpoint address to the proxy class object. Then the proxy class object is set with the certificate. A desired API is called once the certificate and binding object is set.

eg:
ServiceClient client = new ServiceClient(binding, endpointAddress); Client.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.CurrentUser, StoreName.My, X509FindType.FindByIssuerName, IssuerName); client.CallServiceAPI();


On execution if we look at the fiddler tool, we have 2 requests sent one for STS and main service.

Am finding challenge in achieving this via SOAP based approach. Any pointers or suggestions on this is much appreciated.

What I have tried:

I have tried to create request based on the fiddler request structure. But i end up getting internal server error 500.
Posted
Updated 27-Feb-17 19:06pm

1 solution

Hello Abhishek,

why don't you try some third party tool like SoapUI to test your soap services?
You can't pass Soap headers in service by fiddler. So, this tool may be helpful for you.

All the best.


Note: Please mark as answered if helpful for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900