axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dovholuk, Clint" <>
Subject Axis attachments sample and/or MIME/DIME attachments with Resin 2.14
Date Fri, 11 Mar 2005 15:19:34 GMT
Hello All,
Sorry this is long but I'm trying to provide all the detail someone
might need to help me out! :) 
If you'd like to help me out and just want to get to the crux of my
problem, skip down to "Problem 3.)"... (thanks)
I'm at my wits end. I've tried to get an attachment example working for
3 days now with no luck.  I've searched google repeatedly, as well as
the mail archives but if this solution is "out there"... I've not found
it yet.
I'm running resin 2.14 from eclipse 3.1m5a using a custom resin.conf (
for port and problem 1 below ) on a windows XP box.
Resin runs great, Axis (1.1 at this time) runs great for what we're
already using it for.  But now we're trying to send a document from a C#
application to a java app via a Resin/Axis expose web service... Problem
is I can't seem to get the right combination to make it all work
Right now, all I really want to do is run the "attachments" sample that
comes with Axis, but nothing I do seems to work properly...  I've found
the "fear of attachments" pdf written by Steve Loughran which I've not
fully explored yet because I've been focused on why I can't make the
attachments sample function properly... so.. here we go.
What I've done so far...  I've installed Axis at a different location
then the default. Call it: http://localhost:9889/webapp/services
I've got Axis up and running and I'm trying to register the sample
using: java org.apache.axis.client.AdminClient attachdeploy.wsdd -l

Problem 1.) 
At first this wouldn't work. I would keep getting this error:
Exception:: org.w3c.dom.DOMException: `null' prefix expects a namespace
uri .  
Solution to Problem 1.)
Turns out that this problem is with the xml libraries that Resin uses...
The solution is to tell resin what jars to use as detailed by this link:
Problem 2.) 
Fixing the resin.conf allows me to *successfully* register the sample
using the admin service... I tried to hit the wsdl to look at it... (
http://localhost:9889/webapp/services/urn:EchoAttachmentsService?wsdl )
and I now get THIS error message...
========== AXIS ERROR BEGINS ==========
Sorry, something seems to have gone wrong... here are the details:
Fault - ; nested exception is: 
 WSDLException: faultCode=OTHER_ERROR: Can't find prefix for
'urn:EchoAttachmentsService'. Namespace prefixes must be set on the
Definition object using the addNamespace(...) method.: 
 faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix
for 'urn:EchoAttachmentsService'. Namespace prefixes must be set on the
Definition object using the addNamespace(...) method.: 
========== AXIS ERROR ENDS ==========
Solution 2.) (I think)
So the solution to problem 2 was for me to edit the attachdeploy.wsdd
I had to add a line that defined the namespace:
and add a line to the TypeMapping:
NOW when I hit the urn:EchoAttachmentsService?wsdl, I get a generated
WSDL which looks good to me...
Problem 3.)
So, now I tried creating classes off the wsdl using the WSDL2Java tool: 
C:\axis\samples\attachments>java -cp %classpath%;
org.apache.axis.wsdl.WSDL2Java -psamples.attachments.genfromwsdl
-oc:\pathtowebapp\src -t
at this point I NOW get: Type {-insert namespace here-}DataHandler is
referenced but not defined.
        [... rest clipped]
so I can't even generate classes from the WSDL....
I'm at a loss here... Is there anyone out there that can shed some light
on this?

View raw message