axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe <berip...@yahoo.com>
Subject Re: Service returns null always
Date Tue, 17 Sep 2002 02:45:29 GMT
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 <Sharmin.Choksey@Sun.COM> 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: <mailto:axis-user-help@xml.apache.org>
> >list-unsubscribe:
> <mailto:axis-user-unsubscribe@xml.apache.org>
> >list-post: <mailto:axis-user@xml.apache.org>
> >Delivered-To: mailing list axis-user@xml.apache.org
> >Date: Mon, 16 Sep 2002 18:38:46 -0700 (PDT)
> >From: Joe <beripome@yahoo.com>
> >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:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><soapenv:Envelope
>
>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:Body>
> >  <ns1:processRequest
>
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:ns1="urn:ServerService">
> >   <request xsi:type="xsd:string">Boogie</request>
> >  </ns1:processRequest>
> > </soapenv:Body>
> ></soapenv:Envelope>
> >
> >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
> >
> >
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><soapenv:Envelope
>
>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:Body>
> >  <ns1:processRequestResponse
>
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> >xmlns:ns1="urn:ServerService">
> >   <processRequestReturn xsi:type="xsd:string"
> >xsi:nil="true"/>
> >  </ns1:processRequestResponse>
> > </soapenv:Body>
> ></soapenv:Envelope>
> >
> >
> >__________________________________________________
> >Do you Yahoo!?
> >Yahoo! News - Today's headlines
> >http://news.yahoo.com
> 


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

Mime
View raw message