Return-Path: Delivered-To: apmail-xml-axis-user-archive@xml.apache.org Received: (qmail 51892 invoked by uid 500); 17 Sep 2002 02:45:20 -0000 Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 51883 invoked from network); 17 Sep 2002 02:45:20 -0000 Message-ID: <20020917024529.12961.qmail@web21301.mail.yahoo.com> Date: Mon, 16 Sep 2002 19:45:29 -0700 (PDT) From: Joe Subject: Re: Service returns null always To: axis-user@xml.apache.org In-Reply-To: <200209170143.SAA26984@phys-ha10nwka.ebay.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Status: O X-Status: X-Keywords: Hi Sharman, I intially used it like that, and still recieved null every time. I get no different rquests. I changed it only so I could change the port SOAP request is submitted to so I could use the TCPMon app to see what was happening. Regards, Joe --- Sharmin Choksey wrote: > If the client stubs were generated by downloading > the wsdl, > then the Stub class will have a default reference to > the service > url string that points to teh current location of > the service > deployed. So all you need to do is as under : > > YourService service = new YourServiceLocator(); > theStub = service.getYourService(); > > -Sharmin. > > > > >Mailing-List: contact > axis-user-help@xml.apache.org; run by ezmlm > >list-help: > >list-unsubscribe: > > >list-post: > >Delivered-To: mailing list axis-user@xml.apache.org > >Date: Mon, 16 Sep 2002 18:38:46 -0700 (PDT) > >From: Joe > >Subject: Service returns null always > >To: axis-user@xml.apache.org > >MIME-Version: 1.0 > >X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > > > >Hi, > > > >I have a service set up; ServerService. > > > >Below is my client code, server code (temporary) > and > >TCPMon results. The ServerServer class is supposed > to > >return "Sweet as" every time processRequest(String > s) > >is called. Instead of this, the client code returns > >null every single time instead of "sweet as". > > > >Shouldn't I be getting an exception if something is > >wrong? And since nothing is wrong why am I getting > >null returned every time? > > > >//Client code: > > > > public static void main(String[] args) { > > ServerServiceService serviceLocator = new > >ServerServiceServiceLocator(); > > try { > > //ServerService server = > >serviceLocator.getServerService(); > > URL url = new > >URL("http://localhost:100/axis/services/ServerService"); > > ServerService server = > >serviceLocator.getServerService(url); > > Workflow wf = new Workflow(); > > wf.setName("THIS IS MY NAME"); > > System.out.println("Workflow: " + > >server.addWorkflow(wf)); > > System.out.println("Success: " + > >server.processRequest("Boogie")); > > } > > catch(Exception e) { > > System.out.println("Exception: " + > >e.getMessage()); > > } > > /* > > catch(ServiceException se) { > > System.err.println(se.getMessage()); > > } > >*/ > > } > > > >Server code: > > > >public class ServerService { > > private Server server; > > > > public ServerService() { > > server = new Server(); > > } > > > > public String processRequest(String request) { > > //server.processRequest() > > return "Sweet as"; > > } > >} > > > >POST /axis/services/ServerService HTTP/1.0 > > > >Content-Type: text/xml; charset=utf-8 > > > >Accept: application/soap+xml, application/dime, > >multipart/related, text/* > > > >User-Agent: Axis/beta3 > > > >Host: localhost > > > >Cache-Control: no-cache > > > >Pragma: no-cache > > > >SOAPAction: "" > > > >Content-Length: 461 > > > >Monitoring in TCPMon: > > > >Request: > > > > > > >xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > >xmlns:xsd="http://www.w3.org/2001/XMLSchema" > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > >soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > >xmlns:ns1="urn:ServerService"> > > Boogie > > > > > > > > > >Response: > >HTTP/1.1 200 OK > > > >Content-Type: text/xml; charset=utf-8 > > > >Connection: close > > > >Date: Tue, 17 Sep 2002 01:23:45 GMT > > > >Server: Apache Tomcat/4.0.4 (HTTP/1.1 Connector) > > > >Set-Cookie: > >JSESSIONID=B49F1A3F0A08D12CA62A8FCC176EDCA5;Path=/axis > > > > > > > > > > >xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > >xmlns:xsd="http://www.w3.org/2001/XMLSchema" > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > >soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > >xmlns:ns1="urn:ServerService"> > > >xsi:nil="true"/> > > > > > > > > > > > >__________________________________________________ > >Do you Yahoo!? > >Yahoo! News - Today's headlines > >http://news.yahoo.com > __________________________________________________ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com