We are looking to request/receive a PDF document via a webservice call, how do w

We are looking to request/receive a PDF document via a webservice call, how do we go about presenting the received document? Ideally we would like to present it inline in a UIT, but only see the option of including images (gif and jpeg), does it have to be linked to a stored document somehow?

I am also unsure how to convert the data from the webservice to a PDF to be displayed or linked to, are is there an existing example application or other resource to work from as a baseline?

Thanks!...

OriginalPostID-101607

OriginalPostID-101607

  Discussion posts and replies are publicly visible

Parents
  • I am still not getting a document out of it, I am attaching a screen shot of my model.

    Some datapoints:
    the string in the response body comes out to about 44,000 characters, but when base64decode() is run against it the resulting string is just over 700 chars (seems short to me.) bring this up because the logs show a couple of errors:
    first (the reson I think there is an issue with the input to [Appian Document from Base 64 string] is being truncated somewhere):
    2014-03-11 13:02:48,627 [default-threads - 15] ERROR com.appiancorp.process.runtime.activities.custom.Base64StringToDocumentActivity - java.lang.ArrayIndexOutOfBoundsException: 65533
    java.lang.ArrayIndexOutOfBoundsException: 65533
              at org.castor.util.Base64Decoder.translate(Base64Decoder.java:167)
    ...

    then (I interpet this as just "it failed to create the document" likely due oto the prior error:
    2014-03-11 13:02:48,635 [default-threads - 15] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=3592, classname=com.appiancorp.process.runtime.activities.custom.Base64StringToDocumentActivity
    com.appiancorp.suiteapi.process.framework.ActivityExecutionException: The document could not be created. Error: 65533
              at com.appiancorp.process.runtime.activities.custom.Base64StringToDocumentActivity.execute(Base64StringToDocumentActivity.java:45)
              ...

Reply
  • I am still not getting a document out of it, I am attaching a screen shot of my model.

    Some datapoints:
    the string in the response body comes out to about 44,000 characters, but when base64decode() is run against it the resulting string is just over 700 chars (seems short to me.) bring this up because the logs show a couple of errors:
    first (the reson I think there is an issue with the input to [Appian Document from Base 64 string] is being truncated somewhere):
    2014-03-11 13:02:48,627 [default-threads - 15] ERROR com.appiancorp.process.runtime.activities.custom.Base64StringToDocumentActivity - java.lang.ArrayIndexOutOfBoundsException: 65533
    java.lang.ArrayIndexOutOfBoundsException: 65533
              at org.castor.util.Base64Decoder.translate(Base64Decoder.java:167)
    ...

    then (I interpet this as just "it failed to create the document" likely due oto the prior error:
    2014-03-11 13:02:48,635 [default-threads - 15] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=3592, classname=com.appiancorp.process.runtime.activities.custom.Base64StringToDocumentActivity
    com.appiancorp.suiteapi.process.framework.ActivityExecutionException: The document could not be created. Error: 65533
              at com.appiancorp.process.runtime.activities.custom.Base64StringToDocumentActivity.execute(Base64StringToDocumentActivity.java:45)
              ...

Children
No Data