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.MustUnder stand = false;
StreamReader stream = new
StreamReader(Ht tpSoapContext.R equestContext.A ttachments[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.getMySo ap();
archive._setPro perty(Call.ATTA CHMENT_ENCAPSUL ATION_FORMAT,
Call.ATTACHMENT _ENCAPSULATION_ FORMAT_DIME);
archive.addAtta chment(stream);
int result = archive.saveDoc ument();
When I run this example, I get the following errorcode:
java.lang.Runti meException: No support for attachments
What am I missing here? A code-sample would be great!
Cheers,
Espen Sletteng 1 3264
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:
HttpSoapContex t.RequestContex t.Path.MustUnde rstand = false; StreamReader stream = new StreamReader(H ttpSoapContext. RequestContext. Attachments[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(); FileInputStrea m stream = new FileInputStream ("c:\\dok1.doc" ); MySoapStub archive = (MySoapStub) locator.getMySo ap(); archive._setPr operty(Call.ATT ACHMENT_ENCAPSU LATION_FORMAT, Call.ATTACHMEN T_ENCAPSULATION _FORMAT_DIME); archive.addAtt achment(stream) ; int result = archive.saveDoc ument();
When I run this example, I get the following errorcode: java.lang.Runt imeException: No support for attachments
What am I missing here? A code-sample would be great!
Cheers, Espen Sletteng
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 from one method to the next, the
only difference being that one accepts the transfer of an attachment using
DIME and the other does not.
When the non-DIME version of the method is invoked everything works
properly. When the DIME version is...
|
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 attachment:
MyDimeService svc = new MyDimeService();
svc.CreateDimedImage();
if (svc.ResponseSoapContext.Attachments.Count == 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
Microsoft.Web.Services.Dime' namespace? Thanks in advance.
rp
|
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
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wsedime.asp
and did exactly what it ask me to do..
|
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 find another route if possible.
I have started to read bits and pieces about DIME and WSE but what i need to
know is can i utilise this technology cross platform?? For instance someone
who will consume this web service is coding in some form of...
| |
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 message:
"Error: one or more required WSDL extension elements were ignored.
Errors were encountered. Review generated source comments for more details."
More specifically, for each of the binding places (inside
wsdl:output/wsdl:input) where I use:
|
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 large binaries as base64?
thanks...
|
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 well.
I'll probably getting VS.NET 2005 soon, which uses Extension pack 3.0.
I know this extension pack includes MTOM - supposed to be DIME's
successor - but does it also include DIME?
Anyone know?
|
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-
dMMMMMMMM+
:mMMMMMMMMMN`
yMMMMMMMMMMM`
dNdMMMMMMosM`
|
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 confusing myself.
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
//Prices for items
void priceAmount(float info)
{
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |