Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Java EE (J2EE) и Spring > Axis - проблема по установке.


Автор: jxr 28.9.2006, 21:29
There is a Web Service here
<link>Click to see the WSDL 

Код

<h2>AXIS error</h2>
<p>Sorry, something seems to have gone wrong... here are the details:</p>
<pre>Fault - ; nested exception is: 
    java.lang.RuntimeException: No compiler found in your classpath!  (you may need to add 'tools.jar')<br>
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.RuntimeException: No compiler found in your classpath!  (you may need to add 'tools.jar')
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}hostname:mycomputer

</pre>


в чем проблема?

Автор: Tony 28.9.2006, 22:34
propishi JAVA_HOME

Автор: jxr 29.9.2006, 01:43
JAVA_HOME = C:\Program Files\Java\jdk1.5.0_06
Path = .....; %JAVA_HOME%\bin; ....

что не то?

Автор: tux 29.9.2006, 02:07
Добавь в CLASS-PATH библиотеку JAVA_HOME/lib/tools.jar.

Автор: jxr 29.9.2006, 11:59
CLASSPATH =
.; C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip;
%JAVA_HOME%\lib\tools.jar; 
%AXIS_LIB%\axis.jar; %AXIS_LIB%\axis-ant.jar; %AXIS_LIB%\commons-logging.jar; %AXIS_LIB%\commons-discovery.jar; %AXIS_LIB%\jaxrpc.jar; %AXIS_LIB%\log4j-1.2.8.jar; %AXIS_LIB%\saaj.jar; %AXIS_LIB%\wsdl4j.jar; %AXIS_LIB%\xercesImpl.jar; %AXIS_LIB%\xml-apis.jar

tools.jar есть е него smile уже.
а AXIS_LIB не надо в CLASSPATH вставит?

Автор: jxr 29.9.2006, 13:27
Цитата(jxr @ 28.9.2006,  21:29)
There is a Web Service here
link--->Click to see the WSDL 

Код

<h2>AXIS error</h2>
<p>Sorry, something seems to have gone wrong... here are the details:</p>
<pre>Fault - ; nested exception is: 
    java.lang.RuntimeException: No [b]compiler[/b] found in your [b]classpath[/b]!  (you may need to add 'tools.jar')<br>
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.RuntimeException: No [b]compiler[/b] found in your [b]classpath[/b]!  (you may need to add 'tools.jar')
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}hostname:mycomputer

</pre>


какой то compiler, и не понятно какой путь именно CLASSPATH or AXISCLASSPATH
но все равно, на все вставил и ничего... smile  

Автор: jxr 29.9.2006, 13:51
Нашел! Все ОК!
PS. Copy file jdk\lib\tools.jar to common\lib into Tomcat directory.
Спосибо за это GOOGLE.COM

Автор: jxr 29.9.2006, 15:04
и другая причина...  smile 

файл MeteoService.jws
Код

public class MeteoService {

    public String getweatherForecast(String location) 
    {
        return location + ": пойдет дождь или снег";
    }
}


http://localhost:8080/axis/Meteo/MeteoService.jws?wsdl  - все ОК!

файл MeteoServiceClient.java
Код

import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import javax.xml.namespace.QName;
import java.net.*;

public class MeteoServiceClient {

    public static void main(String[] args) throws Exception {

        if (args.length != 1){
        System.err.println("Usage: " + "Java MeteoServiceClient <location>");
        System.exit(1);
        }
    
        Service service = new Service();
        Call call = (Call) service.createCall();
        String endpoint ="http://localhost:8080/axis/Meteo/MeteoService.jws";

        call.setTargetEndpointAddress(new URL(endpoint));
        call.setOperationName(new QName("getWeatherForecast"));

        String result = (String)call.invoke(new Object[]{new String(args[0])});
        System.out.println("Погода на завтра: " + result);
    }
}


ну и проблема...
Код

>javac MeteoServiceClient.java
MeteoServiceClient.java:16: cannot access javax.xml.rpc.Call
file javax\xml\rpc\Call.class not found
        Call call = (Call) service.createCall();
1 error


что это за пакет javax.xml.rpc.* и где вообще?
ничего не понятно. помогите!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)