axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandeep" <sadva...@binghamton.edu>
Subject RE: Namespaces & Clients
Date Tue, 15 Jun 2004 17:05:11 GMT
Maybe this link will be help using TCPMon.

 

http://www.javaworld.com/javaworld/jw-04-2003/jw-0411-axis_p.html

 

Extracted point is..

To use tcpmon, choose a port on which it will listen and make sure the
client calls that port. For example, suppose the servlet engine uses port
8080. So use 8070. Reinvoke Java2WSDL, passing a different location
argument: -l http://localhost:8070/axis/services/outline. Revisit subsequent
deployment steps. 

When launching tcpmon, pass it three arguments: listen port, target
hostname, and target port. Without classpath, that would be java
org.apache.axis.utils.tcpmon 8070 localhost 8080. Thus, when testing an Axis
Web service, you launch three applications: application server, TCP Monitor,
and JUnit or another client. 

 

Sandeep Advani

Grid Research Lab, Binghamton University

  _____  

From: NYY96@aol.com [mailto:NYY96@aol.com] 
Sent: Tuesday, June 15, 2004 12:57 PM
To: axis-user@ws.apache.org
Subject: Re: Namespaces & Clients

 

When I go to the address you listed I do not see a page, however if I go
through http://localhost:8080/axis I can click on Services and see my
service deployed (And access it's WSDL). Does this mean I have some work to
do yet?

 

Also, what settings on TCPMon would work for my purposes. I don't need to
anything complicated, just some ports that will get my sample working.

 

Thanks for your continued help,

James

 

In a message dated 6/15/2004 12:23:32 PM Eastern Standard Time,
MeloroJ@Pragmatics.com writes:

Well, lets take things one step at a time.

 

If you type http://localhost:8080/axis/services into a web browser then you
should see your service(s) deployed.

 

Please post that for me, so I can verify that you have actually deployed the
services correctly.  If that fails then there is no sense in going on to
your client because there is nothing for the client to communicate with.

 

In addition, are you running TCPmon now?  If so, TCPMon and TomCat cannot
listen on the same port on the same workstation.  You will have to modify
one or the other to listen on a different port.

 

-----Original Message-----
From: NYY96@aol.com [mailto:NYY96@aol.com]
Sent: Tuesday, June 15, 2004 12:04 PM
To: axis-user@ws.apache.org
Subject: Re: Namespaces & Clients

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";
            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,
MeloroJ@Pragmatics.com 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...

-----Original Message-----
From: NYY96@aol.com [mailto:NYY96@aol.com]
Sent: Tuesday, June 15, 2004 11:44 AM
To: axis-user@ws.apache.org
Subject: Namespaces & Clients

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

NYY96@aol.com

 

 


Mime
View raw message