> > RPCServiceClient serviceClient = new RPCServiceClient(); > Options options = serviceClient.getOptions(); > EndpointReference targetEPR = new > EndpointReference("http://10.10.21.170:8080/AXIS214/services/WeatherService"); > Can you access the WSDL of the service using
http://10.10.21.170:8080/AXIS214/services/WeatherService?wsdl > options.setTo(targetEPR); > > QName opSetWeather = new QName("http://service.pojo.sample/", "setWeather"); > Weather w = new Weather(); > w.setTemperature((float)39.3); > w.setForecast("Cloudy with showers"); > w.setRain(true); > w.setHowMuchRain((float)4.5); > Object[] opSetWeatherArgs = new Object[] { w }; > serviceClient.invokeRobust(opSetWeather, opSetWeatherArgs); > > // Getting the weather > QName opGetWeather = new QName("http://service.pojo.sample/xsd", > "getWeather"); > Object[] opGetWeatherArgs = new Object[] { }; > Class[] returnTypes = new Class[] { Weather.class }; > Object[] response = > serviceClient.invokeBlocking(opGetWeather,opGetWeatherArgs, returnTypes); > This does not work unless you have set the session in the server side and client side. By default Axis2 service are stateless. So your set method make no senses unless you use session aware services. Thanks, Deepal > Weather result = (Weather) response[0]; > if (result == null) { > System.out.println("Weather didn't initialize!"); > return; > } > > > > > With regards > Karthik > > -----Original Message----- > From: Deepal Jayasinghe [mailto:dee...@opensource.lk] > Sent: Monday, December 21, 2009 10:25 AM > To: axis-user@ws.apache.org > Subject: Re: Have Questions on POJO > > What is the error did you get ? > > Thanks, > Deepal > > Karthik Nanjangude wrote: > >> Hi >> >> >> >>>> Weather didn't initialize! >>>> >>>> >> I now get this error when I run the POJO client ( although the WSDL is >> running properly available on the browser ) >> >> >> Any ideas plz >> >> >> With regards >> Karthik >> >> >> >> -----Original Message----- >> From: Karthik Nanjangude [mailto:karthik.nanjang...@xius-bcgi.com] >> Sent: Friday, December 18, 2009 10:13 AM >> To: axis-user@ws.apache.org >> Subject: RE: Have Questions on POJO >> >> Hi >> >> Tomcat 6.0.20 has built in Config file "Logging.properties" >> >> Can this be used for the Logging Process? >> >> >> >> With regards >> karthik >> >> -----Original Message----- >> From: h...@welinux.cl [mailto:h...@welinux.cl] >> Sent: Thursday, December 17, 2009 8:33 PM >> To: axis-user@ws.apache.org >> Subject: Re: Have Questions on POJO >> >> Karthik, >> >> What you have are no errors, but warnings: One of the most popular logging >> frameworks for java is log4j. >> Axis use it for logging purposes. Log4j calls in axis code are generating >> the warning because it is unable to start, it needs a configuration file. >> >> The log4j configuration file is log4.properties, you must but it somewhere >> your class loader can find it, in tomcat may be WEB-INF/classes. >> >> Good luck >> Hans >> >> ----- "Karthik Nanjangude" <karthik.nanjang...@xius-bcgi.com> escribió: >> >> >> >>> Hi >>> >>> >>> >>> Sorry new to AXIS new guy L >>> >>> >>> >>> Have Questions >>> >>> >>> >>> SPEC : AXIS215 >>> >>> JDK 1.5 >>> >>> TOMCAT 6.0.20 >>> >>> O/s Windows 2000 >>> >>> >>> >>> Server / Client : Same System >>> >>> >>> >>> >>> >>> 1) Deployed the Pojo example "sample.pojo.data.Weather, >>> sample.pojo.data.WeatherService with Service .xml >>> >>> And for the URL >>> "http://10.10.21.170:8080/AXIS214/services/WeatherService?wsdl able to >>> get the XML detail on the browser >>> >>> >>> >>> >>> >>> >>> >>>>> <wsdl:binding name="WeatherServiceHttpBinding" >>>>> >>>>> >>> type="ns:WeatherServicePortType"> >>> >>> >>> >>>>> <http:binding verb="POST"/> >>>>> >>>>> <wsdl:operation name="setWeather"> >>>>> >>>>> <http:operation location="WeatherService/setWeather"/> >>>>> >>>>> <wsdl:input> >>>>> >>>>> <mime:content type="text/xml" part="setWeather"/> >>>>> >>>>> </wsdl:input> >>>>> >>>>> </wsdl:operation> >>>>> >>>>> <wsdl:operation name="getWeather"> >>>>> >>>>> <http:operation location="WeatherService/getWeather"/> >>>>> >>>>> <wsdl:input> >>>>> >>>>> <mime:content type="text/xml" part="getWeather"/> >>>>> >>>>> </wsdl:input> >>>>> >>>>> <wsdl:output> >>>>> >>>>> <mime:content type="text/xml" part="getWeather"/> >>>>> >>>>> </wsdl:output> >>>>> >>>>> </wsdl:operation> >>>>> >>>>> >>> >>> >>> >>> 2) When I run the "sample.pojo.data.WeatherRPCClient" with end Point >>> declared as per the example on Axis web site >>> >>> >>> >>> EndpointReference targetEPR = new >>> EndpointReference("http://10.10.21.170:8080/AXIS214/services/WeatherService"); >>> >>> >>> >>> >>> >>> I get this error ? >>> >>> >>> >>> >>> >>>>> log4j:WARN No appenders could be found for logger >>>>> >>>>> >>> (org.apache.axis2.util.Loader). >>> >>> >>> >>>>> log4j:WARN Please initialize the log4j system properly. >>>>> >>>>> Weather didn't initialize! >>>>> >>>>> >>> As per the code did some thing go wrong >>> >>> >>> >>> >>> >>> >>> >>> With regards >>> >>> Karthik >>> >>> >> -- >> Hans Poo, WeLinux S.A. http://www.welinux.cl >> Oficina: 697.25.42, Celular: 09-319.93.05 >> Bombero Ossa # 1010, Santiago >> >> >> >> > > -- > Thank you! > > > http://blogs.deepal.org > http://deepal.org > > > -- Thank you! http://blogs.deepal.org http://deepal.org