Hello all,
i want to use Axis (1.6.5 for compatibility reasons with old web services)
with a web service running on an MS IIS which supports DIME.
I have a c sharp code snippet from the documentation provided by the
web service vendor on how to attach files as DIME attachments to the web
service call, but I have no idea how to attach the files using Axis.
c sharp snippet:
public string AddDimeAttachments(ref ListBox lstFiles2, string
mstrJobFolder)
{
if (wSEVersion != WSEVersion._20)
return null;
WSASampleApp.localhost.exponentWSA oService = new
WSASampleApp.localhost.toolWSA();
oService.Timeout = 30 * 1000;
DimeAttachment oAttach = null;
string[] strFiles = new string[lstFiles2.Items.Count];
int i = 0;
//Attach the files
foreach (string sFile in lstFiles2.Items)
{
FileInfo oFileInfo = new FileInfo(sFile);
oAttach = new DimeAttachment("text/plain",
TypeFormat.MediaType, sFile);
oService.RequestSoapContext.Attachments.Add(oAttach);
//Get files and load them into array
strFiles[i] = oFileInfo.Name;
i++;
}
Uri objURI = new Uri(mstrJobFolder);
return oService.AddJobFilesAsAttachments(strFiles,
objURI.AbsolutePath, "DIME");
}
Axis based Java code (somehow schematic...):
# get service
service = new ToolWSASoapStub(new URL("URL to web service"), null);
# get a job folder from IIS which should be used to store the attachments
jobRemoteFolder = service.addJobFolder();
# ###
# ### something should attach the files as DIME attachments...
# ###
# transfer the files to the folder on the IIS...
String result = service.addJobFilesAsAttachments(fileNames, jobRemoteFolder,
"DIME");
thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]