|
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 class ReportHandlerClient
{ static String router = "http://localhost:8080/axis/directsample"; static String service = "directsampleService.wsdl"; 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); QName
portName = new QName("http://www.sample.com/directsample","ReportHandlerServicePort");
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:
|
- Namespaces & Clients NYY96
- RE: Namespaces & Clients Meloro, John
- RE: Namespaces & Clients NYY96
- RE: Namespaces & Clients Meloro, John
- Re: Namespaces & Clients NYY96
- RE: Namespaces & Clients Sandeep
- RE: Namespaces & Clients Meloro, John
- Re: Namespaces & Clients NYY96
- RE: Namespaces & Clients Meloro, John
- Re: Namespaces & Clients NYY96
- RE: Namespaces & Clients Meloro, John
- Re: Namespaces & Clients NYY96
- Re: Namespaces & Clients NYY96
