sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Java Sending HTTP Post

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java Sending HTTP Post

    So I have a customer who wants us to send an XML file through HTTP. I can create the XML file but how would I send this through using Java? From what I hear this would be much easier. I have played very little in the Java stuff so any ideas or help would be great.
    It goes to https://macropoint-lite.com/api/1.0/tms/data/location
    I have a user name and password to pass into it but just not sure how this all works. I can get the XML file in the IFS just fine as well..
    I'm almost there... I think!!!
    Thanks in advance.




  • #2
    Did you Google for "Send http request java" and didn't find anything?

    Comment


    • #3
      No.. I did but WOW. I'm doing this on an iseries...

      Comment


      • #4
        Originally posted by CaptainRon View Post
        I'm doing this on an iseries...
        And...? Is there a problem there?
        Tom

        There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

        Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

        Comment


        • #5
          I doubt very much that you're still running an iseries, they were discontinued in 2007. More likely on Power Systems running IBM i. Not sure why that evokes a "wow", since Java has been on the platform for 20 years now, and has never run particularly well. There are much better choices available if you want a mainstream language, you can run PHP, Python, Node.js or Ruby. All modern languages (including RPG IV) have a way to do HTTP communications. IBM even provides built-in HTTP capabilities in SQL these days.

          Comment


          • #6
            OK.. AS/400 That better. WOW is that I have never really programmed in JAVA and GOOGLE hits came up with lots of stuff. Meaning I cannot grasp it with all that info.. So don't be judgmental people on here. Your comments are taken offensive. I can see you all are not going to be helpful. So if you cannot answer my question or can and not be a prick then do so.. Otherwise leave it to the professionals that treat people with respect.

            Comment


            • #7
              Anytime someone suggests that you use a newer name, or gives opinion on a what might be a better approach, this is unprofessional? Or not wanting to help?

              This is taking time away from my life to try to help you, it does nothing for me. I'll gladly stop replying to your posts.

              Comment


              • #8
                CaptainRon, I think Scott is trying to say there are lots of ways to do what you want. Google is your friend. Using Java is only one option, Scott kindly provides an Open Source set of API's to send HTTP requests through RPG programs. I get don't get the need to pounce on the naming issue, we all know its current name (IBM i) and should use it, but to bother to correct everyone and suffer the backlash creates a lot of needless effort.

                You say you were told this would be easy using Java, if Java is not your language of choice then look to do the same in your particular language of choice, that removes all the anguish of trying to learn a new language on top of trying to figure out how to use it for technology you are unfamiliar with as well.

                I use C, I would review the IBM API's

                Comment

                Working...
                X