Hi there everyone... (Bueller? Bueller? Bueller?)
 
Was this email too long or was the topic one which I *should* have been able to find on the internet? I'm just wondering if anyone could tell me why there was no feedback for this particular problem. Was the email too long?  Did I break some protocol I was unaware of?
 
Thanks all,
-Clint


From: Dovholuk, Clint [mailto:[EMAIL PROTECTED]
Sent: Friday, March 11, 2005 10:20 AM
To: axis-user@ws.apache.org
Subject: Axis attachments sample and/or MIME/DIME attachments with Resin 2.14

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 together...
 
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 http://localhost:9889/webapp/services/AdminService
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: http://www.caucho.com/quercus/faq/question.xtp?question_id=295
 
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.:
 
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 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.:
 faultActor:
 faultNode:
 faultDetail:
========== AXIS ERROR ENDS ==========
 
Solution 2.) (I think)
So the solution to problem 2 was for me to edit the attachdeploy.wsdd file...  
I had to add a line that defined the namespace:
   <namespace>urn:EchoAttachmentsService</namespace>
and add a line to the TypeMapping:
   xmlns:ns1="urn:EchoAttachmentsService"
 
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 http://localhost:9889/webapp/services/urn:EchoAttachmentsService?wsdl
 
at this point I NOW get:
java.io.IOException: Type {-insert namespace here-}DataHandler is referenced but not defined.
        at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522)
        at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
        [... 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?
 
Thanks,
-Clint
 
 
 

Reply via email to