473,394 Members | 1,843 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,394 software developers and data experts.

Problem with Dime-attachments from Axis to .NET


Hello all,
I want to create a .NET-based web service that can accept dime-based
attachments from a java (Axis)-based client. I have searched for
examples that look like this scenario, but haven't found any.

I have created the service in C#, here is the code:

HttpSoapContext.RequestContext.Path.MustUnderstand = false;
StreamReader stream = new
StreamReader(HttpSoapContext.RequestContext.Attach ments[0].Stream);
// here I can do something with the stream...
From Axis, I have used the WSDL2Java tool to create the stub-code to
access the .NET web service. This is the code:

MyLocator locator = new MyLocator();
FileInputStream stream = new FileInputStream("c:\\dok1.doc");
MySoapStub archive = (MySoapStub) locator.getMySoap();
archive._setProperty(Call.ATTACHMENT_ENCAPSULATION _FORMAT,
Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);
archive.addAttachment(stream);
int result = archive.saveDocument();
When I run this example, I get the following errorcode:
java.lang.RuntimeException: No support for attachments

What am I missing here? A code-sample would be great!

Cheers,
Espen Sletteng

Jul 21 '05 #1
1 3226

I managed to solve the problem by adding activation.jar and mail.jar
to the Axis-client, and use DataHandler instead for FileInputStream.
It works really nice!

On Fri, 21 Nov 2003 19:33:12 +0100, Espen Sletteng
<es************@storebrand.no> wrote:

Hello all,
I want to create a .NET-based web service that can accept dime-based
attachments from a java (Axis)-based client. I have searched for
examples that look like this scenario, but haven't found any.

I have created the service in C#, here is the code:

HttpSoapContext.RequestContext.Path.MustUnderstan d = false;
StreamReader stream = new
StreamReader(HttpSoapContext.RequestContext.Attac hments[0].Stream);
// here I can do something with the stream...
From Axis, I have used the WSDL2Java tool to create the stub-code to
access the .NET web service. This is the code:

MyLocator locator = new MyLocator();
FileInputStream stream = new FileInputStream("c:\\dok1.doc");
MySoapStub archive = (MySoapStub) locator.getMySoap();
archive._setProperty(Call.ATTACHMENT_ENCAPSULATIO N_FORMAT,
Call.ATTACHMENT_ENCAPSULATION_FORMAT_DIME);
archive.addAttachment(stream);
int result = archive.saveDocument();
When I run this example, I get the following errorcode:
java.lang.RuntimeException: No support for attachments

What am I missing here? A code-sample would be great!

Cheers,
Espen Sletteng


Jul 21 '05 #2

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

Similar topics

0
by: Vaylor Trucks | last post by:
I have a web service written in ASP.NET using the .NET frame v1.1.4322 and Web Service Enhancements 1.0 SP1. This web service has 2 nearly identical methods. That is, the SOAP XML is the same...
4
by: Scott, Killer of all Ninjas | last post by:
It seems incredulous to me that it is so difficult to write the contents of a memory stream to a file. I'm certain that I'm missing something simple. I am retrieving a memory stream from a DIME...
1
by: rp | last post by:
HI, I got this compilation error for using namespace 'using Microsoft.Web.Services.Dime' because I need to call 2 webservices in my C# project. Would anyone tell me how can get this 'using...
2
by: Champika Nirosh | last post by:
Hi All, I posted this at "webserviceehnancement" but no reply please see I installed WSE 2.0 and then started to write a web service that use DIME. I fallowed...
1
by: Modica82 | last post by:
Hi all, I have been trying to find a way to send a PDF from my web service. I have had the idea of sending back a byte array, but to be honest the efficiency issue is there and i would like to...
0
by: AndyO | last post by:
Following what is found out at http://www.gotdotnet.com/team/xml_wsspecs/dime/WSDL-Extension-for-DIME.htm for composing my WSDL, when using the wsdl.exe, I can't seem to get around the error...
2
by: aiKeith | last post by:
Hello, I was looking into the WSE 2.0 and noticed DIME which really peeked my interest. Is DIME worth looking at (will it be enhanced, industry supported, etc) or should I stick with sending...
3
by: Matt B | last post by:
Does anyone know if DIME is available for Visual Studio.NET 2005? I have Visual Studio.NET 2003 and I installed the Web Services Extension pack 2.0 in order that I could use DIME. Seems to work...
9
eboyjr14
by: eboyjr14 | last post by:
Let's say you have a wine glass... with a dime inside. There is a cork on the bottle: .` oNMMdyooo- ...
2
by: cwilber3249 | last post by:
I am tryign to make this code for a class i have and i can get it to compile and what not but it doesnt post the right change. Heres is my code, Please help. Its very basic and i think i am just...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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:
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.