Here is what I'd do.
Expose a web service to accept requests.
Your middle-tier then passes that request to a web service
downstream of
your design. Initially, that web service may exist locally
on your system.
So your middle-tier is simply accepting data via web
service, and sending to
another web service. Thats the middle tier done and you have
separated out
the tier from being tightly coupled to always sending to a
particular type
of downstream 3rd party.
That final web service then only has to worry about how to
connect to the
third party system (remember, initially this service may be
hosted locally
on the same machine as your middle tier component). I'd
advise trying to get
them to expose a web service, or something that accepts HTTP
POST data as
that is pretty easy. Ideally, if they could use the service
that you have
defined on their system, you would have an easy job of
sending data to it.
If not, then you may have to deal with TCP communications,
it really depends
on what they will expose. I would expect this to change over
time though as
they perhaps formalise/enhance their method of
communications though. The
beauty of this design is never having to change your
middle-tier at all,
just the implementation of your downstream service.
- Glav
-----Original Message-----
From: Peter Suter [mailto:petersuter ozemail.com.au]
Sent: Thursday, 7 September 2006 8:19 AM
To: aspnet-architecture aspadvice.com
Subject: [aspnet-architecture] RE: tcp connection
webservice?
I have recently been building almost exactly what you've
just specified. Let
me know if you're interested in buying.
I use a webservice to accept the request, a tpc socket
connection to the 3rd
system to pass the request on and get it's response,
followed by sending the
response from the webservice.
' A basic TCP/IP send via socket:.
Dim sender As New Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp)
sender.Connect(remoteEP)
Dim msg As Byte() = Encoding.ASCII.GetBytes(SendPacket)
Dim bytesSent As Integer = sender.Send(msg)
Best Regards
Peter Suter
Adaptable Business Software
http://www.adapta
blesoftware.com.au
petersuter adaptablesoftware.com.au
----- Original Message -----
From: "Michal Tesar" <michal.tesar gmail.com>
To: <aspnet-architecture aspadvice.com>
Sent: Wednesday, September 06, 2006 7:11 PM
Subject: [aspnet-architecture] tcp connection webservice?
> Hi All,
>
> I have few questions and I couldn't find anything good
on google about
> this, if someone could point me to some direction, or
give me any advice
> on this problem I have, I would really appriciate it.
>
> I have to build a system, which will accept a
request(structured xml) from
> another location, I then have to save some information
from this request
> into my database, and pass the request on to another
system (another
> location).
>
> The third system (the one my application will pass the
request on) has
> those specifications:
> The system features a simple single request dialogue.
Using the
> connection-oriented feature of the TCP connection the
system is able to
> detect if the response was successfully delivered to
MySystem. In the
> event that the response is not successful 3rdSystem
will perform a
> real-time roll-back of the reserved request.
>
> Communication:
> I need to establish a TCP socket connection to the
3rdSystem to a
> designated PORT.
> The socket is closed after each Request/Response.
Multiple connections can
> be running
> at the same time.
>
> Security:
> The IP address and port number will be provided for
each client. A VPN
> connection needs to be set up.
>
> When I receive the response from the 3rdSystem, I will
pass it on to the
> first client that is waiting for the response from the
begenning.
>
> I need to make the middle software, so I am thinking
that I would
> implement the same thing the 3rdSystem has. And I would
pass on the same
> requirements to the client, I need something very
simple and fast.
>
> I've got no idea how TCP protocol works, and if I
should do this via a
> .net webservice, or how?
>
> Please help!
>
> Thank you,
> Mike
>
>
> Need SQL Advice? http://sqladvice.com
> Need RegEx Advice? http://regexadvice.com
> Need XML Advice? http://xmladvice.com
>
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
Need SQL Advice? http://sqladvice.com
Need RegEx Advice? http://regexadvice.com
Need XML Advice? http://xmladvice.com
|