chrismarx
asked on
Using Web Services with JSP & Dreamweaver & Axis
hello,
dreamweaver says that it can use web services with jsp, but all of the examples use coldfusion. I have followed basics of all the web services tutorials I could find for dreamweaver, but I have had not luck getting my page to work. the code below all compiles fine with javac except for
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator = new net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator();
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator .getTemper aturePort( );
which returns an error saying that the packages with the above names does not exist.
trying to actually view the page (running tomcat) returns the following errors
Generated servlet error:
The type org.apache.axis.client.Ser vice cannot be resolved. It is indirectly referenced from required .class files
Generated servlet error:
Only a type can be imported. org.apache.axis.client.Cal l resolves to a package
Generated servlet error:
Only a type can be imported. org.apache.axis.client.Ser vice resolves to a package
Generated servlet error:
Only a type can be imported. org.apache.axis.encoding.X MLType resolves to a package
here is the full code for the page:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, org.apache.axis.client.Cal l" errorPage="" %>
<%@page import="org.apache.axis.cl ient.Servi ce,org.apa che.axis.e ncoding.XM LType" %>
<% net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator = new net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator();
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator .getTemper aturePort( );
float aNewton = aTemperaturePort.getTemp(" 02466");
float aSF = aTemperaturePort.getTemp(" 94103");
float aIthaca = aTemperaturePort.getTemp(" 14850");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
The temperature in Newton today is <%= aNewton %> <br>
The temperature in San Francisco today is <%= aSF %> <br>
the temp in ithaca id <%= aIthaca %>
</body>
</html>
if anyone has any good resources or links as to how to use web services within dreamweaver or even the basics of how to know which methods to call for a service, etc, would be greatly appreciated!!
dreamweaver says that it can use web services with jsp, but all of the examples use coldfusion. I have followed basics of all the web services tutorials I could find for dreamweaver, but I have had not luck getting my page to work. the code below all compiles fine with javac except for
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator
which returns an error saying that the packages with the above names does not exist.
trying to actually view the page (running tomcat) returns the following errors
Generated servlet error:
The type org.apache.axis.client.Ser
Generated servlet error:
Only a type can be imported. org.apache.axis.client.Cal
Generated servlet error:
Only a type can be imported. org.apache.axis.client.Ser
Generated servlet error:
Only a type can be imported. org.apache.axis.encoding.X
here is the full code for the page:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*, org.apache.axis.client.Cal
<%@page import="org.apache.axis.cl
<% net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator
float aNewton = aTemperaturePort.getTemp("
float aSF = aTemperaturePort.getTemp("
float aIthaca = aTemperaturePort.getTemp("
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
The temperature in Newton today is <%= aNewton %> <br>
The temperature in San Francisco today is <%= aSF %> <br>
the temp in ithaca id <%= aIthaca %>
</body>
</html>
if anyone has any good resources or links as to how to use web services within dreamweaver or even the basics of how to know which methods to call for a service, etc, would be greatly appreciated!!
ASKER
thank you,
i was wondering whether that might be the problem, but the dreamweaver tutorials state that axis is installed by default when dreamweaver is installed (any way to check this?). i'll try your method, but in the meantime, could you also point me to some references/links about using web services in this way? when i deploy the wsdl file in dreamweaver, I can see all the methods available, but i have no idea about how one goes about using them-
i was wondering whether that might be the problem, but the dreamweaver tutorials state that axis is installed by default when dreamweaver is installed (any way to check this?). i'll try your method, but in the meantime, could you also point me to some references/links about using web services in this way? when i deploy the wsdl file in dreamweaver, I can see all the methods available, but i have no idea about how one goes about using them-
Maybe the JARs are installed but not in your classpath. Refer to this on setting up the classpath.
http://www.mindprod.com/jgloss/classpath.html
Are you running this from an IDE or the console?
http://www.mindprod.com/jgloss/classpath.html
Are you running this from an IDE or the console?
ASKER
hi,
sorry if i wasn't clear earlier. I was originally trying to get this page to work from within dreamweaver, which does take care of creating the necessary classes (although maybe its doing something wrong). if i try to load the page into the web browser I get the error messages like
Generated servlet error:
Only a type can be imported. org.apache.axis.client.Cal l resolves to a package
from a tip from another website, i tried to compile the **_jsp.java file in the catalina\localhost manually at the command line with javac. there i was able to actually get some helpful errors. after I resolved most of the classpath issues, the only remaining errors i got were like
package ---
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator .getTemper aturePort( ); does not exist,. etc
i have installed axis now, and i was able to see the happyaxis page. i put all the jar references in the classpath, but now I'm getting
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.Proj ectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
<Admin>Done processing</Admin>
when i try to run the deploy.wsdd and i went ahead and tried to use the WSDL2Java with one of the supplied samples (AddressBook.wsdl) and got this:
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.Proj ectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoClassDefFoundE rror: javax.wsdl.Definition
at org.apache.axis.wsdl.toJav a.JavaGene ratorFacto ry.class$( JavaGenera tor
Factory.java:68)
at org.apache.axis.wsdl.toJav a.JavaGene ratorFacto ry.addDefi nitionGene rat
ors(JavaGeneratorFactory.j ava:179)
at org.apache.axis.wsdl.toJav a.JavaGene ratorFacto ry.addGene rators(Jav aGe
neratorFactory.java:133)
at org.apache.axis.wsdl.toJav a.JavaGene ratorFacto ry.<init>( JavaGenera tor
Factory.java:111)
at org.apache.axis.wsdl.toJav a.Emitter. <init>(Emi tter.java: 159)
at org.apache.axis.wsdl.WSDL2 Java.creat eParser(WS DL2Java.ja va:209)
at org.apache.axis.wsdl.gen.W SDL2.<init >(WSDL2.ja va:96)
at org.apache.axis.wsdl.WSDL2 Java.<init >(WSDL2Jav a.java:194 )
at org.apache.axis.wsdl.WSDL2 Java.main( WSDL2Java. java:371)
any help is greatly appreciated!
sorry if i wasn't clear earlier. I was originally trying to get this page to work from within dreamweaver, which does take care of creating the necessary classes (although maybe its doing something wrong). if i try to load the page into the web browser I get the error messages like
Generated servlet error:
Only a type can be imported. org.apache.axis.client.Cal
from a tip from another website, i tried to compile the **_jsp.java file in the catalina\localhost manually at the command line with javac. there i was able to actually get some helpful errors. after I resolved most of the classpath issues, the only remaining errors i got were like
package ---
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator
i have installed axis now, and i was able to see the happyaxis page. i put all the jar references in the classpath, but now I'm getting
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.Proj
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
<Admin>Done processing</Admin>
when i try to run the deploy.wsdd and i went ahead and tried to use the WSDL2Java with one of the supplied samples (AddressBook.wsdl) and got this:
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.Proj
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoClassDefFoundE
at org.apache.axis.wsdl.toJav
Factory.java:68)
at org.apache.axis.wsdl.toJav
ors(JavaGeneratorFactory.j
at org.apache.axis.wsdl.toJav
neratorFactory.java:133)
at org.apache.axis.wsdl.toJav
Factory.java:111)
at org.apache.axis.wsdl.toJav
at org.apache.axis.wsdl.WSDL2
at org.apache.axis.wsdl.gen.W
at org.apache.axis.wsdl.WSDL2
at org.apache.axis.wsdl.WSDL2
any help is greatly appreciated!
>> org.apache.axis.client.Cal l
Pls post your JSP import statements. I guess the syntax is incorrect. Try:
<%@ page import = "org.apache.axis.client.* " %>
Pls post your JSP import statements. I guess the syntax is incorrect. Try:
<%@ page import = "org.apache.axis.client.* " %>
ASKER
Ok, I changed to imports to include stars, but now I get this error
The type javax.xml.rpc.ServiceExcep tion cannot be resolved. It is indirectly referenced from required .class files
i looked this up, and it seems its related to the jaxrpc.jar file. its in my classpath, and I even tried just adding the file to the actual directory
echo %CLASSPATH%
C:\Documents and Settings\akg29.ITS_STUDENT >echo %CLASSPATH%
C:\oraclexe\app\oracle\pro duct\10.2. 0\server\j dbc\lib\oj dbc14.jar; C:\oraclex e\ap
p\oracle\product\10.2.0\se rver\jlib\ orai18n.ja r;C:\oracl exe\app\or acle\produ ct\1
0.2.0\server\jdbc\lib\clas ses12.zip; C:\Program Files\Apache Software Foundation\
Tomcat 5.5\webapps\axis\WEB-INF\l ib\axis.ja r;C:\Progr am Files\Apache Software Fo
undation\Tomcat 5.5\common\lib\servlet-api .jar;C:\Pr ogram Files\Apache Software
Foundation\Tomcat 5.5\common\lib\jsp-api.jar ;C:\Progra m Files\Apache Software Fo
undation\Tomcat 5.5\common\lib\jasper-runt ime.jar;C: \axis-bin- 1_4\lib\ax is.jar;C
:\axis-bin-1_4\lib\commons -discovery -0.2.jar;C :\axis-bin -1_4\lib\c ommons-log ging
-1.0.4.jar;C:\axis-bin-1_4 \lib\jaxrp c.jar;C:\a xis-bin-1_ 4\lib\saaj .jar;C:\ax is-b
in-1_4\lib\log4j-1.2.8.jar ;C:\axis-b in-1_4\lib \xml-apis. jar;C:\axi s-bin-1_4\ lib\
xercesImpl.jar;
heres what the whole page looked like before
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import org.apache.axis.client.Cal l;
import org.apache.axis.client.Ser vice;
import org.apache.axis.encoding.X MLType;
public final class tempWeb_jsp extends org.apache.jasper.runtime. HttpJspBas e
implements org.apache.jasper.runtime. JspSourceD ependent {
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletReq uest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFacto ry();
response.setContentType("t ext/html; charset=iso-8859-1");
pageContext = _jspxFactory.getPageContex t(this, request, response,
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletCont ext();
config = pageContext.getServletConf ig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator = new net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator();
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator .getTemper aturePort( );
float aNewton = aTemperaturePort.getTemp(" 02466");
float aSF = aTemperaturePort.getTemp(" 94103");
float aIthaca = aTemperaturePort.getTemp(" 14850");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\ " content=\"text/html; charset=iso-8859-1\" />\r\n");
out.write("<title>Untitled Document</title>\r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
out.write("The temperature in Newton today is ");
out.print( aNewton );
out.write(" <br>\r\n");
out.write("\r\n");
out.write("The temperature in San Francisco today is ");
out.print( aSF );
out.write(" <br>\r\n");
out.write("\r\n");
out.write("the temp in ithaca id ");
out.print( aIthaca );
out.write(" \r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handleP ageExcepti on(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageCo ntext(_jsp x_page_con text);
}
}
}
here are the changes
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import org.apache.axis.client.*;
import javax.xml.rpc.ServiceExcep tion.*;
import org.apache.axis.encoding.X MLType.*;
The type javax.xml.rpc.ServiceExcep
i looked this up, and it seems its related to the jaxrpc.jar file. its in my classpath, and I even tried just adding the file to the actual directory
echo %CLASSPATH%
C:\Documents and Settings\akg29.ITS_STUDENT
C:\oraclexe\app\oracle\pro
p\oracle\product\10.2.0\se
0.2.0\server\jdbc\lib\clas
Tomcat 5.5\webapps\axis\WEB-INF\l
undation\Tomcat 5.5\common\lib\servlet-api
Foundation\Tomcat 5.5\common\lib\jsp-api.jar
undation\Tomcat 5.5\common\lib\jasper-runt
:\axis-bin-1_4\lib\commons
-1.0.4.jar;C:\axis-bin-1_4
in-1_4\lib\log4j-1.2.8.jar
xercesImpl.jar;
heres what the whole page looked like before
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import org.apache.axis.client.Cal
import org.apache.axis.client.Ser
import org.apache.axis.encoding.X
public final class tempWeb_jsp extends org.apache.jasper.runtime.
implements org.apache.jasper.runtime.
private static java.util.List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletReq
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFacto
response.setContentType("t
pageContext = _jspxFactory.getPageContex
"", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletCont
config = pageContext.getServletConf
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator
float aNewton = aTemperaturePort.getTemp("
float aSF = aTemperaturePort.getTemp("
float aIthaca = aTemperaturePort.getTemp("
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\
out.write("<title>Untitled
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
out.write("The temperature in Newton today is ");
out.print( aNewton );
out.write(" <br>\r\n");
out.write("\r\n");
out.write("The temperature in San Francisco today is ");
out.print( aSF );
out.write(" <br>\r\n");
out.write("\r\n");
out.write("the temp in ithaca id ");
out.print( aIthaca );
out.write(" \r\n");
out.write("\r\n");
out.write("</body>\r\n");
out.write("</html>");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handleP
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageCo
}
}
}
here are the changes
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import org.apache.axis.client.*;
import javax.xml.rpc.ServiceExcep
import org.apache.axis.encoding.X
Sorry I've not personally used Dreamweaver before. Which server does it use? Are you running this from within the IDE? It must be using its own classpath whch is different from the system class-path. You need to put the jaxrpc and other required JARs in a place from where the IDE or server can load it, e.g., it could be the build path of your project or a WEB-INF\lib directory I guess.
ASKER
i had to install tomcat to load jsp files from dreamweaver. I'm not sure if its running "within the IDE", i mean the page loads from my localhost address. yes, i was trying to determine the build path, this is all slightly new territory for me. the root folder is in the tomcat/webapps, i've placed al the axis related jar's in the WEB-INF/lib directory. the actual java classes are created in the catalina/localhost/(rootdi rectorynam e) folder, and i've also added all the axis classes including the jaxrpc.jar file to this folder as well.
my fear is that dreamweaver is perhaps not using the latest version of Axis (there is almost no references about this anywhere) and that it's not creating the proxy stubs correctly. however, as i mentioned, i can't seem to configure my own installation of axis corretly to run the WSDL2Java program myself.
i really appreciate your help here. is there any possibility that someone here could try to load up the page from the code above, after generating the necessary classes from
http://www.xmethods.net/sd/2001/TemperatureService.wsdl
on their own machine to see whether that's where the problem might lie?
otherwise, perhaps you could help me to address some of the previous issues with the axis installation
thanks!!
my fear is that dreamweaver is perhaps not using the latest version of Axis (there is almost no references about this anywhere) and that it's not creating the proxy stubs correctly. however, as i mentioned, i can't seem to configure my own installation of axis corretly to run the WSDL2Java program myself.
i really appreciate your help here. is there any possibility that someone here could try to load up the page from the code above, after generating the necessary classes from
http://www.xmethods.net/sd/2001/TemperatureService.wsdl
on their own machine to see whether that's where the problem might lie?
otherwise, perhaps you could help me to address some of the previous issues with the axis installation
thanks!!
ASKER
would you suggest trying to get this to work through one of the java ide's? and if so, which one do you think would be easiest (most helpful) in setting up "drag and drop" web services?
>> i had to install tomcat to load jsp files from dreamweaver.
Then you need to put those JARs in the classpath of Tomcat which means you need to put them into the common\lib folder of Tomcat (so that all web apps can use them) otherwise put them in the WEB-INF\lib folder of your project (so that only this web app can use them).
Try Eclipse - www.eclipse.org, with the plug-ins at www.eclipseplugincentral.com
But first, let's get this working.
Then you need to put those JARs in the classpath of Tomcat which means you need to put them into the common\lib folder of Tomcat (so that all web apps can use them) otherwise put them in the WEB-INF\lib folder of your project (so that only this web app can use them).
Try Eclipse - www.eclipse.org, with the plug-ins at www.eclipseplugincentral.com
But first, let's get this working.
ASKER
i believe progress is being made!!
i no longer get any of the errors related to missing class references etc., now I'm finally down to errors with the actual code in the page, which were the only errors i recieved when trying to compile the page manually.
now, i get this error:
org.apache.jasper.JasperEx ception: Exception in JSP: /tempWeb.jsp:7
4:
5: <% net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator = new net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator();
6:
7: net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator .getTemper aturePort( );
8:
9: float aNewton = aTemperaturePort.getTemp(" 02466");
10:
Stacktrace:
org.apache.jasper.servlet. JspServlet Wrapper.ha ndleJspExc eption(Jsp ServletWra pper.java: 506)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 77)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
javax.servlet.ServletExcep tion: Could not initialize class net.xmethods.www.sd.TemperatureService_wsdl.TemperatureBindingStub
org.apache.jasper.runtime. PageContex tImpl.doHa ndlePageEx ception(Pa geContextI mpl.java:8 43)
org.apache.jasper.runtime. PageContex tImpl.hand lePageExce ption(Page ContextImp l.java:776 )
org.apache.jsp.tempWeb_jsp ._jspServi ce(tempWeb _jsp.java: 90)
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:97)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 34)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
java.lang.NoClassDefFoundE rror: Could not initialize class net.xmethods.www.sd.TemperatureService_wsdl.TemperatureBindingStub
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:45)
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:40)
org.apache.jsp.tempWeb_jsp ._jspServi ce(tempWeb _jsp.java: 52)
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:97)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 34)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
here's the new list of all the jar's in the tomcat common/lib folder -
axis-ant.jar
axis.jar
commons-discovery-0.2.jar
commons-el.jar
commons-logging-1.0.4.jar
jasper-compiler-jdt.jar
jasper-compiler.jar
jasper-runtime.jar
jaxrpc.jar
jsp-api.jar
log4j-1.2.8.jar
log4j.properties
naming-factory-dbcp.jar
naming-factory.jar
naming-resources.jar
saaj.jar
servlet-api.jar
tools.jar
wsdl4j-1.5.1.jar
xercesImpl.jar
xml-apis.jar
also, i know you're not familiar with dreamweaver, but the tutorials were very specific when they said that dreamweaver installs axis (Apache Soap 3.0) by default. it was already listed in the dreamweaver options as a proxy generator. however, i couldn't find any axis related jars anywhere on my system except in the places i already put them. there's only one dreamfolder that seems to be related to the dreamweaver install called classes, that has crimson.jar, webservices.jar, wsdl2java.jar and xerces.jar -that's it. i imagine that these were used by dreamweaver setting up the proxy, and that somehow these are the files that are being used by tomcat? too?
i have used eclipse, i'll see about trying to get it set up for webservices. thank you for sticking through this with me. any other ideas about how to continue troubleshooting?
i no longer get any of the errors related to missing class references etc., now I'm finally down to errors with the actual code in the page, which were the only errors i recieved when trying to compile the page manually.
now, i get this error:
org.apache.jasper.JasperEx
4:
5: <% net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator
6:
7: net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator
8:
9: float aNewton = aTemperaturePort.getTemp("
10:
Stacktrace:
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
javax.servlet.ServletExcep
org.apache.jasper.runtime.
org.apache.jasper.runtime.
org.apache.jsp.tempWeb_jsp
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
java.lang.NoClassDefFoundE
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:45)
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:40)
org.apache.jsp.tempWeb_jsp
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
here's the new list of all the jar's in the tomcat common/lib folder -
axis-ant.jar
axis.jar
commons-discovery-0.2.jar
commons-el.jar
commons-logging-1.0.4.jar
jasper-compiler-jdt.jar
jasper-compiler.jar
jasper-runtime.jar
jaxrpc.jar
jsp-api.jar
log4j-1.2.8.jar
log4j.properties
naming-factory-dbcp.jar
naming-factory.jar
naming-resources.jar
saaj.jar
servlet-api.jar
tools.jar
wsdl4j-1.5.1.jar
xercesImpl.jar
xml-apis.jar
also, i know you're not familiar with dreamweaver, but the tutorials were very specific when they said that dreamweaver installs axis (Apache Soap 3.0) by default. it was already listed in the dreamweaver options as a proxy generator. however, i couldn't find any axis related jars anywhere on my system except in the places i already put them. there's only one dreamfolder that seems to be related to the dreamweaver install called classes, that has crimson.jar, webservices.jar, wsdl2java.jar and xerces.jar -that's it. i imagine that these were used by dreamweaver setting up the proxy, and that somehow these are the files that are being used by tomcat? too?
i have used eclipse, i'll see about trying to get it set up for webservices. thank you for sticking through this with me. any other ideas about how to continue troubleshooting?
ASKER
i see the noclassdeffounderror message down in the root cause. do i need to somehow put references to these classes (which are being created from the wsdl) in the classpath or something?
ASKER
trying to anticipate your questions, here's the code for the class that was mentioned in this error--
Could not initialize class net.xmethods.www.sd.TemperatureService_wsdl.TemperatureBindingStub
here's the code-
/**
* TemperatureBindingStub.jav a
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package net.xmethods.www.sd.TemperatureService_wsdl;
public class TemperatureBindingStub extends org.apache.axis.client.Stu b implements net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType {
private java.util.Vector cachedSerClasses = new java.util.Vector();
private java.util.Vector cachedSerQNames = new java.util.Vector();
private java.util.Vector cachedSerFactories = new java.util.Vector();
private java.util.Vector cachedDeserFactories = new java.util.Vector();
static org.apache.axis.descriptio n.Operatio nDesc [] _operations;
static {
_operations = new org.apache.axis.descriptio n.Operatio nDesc[1];
org.apache.axis.descriptio n.Operatio nDesc oper;
oper = new org.apache.axis.descriptio n.Operatio nDesc();
oper.setName("getTemp");
oper.addParameter(new javax.xml.namespace.QName( "", "zipcode"), new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.descriptio n.Paramete rDesc.IN, false, false);
oper.setReturnType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "float"));
oper.setReturnClass(float. class);
oper.setReturnQName(new javax.xml.namespace.QName( "", "return"));
oper.setStyle(org.apache.a xis.enum.S tyle.RPC);
oper.setUse(org.apache.axi s.enum.Use .ENCODED);
_operations[0] = oper;
}
public TemperatureBindingStub() throws org.apache.axis.AxisFault {
this(null);
}
public TemperatureBindingStub(jav a.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
this(service);
super.cachedEndpoint = endpointURL;
}
public TemperatureBindingStub(jav ax.xml.rpc .Service service) throws org.apache.axis.AxisFault {
if (service == null) {
super.service = new org.apache.axis.client.Ser vice();
} else {
super.service = service;
}
}
private org.apache.axis.client.Cal l createCall() throws java.rmi.RemoteException {
try {
org.apache.axis.client.Cal l _call =
(org.apache.axis.client.Ca ll) super.service.createCall() ;
if (super.maintainSessionSet) {
_call.setMaintainSession(s uper.maint ainSession );
}
if (super.cachedUsername != null) {
_call.setUsername(super.ca chedUserna me);
}
if (super.cachedPassword != null) {
_call.setPassword(super.ca chedPasswo rd);
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAdd ress(super .cachedEnd point);
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cac hedTimeout );
}
if (super.cachedPortName != null) {
_call.setPortName(super.ca chedPortNa me);
}
java.util.Enumeration keys = super.cachedProperties.key s();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get (key));
}
return _call;
}
catch (java.lang.Throwable t) {
throw new org.apache.axis.AxisFault( "Failure trying to get the Call object", t);
}
}
public float getTemp(java.lang.String zipcode) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPoint Exception( );
}
org.apache.axis.client.Cal l _call = createCall();
_call.setOperation(_operat ions[0]);
_call.setUseSOAPAction(tru e);
_call.setSOAPActionURI("") ;
_call.setSOAPVersion(org.a pache.axis .soap.SOAP Constants. SOAP11_CON STANTS);
_call.setOperationName(new javax.xml.namespace.QName( "urn:xmeth ods-Temper ature", "getTemp"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {zipcode});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException) _resp;
}
else {
extractAttachments(_call);
try {
return ((java.lang.Float) _resp).floatValue();
} catch (java.lang.Exception _exception) {
return ((java.lang.Float) org.apache.axis.utils.Java Utils.conv ert(_resp, float.class)).floatValue() ;
}
}
}
}
Could not initialize class net.xmethods.www.sd.TemperatureService_wsdl.TemperatureBindingStub
here's the code-
/**
* TemperatureBindingStub.jav
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package net.xmethods.www.sd.TemperatureService_wsdl;
public class TemperatureBindingStub extends org.apache.axis.client.Stu
private java.util.Vector cachedSerClasses = new java.util.Vector();
private java.util.Vector cachedSerQNames = new java.util.Vector();
private java.util.Vector cachedSerFactories = new java.util.Vector();
private java.util.Vector cachedDeserFactories = new java.util.Vector();
static org.apache.axis.descriptio
static {
_operations = new org.apache.axis.descriptio
org.apache.axis.descriptio
oper = new org.apache.axis.descriptio
oper.setName("getTemp");
oper.addParameter(new javax.xml.namespace.QName(
oper.setReturnType(new javax.xml.namespace.QName(
oper.setReturnClass(float.
oper.setReturnQName(new javax.xml.namespace.QName(
oper.setStyle(org.apache.a
oper.setUse(org.apache.axi
_operations[0] = oper;
}
public TemperatureBindingStub() throws org.apache.axis.AxisFault {
this(null);
}
public TemperatureBindingStub(jav
this(service);
super.cachedEndpoint = endpointURL;
}
public TemperatureBindingStub(jav
if (service == null) {
super.service = new org.apache.axis.client.Ser
} else {
super.service = service;
}
}
private org.apache.axis.client.Cal
try {
org.apache.axis.client.Cal
(org.apache.axis.client.Ca
if (super.maintainSessionSet)
_call.setMaintainSession(s
}
if (super.cachedUsername != null) {
_call.setUsername(super.ca
}
if (super.cachedPassword != null) {
_call.setPassword(super.ca
}
if (super.cachedEndpoint != null) {
_call.setTargetEndpointAdd
}
if (super.cachedTimeout != null) {
_call.setTimeout(super.cac
}
if (super.cachedPortName != null) {
_call.setPortName(super.ca
}
java.util.Enumeration keys = super.cachedProperties.key
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get
}
return _call;
}
catch (java.lang.Throwable t) {
throw new org.apache.axis.AxisFault(
}
}
public float getTemp(java.lang.String zipcode) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPoint
}
org.apache.axis.client.Cal
_call.setOperation(_operat
_call.setUseSOAPAction(tru
_call.setSOAPActionURI("")
_call.setSOAPVersion(org.a
_call.setOperationName(new
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {zipcode});
if (_resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)
}
else {
extractAttachments(_call);
try {
return ((java.lang.Float) _resp).floatValue();
} catch (java.lang.Exception _exception) {
return ((java.lang.Float) org.apache.axis.utils.Java
}
}
}
}
ASKER
oh, and the classes are the the tomcat/webapps/(rootdirect orty)/web- inf/classe s/(in a whole bunch of subfolders)
ASKER
sorry for the deluge of posts, but I think i made some more progress.
quick question first. adding those jar files to the common/lib folder only seemed to make a difference after i restarted the computer. do i need to restart tomcat for changes made to /lib or other folders to take place?
after studying the above error, i thought that maybe the app couldn't find the classes that were generated from the wsdl file, so i added those to the common/lib folder as well. after doing that and restarting, i now get an entirely different error message.
org.apache.jasper.JasperEx ception: RPC
org.apache.jasper.servlet. JspServlet Wrapper.ha ndleJspExc eption(Jsp ServletWra pper.java: 512)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 77)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
javax.servlet.ServletExcep tion: RPC
org.apache.jasper.runtime. PageContex tImpl.doHa ndlePageEx ception(Pa geContextI mpl.java:8 43)
org.apache.jasper.runtime. PageContex tImpl.hand lePageExce ption(Page ContextImp l.java:776 )
org.apache.jsp.tempWeb_jsp ._jspServi ce(tempWeb _jsp.java: 90)
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:97)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 34)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
java.lang.NoSuchFieldError : RPC
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureBindingStub.<clinit>(Tem peratureBi ndingStub. java:27)
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:45)
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:40)
org.apache.jsp.tempWeb_jsp ._jspServi ce(tempWeb _jsp.java: 52)
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:97)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 34)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:314)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:264)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
a brief look at other people's problems here seem to indicate that this might be due (as i feared) to a different version of wsdlJava being used to extract the classes. what do you think?
quick question first. adding those jar files to the common/lib folder only seemed to make a difference after i restarted the computer. do i need to restart tomcat for changes made to /lib or other folders to take place?
after studying the above error, i thought that maybe the app couldn't find the classes that were generated from the wsdl file, so i added those to the common/lib folder as well. after doing that and restarting, i now get an entirely different error message.
org.apache.jasper.JasperEx
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
javax.servlet.ServletExcep
org.apache.jasper.runtime.
org.apache.jasper.runtime.
org.apache.jsp.tempWeb_jsp
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
java.lang.NoSuchFieldError
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureBindingStub.<clinit>(Tem
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:45)
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator.getTemperaturePort(TemperatureServiceLocator.java:40)
org.apache.jsp.tempWeb_jsp
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
a brief look at other people's problems here seem to indicate that this might be due (as i feared) to a different version of wsdlJava being used to extract the classes. what do you think?
>> see the noclassdeffounderror message down in the root cause.
Which class is that for? Its JAR also needs to be in common\lib and then Tomcat needs to be restarted,
Which class is that for? Its JAR also needs to be in common\lib and then Tomcat needs to be restarted,
>> a brief look at other people's problems here seem to indicate that this might be due (as i feared) to a different version of wsdlJava being used to extract the classes
>> java.lang.NoSuchFieldError : RPC
I'd say you should use WSDL2Java again to regenerate the proxies from the WSDL and use them.
>> java.lang.NoSuchFieldError
I'd say you should use WSDL2Java again to regenerate the proxies from the WSDL and use them.
ASKER
ok, i was able to resolve the previous problems not being able to run
C:\>java org.apache.axis.wsdl.WSDL2 Java http://www.xmethods.net/sd/2001/Temperat
ureService.wsdl
but then i found out that i needed to also add a reference in the classpath to the wsdl4j-1.5.1.jar file (this was not mentioned in the axis documentation) and now i've got the java files created with the latest version of the wsdl2java rather than the stored .jar file from dreamweaver.
i still get this error when running the above command, but it does excute and the java files are created:
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.Proj ectR
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
now that i have the new java files, what should i do with them? i've discovered that the important place for the proxy classes to be is in the web-inf/classes folder (where one would expect). in any case, when dreamweaver was handling the proxy classes, it created the java files and the classes too. running the wsdl2Java command line only gave me the java files. trying the compile them manually gave me errors, saying that in order to compile it needed some of the other classes (which were still just java files) to be there, but i couldn't compile those without the others (sorry if that's confusing)
C:\>java org.apache.axis.wsdl.WSDL2
ureService.wsdl
but then i found out that i needed to also add a reference in the classpath to the wsdl4j-1.5.1.jar file (this was not mentioned in the axis documentation) and now i've got the java files created with the latest version of the wsdl2java rather than the stored .jar file from dreamweaver.
i still get this error when running the above command, but it does excute and the java files are created:
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.Proj
esourceBundle).
log4j:WARN Please initialize the log4j system properly.
now that i have the new java files, what should i do with them? i've discovered that the important place for the proxy classes to be is in the web-inf/classes folder (where one would expect). in any case, when dreamweaver was handling the proxy classes, it created the java files and the classes too. running the wsdl2Java command line only gave me the java files. trying the compile them manually gave me errors, saying that in order to compile it needed some of the other classes (which were still just java files) to be there, but i couldn't compile those without the others (sorry if that's confusing)
ASKER
just a side note -- you are totally a lifesaver here, i would triple the points if i could!
>> log4j:WARN Please initialize the log4j system properly.
That's ok - Axis is internally using log4J for logging and its not been initialized properly, so no worries.
>> now that i have the new java files, what should i do with them?
Just include the package and start using the classes to connect to the web-service.
>> running the wsdl2Java command line only gave me the java files
Yes, you need to compile them into .java files - either use DreamWeaver to compile or use javac.exe from the command prompt. For that, you will again need to ensure that the JARs are in the classpath. You can also copy all the JARs and put them into the jre\lib\ext folder to make it simple. Otherwise see my comment here for understanding class-path:
https://www.experts-exchange.com/questions/22450095/Full-code-to-connect-from-Java-to-Access-on-same-machine.html#18722480
>> you are totally a lifesaver here, i would triple the points if i could
Thanks, am just doing what I like to.... you're good at picking things up with my small comments. After all, we do this only in our free time - I'm also working in office right now :)
That's ok - Axis is internally using log4J for logging and its not been initialized properly, so no worries.
>> now that i have the new java files, what should i do with them?
Just include the package and start using the classes to connect to the web-service.
>> running the wsdl2Java command line only gave me the java files
Yes, you need to compile them into .java files - either use DreamWeaver to compile or use javac.exe from the command prompt. For that, you will again need to ensure that the JARs are in the classpath. You can also copy all the JARs and put them into the jre\lib\ext folder to make it simple. Otherwise see my comment here for understanding class-path:
https://www.experts-exchange.com/questions/22450095/Full-code-to-connect-from-Java-to-Access-on-same-machine.html#18722480
>> you are totally a lifesaver here, i would triple the points if i could
Thanks, am just doing what I like to.... you're good at picking things up with my small comments. After all, we do this only in our free time - I'm also working in office right now :)
ASKER
ok, i figured out that the .java files all needed to be compiled together at once, using javac *.java (all the files were in the sam directory with nothing else). and, low and behold, the site ran!!!!!! (there is a god)
apparently the majority of problems were indeed a result of the bad classes that dreamweaver created. i looked at the files and saw some big differences. does this mean that the the methods that dreamweaver exposes may also be "off"? since that would mean that basically dreamweaver can't even be used. my page now works, but i'm just getting -999.0 for all the temperatures in the various cities. now i'm wondering whether this is just the service or whether the code in dreamweaver is off somehow.
one last final question?
for this example web service to work first the service locator is invoked:
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator = new net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator();
then the TemperaturePort:
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator .getTemper aturePort( );
and then the actual methods:
float aNewton = aTemperaturePort.getTemp(" 02466");
float aSF = aTemperaturePort.getTemp(" 94103");
float aIthaca = aTemperaturePort.getTemp(" 14850");
i'm now about to embark actually trying to use the web services that i actually need to use (not this example) and I'm a little lost as how to set up the flow for how to actually use the methods listed. is this documented anywhere?
apparently the majority of problems were indeed a result of the bad classes that dreamweaver created. i looked at the files and saw some big differences. does this mean that the the methods that dreamweaver exposes may also be "off"? since that would mean that basically dreamweaver can't even be used. my page now works, but i'm just getting -999.0 for all the temperatures in the various cities. now i'm wondering whether this is just the service or whether the code in dreamweaver is off somehow.
one last final question?
for this example web service to work first the service locator is invoked:
net.xmethods.www.sd.TemperatureService_wsdl.TemperatureServiceLocator aTemperatureServiceLocator
then the TemperaturePort:
net.xmethods.www.sd.TemperatureService_wsdl.TemperaturePortType aTemperaturePort = aTemperatureServiceLocator
and then the actual methods:
float aNewton = aTemperaturePort.getTemp("
float aSF = aTemperaturePort.getTemp("
float aIthaca = aTemperaturePort.getTemp("
i'm now about to embark actually trying to use the web services that i actually need to use (not this example) and I'm a little lost as how to set up the flow for how to actually use the methods listed. is this documented anywhere?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
you have been most helpful, worth everypoint
Thanks.
http://ws.apache.org/axis/
You can use WSDL2Java to generate proxy classes for the web service and then call then. It will handle serialization/ de-serialization of parameters and connecting to the WS for you.