I wrote this to accept the feed in C#.net to test getting the data from them using my personal server at home:
[WebService(Name = "DataFeedTESTV1_0", Namespace = "http://www.sendercompany.com/webservices/datafeed/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
private MessageQueue mq;
private string dataFeedName = "DataFeedMe";
public Service()
{
try
{
mq = new MessageQueue();
mq.Formatter = new BinaryMessageFormatter();
mq.MessageReadPropertyFilter.ArrivedTime = true;
mq.MessageReadPropertyFilter.LookupId = true;
mq.Path = @".\Private$\" + dataFeedName;
EnsureQueueExists(mq.Path);
}
catch {
System.Diagnostics.EventLog.WriteEntry(dataFeedName, "Cannot make a connection.");
}
}
// Creates the queue if it does not already exist.
void EnsureQueueExists(string path)
{
try
{
if (!MessageQueue.Exists(path))
{
MessageQueue.Create(path, true);
}
}
catch (MessageQueueException mqe)
{
System.Diagnostics.EventLog.WriteEntry(dataFeedName, mqe.ToString());
}
}
public function receiveData(String name) { }
They push data using:
static void Main(string[] args)
{
using (DataFeedTest.DataFeedTestV1_0 dfClient = new DataFeedTest.DataFeedTestV1_0())
{
try
{
Console.WriteLine("about to send");
dfClient.receiveData("Test");
Console.WriteLine("send success");
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
}
I come from a background in Java/C++/C and this code is alien to me. What I am trying to do is rewrite our code in PHP to accept the incoming data to be used on our webserver which runs linux.
I am not asking SO to write this for me but to help me understand how this code works. For my questions: "RDF" = the datafeed I use to accept the data and "SDF" - the datafeed they use to send the data.
1. I run the RDF and it starts to run on the default host/port (localhost:1448), now when I run the SDF it successfully sends the message, how did the SDF know to point to the localhost:1448 configuration with only a:
DataFeedTest.DataFeedTestV1_0 dfClient = new DataFeedTest.DataFeedTestV1_0()
2. If I want to rewrite the RDF in php what tutorials could I look at to help me accept this feed? Is it some REST/SOAP/POST/GET api?
This question is long winded but I really need some guidance and I appreciate any comment or suggestion to help me move forward.

New Topic/Question
Reply



MultiQuote


|