I have been trying to run the web services example as shown in the great video
on the macromedia site.  However, i keep on geting the dreaded 'Page cannot be
displayed message'!  Here is what I have done so far:

Saved as HelloWorld.jws under the web root

import java.util.*;
public class HelloWorld
{
        String helloWorld= "Hello world";
        Date currentTime=new java.util.Date(System.currentTimeMillis());

        public String getHelloWorldString()
        {
                return helloWorld;
        }
        public  String getCurrentTime()
        {
                return currentTime.toString();
        }
}

and this as ws_HelloWorld.jsp in the same folder

<%@page
import="org.apache.axis.client.Call,org.apache.axis.client.Service,org.apache.axis.encoding.XMLType"
%>

<%
        String URL = "http://"+request.getServerName() + ":" + request.getServerPort()
+ "/WebServeTest/HelloWorld.jws";
%>
<%
        Service service = new Service();
        Call call = (Call)service.createCall();
        call.setTargetEndpointAddress(new java.net.URL(URL));
        
        call.setOperationName("getHelloWorldString");
        call.setReturnType(XMLType.XSD_STRING);
%>      

<%= call.invoke(new Object[] {}) %>

This should have merely returned the helloWorld string when run, as
demonstrated in the video.

Where am I going wrong?

Wayne Davies




=====
Sydney Real Tennis Club

Phone: 02 9850 9495
Email: [EMAIL PROTECTED]
Web: http://www.yeti.com.au/srtc

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to