Sending XML to a gateway

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by CassMan >> Mon, 20 Aug 2007 8:47:32 GMT

Hi there,

I work for a bureau company called CCM and we have been using JADE for our systems for a number of years now. A new government gateway has been introduced in which they now want all financial forms etc to be sent through in XML format. I have written the JADE code to create the XML documents with the correct data within the tags, and i now must find a way of sending the files over an HTTPS connection to their gateway.

My system must then, once the file is sent, hold a conversation with their gateway made up of replies to and fro, all as XML documents, between my software and their gateway. The intervals between these replies is specified in tags within each XML document reply. This conversation continues until their system accepts our file is valid.

I am new to JADE and i have learnt as i have gone along, however, this project is proving to be beyond what i can learn without some guidance. Any help would be greatly appreciated. Up to now, my focus has been mainly on the CnHTTP class within the CardSchema, but i may be completely wrong here.

I will send any more information that people need. Thank you all in advance! :-)

Rich Cassell

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by cnwjhp1 >> Mon, 20 Aug 2007 21:20:05 GMT

Is the new government gateway a Web Service by any chance?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by Allistar >> Tue, 21 Aug 2007 9:18:40 GMT

I would find it odd if this government gateway wasn't some sort of SOAP provider (i.e. a webservice). If this is the case then I suggest you take a look at the web service white papers and documentation.

Do the government provide you with a "wsdl" for that gateway?

Allistar.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by CassMan >> Tue, 21 Aug 2007 9:36:59 GMT

Hi Allistar & cnwjhp1,

Firstly, you will have to excuse any schoolboy errors that i may have made as i have only worked with JADE for around a week - so i am pretty much in the deep end here! I have got some more detailed info though:

All i have been provided with is a submission site and a port number, with that i believe i have to do is open up a TCP/IP Connection, then create the XML document, wrap it in HTTP headers and send it through the connection. Responses, from both sides, are then sent through the same tunnel. I am now using the TcpIpConnection class and i have created a conenction, but, when i try to open the connection (i.e. myTcpIpConn.open() ), i get an error saying that the connection target host was not found (error number 31002). If i try connecting to localhost then that works with no errors, so the code seems to be sound - its the address it is unhappy with. I have had clarification that the address is correct and it should work, and my initial idea of an over-active firewall doesn't seem to be the problem.

Is there any attribute of a TcpIpConnection object that i need to be aware of that may cause this problem?

Thank you for your help, appologies for my vagueness and possible silly errors! :-P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by CassMan >> Tue, 21 Aug 2007 9:47:09 GMT

Hi Allistar & cnwjhp1,

Firstly, you will have to excuse any schoolboy errors that i may have made as i have only worked with JADE for around a week - so i am pretty much in the deep end here! I have got some more detailed info though:

All i have been provided with is a submission site and a port number, with that i believe i have to do is open up a TCP/IP Connection, then create the XML document, wrap it in HTTP headers and send it through the connection. Responses, from both sides, are then sent through the same tunnel. I am now using the TcpIpConnection class and i have created a conenction, but, when i try to open the connection (i.e. myTcpIpConn.open() ), i get an error saying that the connection target host was not found (error number 31002). If i try connecting to localhost then that works with no errors, so the code seems to be sound - its the address it is unhappy with. I have had clarification that the address is correct and it should work, and my initial idea of an over-active firewall doesn't seem to be the problem.

Is there any attribute of a TcpIpConnection object that i need to be aware of that may cause this problem?

Thank you for your help, appologies for my vagueness and possible silly errors! :-P

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by CassMan >> Tue, 21 Aug 2007 11:43:50 GMT

The problem is now fixed!

For interest sake - the mistake i made was setting the name of the TcpIpconnection object to include the http:// at the start, plus all /'s too. It turns out that simply entering the raw URL works, but nothing else.

Thank you all.

Regards,

Rich

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Sending XML to a gateway

Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:09 pm

by CassMan >> Tue, 21 Aug 2007 9:45:46 GMT

Hi Allistar & cnwjhp1,

Firstly, you will have to excuse any schoolboy errors that i may have made as i have only worked with JADE for around a week - so i am pretty much in the deep end here! I have got some more detailed info though:

All i have been provided with is a submission site and a port number, with that i believe i have to do is open up a TCP/IP Connection, then create the XML document, wrap it in HTTP headers and send it through the connection. Responses, from both sides, are then sent through the same tunnel. I am now using the TcpIpConnection class and i have created a conenction, but, when i try to open the connection (i.e. myTcpIpConn.open() ), i get an error saying that the connection target host was not found (error number 31002). If i try connecting to localhost then that works with no errors, so the code seems to be sound - its the address it is unhappy with. I have had clarification that the address is correct and it should work, and my initial idea of an over-active firewall doesn't seem to be the problem.

Is there any attribute of a TcpIpConnection object that i need to be aware of that may cause this problem?

Thank you for your help, appologies for my vagueness and possible silly errors! :-P


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 37 guests