Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Srikanth

Greenhorn
+ Follow
since Nov 17, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Srikanth

Hi,

I have developed a webservice that will send files to client as Attachments.

The only problem is: the String (msg) returned by the service is null. When
I remove the attachment-stuff from my service, everything is working
nicely, though.

So, my question is: What am I doing wrong now?
16 years ago
posted November 17, 2005 06:04 AM
--------------------------------------------------------------------------------
posted November 17, 2005 05:50 AM
--------------------------------------------------------------------------------
hi guys,

I have developed a webservice using Axis1.1 and a java Client. Webservice is a simple file mangement system where it receives file from client and sends requested files as Attachment.
/////
String str = VET_GetFile(ID, Filename);

//service function
public java.lang.String VET_GetFile(ID, Filename);
{
String str = "S_FAILED";
if (VET_Authnticate(ID)
{
str = SendFile(Filename);
}
LogMsg(str);
return str;
}
the above function returns a string with value either " S_OK" or "S_FAILED".

If the function is succesfull a file wiil be sent to the client as attachment and the function return S_OK else it will S_FAILED.

I get a S_FAILED message in the client when the service is not able to retreive/send a file. but when service sends a file as a Attachment client receives a null value. i f i see the logs of the service LogMsg before return statement in above function logs S_OK, so str is having a relavent value. I have no clue where str s getting null value.

have Any body faced this kind of error.
--------------------

Srikanth
16 years ago
posted November 17, 2005 05:50 AM
--------------------------------------------------------------------------------
hi guys,

I have developed a webservice using Axis1.1 and a java Client. Webservice is a simple file mangement system where it receives file from client and sends requested files as Attachment.
/////
String str = VET_GetFile(ID, Filename);

//service function
public java.lang.String VET_GetFile(ID, Filename);
{
String str = "S_FAILED";
if (VET_Authnticate(ID)
{
str = SendFile(Filename);
}
LogMsg(str);
return str;
}
the above function returns a string with value either " S_OK" or "S_FAILED".

If the function is succesfull a file wiil be sent to the client as attachment and the function return S_OK else it will S_FAILED.

I get a S_FAILED message in the client when the service is not able to retreive/send a file. but when service sends a file as a Attachment client receives a null value. i f i see the logs of the service LogMsg before return statement in above function logs S_OK, so str is having a relavent value. I have no clue where str s getting null value.

have Any body faced this kind of error.
16 years ago
hi guys,

I have developed a webservice using Axis1.1 and a java Client. Webservice is a simple file mangement system where it receives file from client and sends requested files as Attachment.

Problem is function in webservice return a string with success or failure code. When i am sending a file as an attachment from the webservice, client receives a null value. Service return a null when there is Attachment to be sent is there is no attachment client receives what evermessage service return.

String str = VET_GetFile(ID, Filename);
the above function return a string and also a file as an attachment. but the str value is received as null.

have Any body faced this kind of error.
16 years ago