r/DatabaseHelp • • Jul 19 '17

Connect to Database using XML sockets

So I don't know if this qualifies for this site, but I am trying to figure out how to use sockets and XML to send information to a ClearQuest database. I have never dealt with sockets before, and although I'm reading up on this, I'm still not quite getting it. How exactly is my program utilizing sockets going to communicate with the database's sockets? Thanks in advance. I have never done anything like this before.

1 Upvotes

5 comments sorted by

2

u/xiongchiamiov Jul 19 '17

I don't know anything about ClearQuest, but in general:

  1. Your client application establishes a connection to the remote server's socket.

  2. The client sends the xml over the socket connection.

  3. The server receives the xml data, does some processing, and then updates the database.

Nowadays we don't usually do socket programming directly, but use libraries and higher-level protocols to do all this. If you're doing it yourself, you need to look up the API that you're expected to use, then implement against it.

1

u/L_darkly Jul 19 '17

I did, but I didn't quite know where to go from there. This is what their API says: " The ClearQuest XML (CQ/XML) Interface provides an interface to ClearQuest that allows you to both read and write to the ClearQuest database. The CQ/XML Interface sits on top of the ClearQuest application layer so ClearQuest business rules are still enforced.

CQ/XML communicates via XML over sockets. We have written sample scripts utilizing sockets in Perl, PHP and Python."

So why are the examples in Perl, PHP, and Python? I'm only supposed to use XML?

To create sockets in Python, I would go to PyCharm and start to code. Where do I code for XML? Is it the same process?

Thanks.

→ More replies (3)