axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samisa Abeysinghe <samisa.abeysin...@gmail.com>
Subject Re: Binary data problems
Date Sat, 08 Jul 2006 07:50:50 GMT
PaweĊ‚ Pustelnik wrote:

> Hi All,
>
> I have already posted two messages about binary data problems but with 
> no  reply.
> I hope this time somebody can help me:)
>
> In my apllication I use web service which is written with Apache Axis. 
> The  main goal of this
> service is to send a large files (large, from 1 Mb to 100 Mb). There 
> is no  problem when I want
> to send  small images (less than 5 Mb) but with larger ones I find all 
> the  time the problems.
>
> Here is the code responsibly for sending these files:
>
> xsd__base64Binary FileWebService::getBinaryFile(xsd__string  
> Value0,xsd__string Value1)
> {
>     string fileName = "C:\\Program Files\\Apache  
> Group\\Apache2\\htdocs\\Files\\";
>     fileName += "file_";
>     fileName += Value1;
>     fileName += ".bin";
>
>     FILE *pFile;
>       pFile = fopen ( fileName.c_str() , "rb" );
>     
>     // obtain file size.
>     fseek (pFile , 0 , SEEK_END);
>       long lSize = ftell (pFile);
>       rewind (pFile);
>
>      // allocate memory to contain the whole file.
>       unsigned char* buffer = new unsigned char[lSize];
>       if (buffer == NULL) exit (2);
>
>     // copy the file into the buffer.
>       fread (buffer,1,lSize,pFile);
>     fclose (pFile);
>
>     xsd__base64Binary tab;
>     tab.set(buffer, lSize);
>     //delete buffer;
>     return tab;
> }
>
>
> I tested this service with two clients. First one which is written 
> with  Axis does not work,
> even for small images. I always get the error message about Timed Out...
>
> The second client is written in C# and it works fine, however it gets  
> WebService Failed message
> for large files.
> I even decided to write the service funtcion which can send large 
> files in  many parts (every
> part = 10 Mb) but it still does not help and gives errors.
>
> Thanks,
> Pawel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>
>
I am not sure what is causing the problem on Axis C++.
However, you may try the same with Axis2/C MTOM support. We have tested 
the C implementation with Java clients, but not with C#.

Samisa...

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message