473,388 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

NET translation of Java AttachmentPart

I have Java code that uses org.apache.axis.attachments to add a document to a
document object, which is then returned to a web service, code is below.

I believe I should add the filename as the MIME header and the raw data of
the document as a MIME part, but not sure how I can add this. This is done
in the example below by adding the attachment to an instance of the service
call (call), which is passed in as a parameter. But I am confused on how
to do this in .NET since the proxy has no attachment methods. All the .NET
examples I have seen have methods that expect or return an array of bytes.
Using NET 2.0 and can use WSE 3.0. Any help would be appreciated.

Thanks,

David

String filePath = "C:\\temp\\" + i + ".doc";
DataHandler dh = new DataHandler(new FileDataSource(filePath));
AttachmentPart attachmentPart = new
org.apache.axis.attachments.AttachmentPart();
attachmentPart.addMimeHeader(DocumentDescriptor.FI LE_NAME,
docDesc[i].getDocumentName());
attachmentPart.setDataHandler(dh);
call.addAttachmentPart(attachmentPart);


--
David R
Sep 1 '06 #1
0 935

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

Similar topics

1
by: John Benson | last post by:
Hi, I've been looking at the "Oracle9 i Database New Features" guide, from which I quote: XML Generation In response to the challenge of generating XML in bulk from a database, XML generation...
6
by: Stephen Ferg | last post by:
I need to translate some Perl scripts into Python. When I went looking for a tool that would help automate the translation, I was rather surprised that I couldn't find anything. BridgeKeeper,...
3
by: jose isaias cabrera | last post by:
Greetings! I've looked through the internet (not long, though) but I have not been able to find a python translation to buffer = (byte)Integer.parseInt(string,16); Has anyone ported any...
8
by: Terry P | last post by:
Are there any tools (java classes, tag libraries) which can translate xpath statements into a SQL query? Given an xpath query which has a predicate that filters node values or attributes, I want...
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
9
by: tiger79 | last post by:
Hi, I've been translating some API's from VB to C# for a couple of days now. Only I'm a real newbie to both languages, but I managed to do most of it except the next statements, so if anyone knows...
5
by: Mateusz [PEYN] Adamus | last post by:
Hi First of all sorry for large post. I know its big, probably most won't get to the end, but I'm running out of options. I've searched web, I've found some demo project on www.codeproject.com...
3
by: arkaprabha | last post by:
Hi, I am about to start off with a project on "Automated translation from Java Code to C code " . I understand that java uses OOP and C is a structured language. Can anybody tell me how to start...
4
by: EricW | last post by:
Hi, I found the following code in a FAQ about the datagridview. But I am having a hard time translating it to VB, so I would like to ask via here for someone more experienced to translate this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.