You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Alan Eustace <al...@alatto.com> on 2003/04/04 15:04:26 UTC
namespace problem with java/javax.* packages
Hi,
I'm new to axis, so forgive me if I've overlooked something obvious. I'm
creating a service to transfer files, and have successfully deployed and
tested the .jws file directly under webapps/axis/ as a first pass at this.
Now I want to wrap my service and deploy it under WEB-INF/classes, but when
I run Java2WSDL thus:
>>java -cp
.;axis.jar;commons-logging.jar;commons-discovery.jar;jaxrpc.jar;wsdl4j.jar;crimson.jar;saaj.jar;xercesImpl.jar;xmlParserAPIs.jar;activation.jar
org.apache.axis.wsdl.Java2WSDL -o test.wsdl -l
http://localhost:8080/axis/services/mms -n urn:mms -p"mms" urn:mms
mms.MMSInterface
I get the following error:
>>[WARN] Types - -The class javax.activation.DataHandler is defined in a
java or javax package and cannot be converted into an xml schema type. An
xml schema anyType will be used to define this class in the wsdl file.
WSDLException: faultCode=OTHER_ERROR: Can't find prefix for
'http://activation.javax'. Namespace prefixes must be set on the Definition
object using the addNamespace(...) method.:
at com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown Source)
at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unknown Source)
at com.ibm.wsdl.util.xml.DOMUtils.printQualifiedAttribute(Unknown
Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.printParts(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.printMessages(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:267)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:334)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:504)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:542)
I'd appreciate any help with this. I can't just deploy my class as a .jws
file because I need it to have access to the rest of my app.
Thanks,
Alan
Re: namespace problem with java/javax.* packages
Posted by Alan Eustace <al...@alatto.com>.
whoops, forgot to mention, running axis1.1RC2, tomcat 4.0.3
A.
At 15:04 04/04/2003 +0200, you wrote:
>Hi,
>I'm new to axis, so forgive me if I've overlooked something obvious. I'm
>creating a service to transfer files, and have successfully deployed and
>tested the .jws file directly under webapps/axis/ as a first pass at this.
>
>Now I want to wrap my service and deploy it under WEB-INF/classes, but
>when I run Java2WSDL thus:
>
> >>java -cp
> .;axis.jar;commons-logging.jar;commons-discovery.jar;jaxrpc.jar;wsdl4j.jar;crimson.jar;saaj.jar;xercesImpl.jar;xmlParserAPIs.jar;activation.jar
> org.apache.axis.wsdl.Java2WSDL -o test.wsdl -l
> http://localhost:8080/axis/services/mms -n urn:mms -p"mms" urn:mms
> mms.MMSInterface
>
>I get the following error:
>
> >>[WARN] Types - -The class javax.activation.DataHandler is defined in a
> java or javax package and cannot be converted into an xml schema
> type. An xml schema anyType will be used to define this class in the
> wsdl file.
>WSDLException: faultCode=OTHER_ERROR: Can't find prefix for
>'http://activation.javax'. Namespace prefixes must be set on the
>Definition object using the addNamespace(...) method.:
> at com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown Source)
> at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unknown Source)
> at com.ibm.wsdl.util.xml.DOMUtils.printQualifiedAttribute(Unknown
> Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printParts(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printMessages(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
> at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:267)
> at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:334)
> at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:504)
> at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:542)
>
>I'd appreciate any help with this. I can't just deploy my class as a .jws
>file because I need it to have access to the rest of my app.
>
>Thanks,
>
>Alan
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>