?
Solved

Problems import the package javax.xml.rpc.namespace

Posted on 2003-10-24
5
Medium Priority
?
2,396 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

777 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