Reputation: 2203
So I have to setup a webservice. Basically, we send X509 signed XML files to each through HTTP. We have their URL that we have to post to, so sending it isn't a huge issue, I can figure that out. However, I have to let the 3rd party know which URL that THEY can post to on our end. How am I supposed to achieve that URL?
I want to setup the web service so it auto detects any requests posted to us, and extracts the signed XML from the soap message and does something with it, and then has the capability to format a SOAP response signing the XML on our end using x509, and send it over HTTP back to them.
Can anyone give me a decent explanation of how I would set something like this up in Visual Studio 2008? We have other services that have an api.ashx that have methods like this:
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
But basically what is that URL that its grabbing the HTTP from. And can I set this up the same way?
Upvotes: 1
Views: 375
Reputation: 7376
The URL of your service has nothing to do with the SOAP or any of that. If you have WCF service (.svc) or an ASMX service (.asmx) then typically, you will host that somewhere within a webserver - if you are using http for the transport mechanism.
So the URL - http://mywebserver.mydomain:80/a/b/c/myservice.svc - might correspond to a service file called myservice.svc that is in folder c, which is in folder b, which is in folder a, which is in the root directory of the web site that is listening at port 80 (this is the default value and can be left out) on the server called mywebserver which resides on the domain mydomain.
A web site may contain virtual directories as well as regular ones so this can be a bit more complicated.
So if you were using the Default Web Site on IIS and no virtual directories, then you would place your service file here: C:\Inetpub\wwwroot\a\b\c\myservice.svc
Hope that helps
Upvotes: 0
Reputation: 1784
The URL which the client will call your service is "I guess" dependent on your toolkit. i.e. Manual is your friend.
This is what Axis2c offers : The service is deployed under services directory. Which is also pointed by your webserver.
Thus anything under services/MyCustomService will translate as : http://yourip:port/axis2/services/MyCustomService
With your SOAP toolkit , the endpoint might have a different layout. A service on MS toolkit i am calling currently is something like : http://theirip:port/name/name.aspx/serviceName
Cheers!
Upvotes: 0
Reputation: 8644
There are some good definitions of SOAP Web Services out there:
Some examples on how to create Web Services in .NET:
With those articles and some googling it didn't take me too long to set up a small web service serving that behaves like an external API to our application.
Upvotes: 3