Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problems import the package javax.xml.rpc.namespace

Posted on 2003-10-24
5
Medium Priority
?
2,447 Views
Last Modified: 2013-11-24
Hi!

I'm trying to use AXIS for web services, men I don't manage to import the package:
package javax.xml.rpc.namespace.

I get the error:

NHLServiceClient.java:7: package javax.xml.rpc.namespace does not exist
import javax.xml.rpc.namespace.QName;
                               ^
I've heard the package in inside the jar-file: jaxrpc.jar

I have included this file in my classpath, but it doesn't work:

Here is what i do:

_______________

:\JavaDevelopANP>set JAVA_HOME=E:\j2sdk1.4.2_02
 
E:\JavaDevelopANP>set classpath=.;%SAG_COMMON%\xts.jar;E:\Program Files\Common F
iles\Software AG\sagxds.jar;%SAG_COMMON%\saglic.jar;%SAG_COMMON%\sagxds.jar;E:\m
ysql_win2000_jconnect\mysql-connector-java-3.0.9-stable\mysql-connector-java-3.0
.9-stable-bin.jar;E:\tomcat\jtcv2\bin\tomcat-jni.jar;E:\tomcat\jtcv2\common\lib\
ant.jar;E:\tomcat\jtcv2\server\lib\catalina.jar;E:\tomcat\jtcv2\server\lib\catal
ina-ant.jar;E:\tomcat\jtcv2\server\lib\servlets-common.jar;E:\tomcat\jtcv2\serve
r\lib\tomcat-jk.jar;E:\tomcat\jtcv2\server\lib\tomcat-jk2.jar;E:\tomcat\jtcv2\se
rver\lib\tomcat-util.jar;E:\tomcat\jtcv2\server\webapps\admin\WEB-INF\lib\struts
.jar;E:\tomcat\jtcv2\webapps\axis\WEB-INF\lib\jaxrpc.jar;E:\tomcat\jtcv2\webapps
\axis\WEB-INF\lib\axis.jar;E:\tomcat\jtcv2\webapps\axis\WEB-INF\lib\commons-logg
ing.jar;E:\tomcat\jtcv2\webapps\axis\WEB-INF\lib\log4j-1.2.4.jar;E:\tomcat\jtcv2
\webapps\axis\WEB-INF\lib\wsdl4j.jar;E:\tomcat\jtcv2\webapps\axis\WEB-INF\lib\xm
l-apis.jar;E:\tomcat\jtcv2\webapps\axis\WEB-INF\lib\xmlParserAPIs.jar;E:\tomcat\
jtcv2\webapps\axis\WEB-INF\lib\xercesImpl.jar;E:\tomcat\jtcv2\webapps\axis\WEB-I
NF\lib\xercesSamples.jar;E:\AxisBeta322okt2003\axis-1_0\webapps\axis\WEB-INF\lib
\jaxrpc.jar
 
E:\JavaDevelopANP>javac NHLServiceClient.java
NHLServiceClient.java:7: package javax.xml.rpc.namespace does not exist
import javax.xml.rpc.namespace.QName;
                               ^
NHLServiceClient.java:22: cannot resolve symbol
symbol  : class QName
location: class NHLServiceClient
                call.setOperationName(new QName("getCurrentPosition"));
                                          ^
2 errors
 
E:\JavaDevelopANP>
_________________

Can anyone help me out?   : )

Thanks in advance!

Regards,
Tom-Erik
0
Comment
Question by:tomerikv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 9613470
Can only think of two reasons:

a. Your classpath has not been set somehow. Do

echo %CLASSPATH%

b. That class is not in that package in that jar. Do

jar tvf E:\tomcat\jtcv2\webapps\axis\WEB-INF\lib\jaxrpc.jar
jar tvf E:\AxisBeta322okt2003\axis-1_0\webapps\axis\WEB-INF\lib
\jaxrpc.jar
0
 
LVL 3

Expert Comment

by:savalou
ID: 9613537
Try
import javax.xml.rpc.QName;

I think the packaging changed sometime back.
0
 
LVL 1

Author Comment

by:tomerikv
ID: 9613610
Hi!

You were totally right.

The package doesn't exist.

it was supposed to be:
import javax.xml.namespace.QName;

not:
import javax.xml.rpc.namespace.QName;

The code example I used hasn't be tried out, it seems.

Thanks a lot!

Kind regards,
Tom-Erik
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9613911
:-)
0
 
LVL 1

Author Comment

by:tomerikv
ID: 9613935
I've testet the code now and it works 100%!

Cheers!

\ TE
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question