Web Service and Images

troup1998

New Member
We have v10.1 on Windows.

We are connecting to a .net web service to pull a picture(*.gif)

Using the prosoapview I can see that it processes ok. I think; what I'm not sure about is the character set of the image.

We have a node containing the picture. I can't seem to save it in a format where it can be viewed.

DEF VAR cPicture AS LONGCHAR. /* The Picture */

/** The WSDL defining the Output **/
The WSDL defines the output as Base64Binary
<s:element minOccurs="0" maxOccurs="1" name="InmateImageByBookingNumberResult" type="s:base64Binary" />


/*** Get the Picture ***/

RUN InmateImageByBookingNumber IN hInmateImage (INPUT cString, OUTPUT cPicture) NO-ERROR.
RUN ErrorInfo(OUTPUT lError). /** Show Errors If they Exist ***/

COPY-LOB FROM cPicture TO FILE "C:\temp\inmate.gif" NO-ERROR. /** Is this correct **/


Above I'm trying to save the picture. But I question the image data to begin with. If I save all the image data into a file it's 35K. The image that I am attempting to receive is only 24K.

How do I take the Image from the webservice and save it so it can be viewed.
 

bulklodd

Member
according to your wsdl your image is encoded with BASE64 algorithm so before saving it as a file you should decode it with the use BASE64-DECODE function.

hth
 

troup1998

New Member
Re: Web Service and Images --Resolved

Thanks for the help. It's all resolved now.

We can see inmate booking photos from from our application now. Users don't have to log in to corrections website to see who they are dealing with.

Mike Emmons
State Attorney, Ninth Circuit
Orlando, FL
 
Top