A
A
Artem2015-12-08 15:01:49
Java
Artem, 2015-12-08 15:01:49

HTTP request and XML parser in JAVA?

Hello. I just started learning the Java language, but have already encountered a real problem at work, which I would not want to give up.
You need a program in the window of which you will need to enter several data with a submit button. It will send a request like this to the server:

Content-Type: text/plain;charset=utf-8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<request>
<auth dealer="9999" login="1234" password="5678"/>
<request/>

And to receive XML the answer.
<?xml version="1.0" encoding="utf-8"?>
<response result="103" result-description="Bad credentials" >
</response>

<?xml version="1.0" encoding="utf-8"?>
<response result="0" result-description="" >
<accounts>
<account id="1678" name="randomname" update-date="2013-04-08T18:53:03" external-balance="1.1200"/>
<account id="1234" name="randomname" update-date="2013-04-08T18:53:05" external-balance="1000.0000"/>
</accounts>
</response>

From this XML, you need to extract the data of a specific field and display it in a window.
Prompt at least in what direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2015-12-08
@zolt85

Dig towards HttpClient and JAXB

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question