TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
elhanan
NA
1
0
How do i get an attachment from axis to net client?
Feb 2 2005 3:47 PM
hi.. i can't figure this out... i have a small web service in axis 1.1 which returns a file: import javax.activation.DataHandler; import javax.activation.FileDataSource; public class AttachmentHandler { public DataHandler GetAttachment(String isFileName) { String sFileName=isFileName; DataHandler dh = new DataHandler(new FileDataSource(sFileName)); return dh; } } it works in a java client off course, and on vb6 with soap toolkit 3.0 client. now i've stumbled upon the "DataHandler being exposed in the wsdl" and i solved it by simply creating a wsdl from a function in vb with the same signature as the one in java, (i've used the wizard in the toolkit) i them compared both wsdl and by trial and error i found out i needed to switch between apach:DataHandler type in the wsdl with the UnknownBinaryContent Type (i copied and pasted the whole thing and created a static wsdl file for the Java web Service so vb client can consume it. this works. problem is, i can't do the same with DOTNET client, if i tell it to consume the modified wsd file it creates to proxy classes AttachmentHandlerService and AttachmentHandlerServiceWSE if i try to use the first i get an exception in the invoke method saying: System.InvalidOperationException: Client found response content type of 'multipart/related; type=\"text/xml\"; start=\"<16D767B35F8E70F81BCBE1E03AF9314A>\"; \tboundary=\"----=_Part_3_8355938.1107376652875\"', but expected 'text/xml'. if i use AttachmentHandlerServiceWSE i simply get a SystemError exception
Reply
Answers (
0
)
!Page.IsPostBack
Registry to xml conversion