I wanted to avoid posting the code because it is lengthy and generally
deals with more than one file but here it is. Thanks for your help. I think
when I run the client it's attempting to access the net because of the
namespace I chose way back in the WSDL.
If anybody's would be able to tell me if my reasoning is correct (Or
help me avoid having to do the entire java WSDL2Java over for nothing).
I want to be able to run this on the localhost and use TCPMon to see what's
going on. If you guys could give me a heads up on what needs to be adjusted
to accomplish that, that would be wonderful!
package com.sample.www.directsample;
import java.net.MalformedURLException;
import
java.net.URL;
import java.rmi.RemoteException;
import
java.util.List;
import javax.xml.namespace.QName;
import
javax.xml.rpc.Service;
import javax.xml.rpc.ServiceException;
import
javax.xml.rpc.ServiceFactory;
import
javax.xml.rpc.handler.HandlerInfo;
import com.sample.www.directsample.LoggingHandler;
import
com.sample.www.directsample._report;
import
com.sample.www.directsample._response;
public static void main(String[] args)
{
try
{
ServiceFactory sf =
ServiceFactory.newInstance();
URL u = new URL(router + "/" +
service);
String url=""http://localhost:8080/axis/services/ReportHandlerService">http://localhost:8080/axis/services/ReportHandlerService";
QName serviceName = new QName("
http://www.sample.com/directsample","ReportHandlerService");
Service s = sf.createService(u,serviceName);
List
handlerChain =
s.getHandlerRegistry().getHandlerChain(portName);
HandlerInfo hi = new
HandlerInfo(LoggingHandler.class,null,null);
handlerChain.add(hi);
ReportHandler h =(ReportHandler)
s.getPort(portName,ReportHandler.class);
_report rpt = new
_report();
rpt.setAccount("1234567");
rpt.setXmlData("Really Really Long string of GOOD STUFF!");
try {
_response rsp =
h.addReport(rpt);
boolean value = rsp.isSuccess();
}
catch(Exception
e)
{
e.printStackTrace(
);
}
}
catch (ServiceException se)
{
se.printStackTrace();
}
catch (MalformedURLException
mue)
{
mue.printStackTrace();
}
}
}
In a message dated 6/15/2004 11:49:49 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:
You are going to have to post the
client code. Without the code it is impossible to tell you where you
are going wrong...
I have successfully deployed a web service with Axis. I have
written a client which successfully produces the SOAPEnvelope. Directly
under the Envelope's output is a 404 HTTP Error listing. It also then
echo's the root of the web page I used as the namespace.
If I want to run this service on the local host for now, what do I
have to change to get the Client to execute successfully?
Thanks for all your generous support,
James Crosson
[EMAIL PROTECTED]