I am trying to send a DiagnosticReport with a 2MB attachment as base64 encoding at PresentedForm Data. When I execute :
Exception in thread "main" ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HTTP 500 Server Error: javax.xml.stream.XMLStreamException: Maximum attribute size limit (524288) exceeded
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException.newInstance(BaseServerResponseException.java:254)
at ca.uhn.fhir.rest.client.BaseClient.invokeClient(BaseClient.java:272)
at ca.uhn.fhir.rest.client.GenericClient$BaseClientExecutable.invoke(GenericClient.java:579)
at ca.uhn.fhir.rest.client.GenericClient$CreateInternal.execute(GenericClient.java:683)
at ca.uhn.fhir.rest.client.GenericClient$CreateInternal.execute(GenericClient.java:630)
at com.mycompany.api.client.Client.main(Client.java:458)
The same code is working perfect for attachments smaller than 512K.