Skip to main content

Response

What answers do I receive while registering a credit entry?

AEach HTTP response consists of two parts. The first one is the header and the second one is the body. If the calling party requests the invoice, the body will be a pdf file. The header is always a name=value pair. There is an option to get the values in the header in all programming languages that support HTTP requests. In Számla Agent you can put data in the header using the following names that always start with szlahu_:

  • szlahu_szamlaszam: the number of the created invoice for which you register the credit entry, URL encoded

  • szlahu_nettovegosszeg: number type data, not URL encoded

  • szlahu_bruttovegosszeg: number type data, not URL encoded

  • szlahu_error: text of error message, 1 sentence, URL encoded

  • szlahu_error_code: number type data, not URL encoded

  • szlahu_fizetesmod: type of payment, not URL encoded

If there are error codes in the header, the other data (invoice number, gross and net value) will not be present in the header. In the case of an XML response, the XML will also include these data besides the header.

There are two possible answers:

  • in case everything goes well, the response will be as follows:

  • text marking the success: xmlagentresponse=DONE

  • in case there was some kind of error, you will get an error message as follows:

The format of the error message will be as seen below. The part between [ERR] and ------------ is important.

[ERR] Számla mentés sikertelen. Már létező rendelésszám: XX. ---------- t.getMessage(): Már létező rendelésszám:
XX. ---------- [CEG:978] [MODUL:SZAMLAZZGUI] [INSTANCE:hu.kboss.szamlazz.gui.action.AcXmlSzamla] Már
létező rendelésszám: XX.[LOCATION:hu.kboss.szamlazz.api.bean.SzFej.insert (SzFej.java) #1700]
hu.kboss.szamlazz.api.bean.SzFej.insert(SzFej.java:1700)
hu.kboss.szamlazz.gui.action.AcXmlSzamla.performAction(AcXmlSzamla.java:242)
hu.kboss.szamlazz.controller.Controller.executeAction(Controller.java:715)
hu.kboss.szamlazz.controller.Controller.doGet(Controller.java:468)
hu.kboss.szamlazz.controller.Controller.doPost(Controller.java:639)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662)