473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

error in sending heavy images

Hi friends,

I am creating an application in C++ to send image to
webservice(developed ib DOTNET) end. I am using gSoap for the same.
using gSoap I am able to send images upto 2 to 3 mb but while sending
heavy images it returns error. I am using following code.

enGSLayerErrCode ImportComponentRequest(const char* kUrl,
vector<string&refXMLRequest, bool &refImportStatus)
{

enGSLayerErrCode retval = eFAILURE;

struct soap stSoap;
soap_init(&stSoap);

//setup input/output parameters
_MediaLink__WS_USCOREImportComponent stIn;
_MediaLink__WS_USCOREImportComponentResponse stOut;
do{
stSoap.recv_timeout = 0; //MAX_RECV_TIMEOUT; 0 for disabling
timeout
stSoap.send_timeout = 0; //MAX_SEND_TIMEOUT;

stIn.arrXML = new MediaLink__ArrayOfString();
int nRequestSize = refXMLRequest.size();
stIn.arrXML->__sizestring = nRequestSize;
stIn.arrXML->string = new char*[nRequestSize];
int i=0;
for(i = 0 ; i< nRequestSize ; i++)
{
int nSize = refXMLRequest[i].size();
char *tempstr = new char[nSize+1];
memcpy(tempstr, refXMLRequest[i].c_str(), nSize);
tempstr [nSize] = NULL;
stIn.arrXML->string[i] = tempstr ;
}

//call webmethod ImportComponent() //kURL is the URL for webservice
if(soap_call___MediaLink__WS_USCOREImportComponent (&stSoap, kUrl,
NULL, &stIn, &stOut)
== SOAP_OK)
{
//get the update or insert query status
refImportStatus = stOut.WS_USCOREImportComponentResult;
retval = eSUCCESS;
}
else //if error in webmethod ------------here enters for heavy
images...................
{
if( (stSoap.error eSUCCESS) || (stSoap.error <= eSOAP_LENGTH) ||
(EOF == stSoap.error) )
{
retval = enGSLayerErrCode(stSoap.error);
}
}
for(i = 0 ; i< nRequestSize ; i++)
{
if(stIn.arrXML->string[i])
delete stIn.arrXML->string[i];
}
if(stIn.arrXML->string)
delete [] stIn.arrXML->string;
if(stIn.arrXML)
delete stIn.arrXML;

}while(false);

soap_destroy(&stSoap);
soap_end(&stSoap); \
soap_done(&stSoap);

return retval;
}
Please help me to sort out the problem.
Thanks
Dharmendra Singh Tomar

May 31 '07 #1
0 871

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Damien | last post by:
Hi to all, After hours of attempts and "googling", I'm still pulling my hair off my head when I try to send multipart html emails. It "works" on PCs with Outlook when I juste send a single...
2
by: Nis Sarup | last post by:
A customer of mine wants to make a newsletter for their website. The newsletter should be HTML with images and sent to a database of her subscribers. They would like a script where they can easily...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
2
by: chrisben | last post by:
Hi All Has anyone done any experiment on comparison between C++ and C# on socket rec/send speed Conditions in Windows system, same CPU for senders or receivers. Can you see how much faster a...
9
by: Sandy | last post by:
can mfc application, send text data to opened notepad file in desktop?(live transfer of data) . can anybody help
7
by: Joe Ross | last post by:
I've been working with Microsoft support for over 3 weeks now on an intermittent General Network Error we're seeing in our production environment between our ASP.NET application and SQL Server...
2
by: Aneesh Pulukkul[MCSD.Net] | last post by:
Hi, I have a HTML page and associated images. I need to send the HTML as email -the email should also display the images at respective places. So am sending the content of HTML file as...
6
by: ssankar | last post by:
hi all - I have been tasked to send customized emails to a set of users based on a certain condition in my company. ( This is NOT SPAM ) I have used MIME::Lite successfully to send html...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.