My comment ++>

-----Ursprüngliche Nachricht-----
Von: Tom van den Berge [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 22. März 2007 13:44
An: [email protected]
Betreff: User guide examples are broken


Hi,

I'm new to Axis, and I'm trying to get the examples in the user guide working. 
Unfortunately, they are broken.

Building and deploying the sample service (MyService.aar) as explained in 
section "Installing and testing client code" seems to work fine. 

But running the client as explained fails:   axis2 
org.apache.axis2.axis2userguide.Client results in  
 "Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/axis2/axis2userguide/Client". 
 
++> use an IDE to launch your Client code. IDE's such as NetBeans or Eclips 
gives you some burden to learn how to use it. 
But otherwhise they manage many of the niffty tricky Classpath settings 
required to run your java code. So, are you able to build and debug the 
SOAPClient from userguide?  

Then I tried the approach as explained in the README.txt in the userguide 
directory.  Deploying the service using "axis2server.bat" fails with the 
following stacktrace:

"org.apache.axis2.deployment.DeploymentException: Processing Operations Modules 
logging module is invalid or has not been deployed; nested exception is:"  
 
++> copy from C:\axis2-1.1\repository\modules\saple-logging.mar to  
C:\Tomcat-5-5\webapps\axis2\WEB-INF\modules\logging.mar
 then stop Tomcat; goto  C:\Tomcat-5-5\logs and clear the log files. Then 
resatrt Tomcat; and after a short period watch 
C:\Tomcat-5-5\logs\stdout_nnnnnn.log; you should now see that logging was 
deployed

But since the deployment I mentioned first was successful ( 
http://localhost:8080/axis2/services/listServices  
<http://localhost:8080/axis2/services/listServices> nicely lists the 
"MyService" service as Active) , this shouldn't be a big problem. So I tried 
running the sample client against this service deployment: 
"ant run.client.blocking", resulting in: 
 
++> which sample client did you use? 

"[java] org.apache.axis2.deployment.DeploymentException: Processing Operations 
Modules logging module is invalid or has not been deployed; nested exception 
is:" <<huge stack trace following>>  
 
++> make sure that logging.mar was deployed corectly (see above) 

I became a bit frustrated here :(
Then I found a number of bug reports, raising very similar issues:

 <https://issues.apache.org/jira/browse/AXIS2-2040> 



https://issues.apache.org/jira/browse/AXIS2-2040
https://issues.apache.org/jira/browse/AXIS2-1815 
<https://issues.apache.org/jira/browse/AXIS2-2040> 


https://issues.apache.org/jira/browse/AXIS2-1700 
<https://issues.apache.org/jira/browse/AXIS2-2040> 



Two of them are still open, and one of them is resolved. I've tried today's (21 
March) snapshot, but if fails compiling since it can't find  
org.apache.axiom.om.OMElement
, when running "ant run.client.blocking  

".  
 
++> I agee with you, some developers have a large amount of open bugs to fix.
 

Then I followed the helpful advise of another user experiencing similar 
problems (  <http://www.mail-archive.com/[email protected]/msg26819.html> 
http://www.mail-archive.com/[email protected]/msg26819.html). This allowed 
me to successfully deploy the "MyServiceWithModule.aar"
 but I really don't know if I need this service. What's the difference between 
MyService and MyServiceWithModule, and which one is the client application 
using? 
 
++> look at the different service code. you want see a differences in java 
code. but then look at each service.xml and study the difference. You will see 
a few differences.
 
1. the name of the service is different; even if you would deploy the exact 
same java class you can refere to it by a different service name, given in 
service.xml
 
2. in service.xml the <parameter name="ServiceClass" 
locked="false">userguide.example1.MyService</parameter> is always different
 
3,. with .1 and .2 with have now a mapping from a service name to class
 
4. if your service likes to engage a module 

 
<file:///C:/Documents%20and%20Settings/c770817/Local%20Settings/Temp/services.xml#>
 - <service name="MyServiceWithModule">
  <description>This is a sample Web Service with a logging module 
engaged.</description> 
  <module ref="logging" />  so the logging.mar gets referenced here
 
5. Your client references the wanted service by an end point reference (toEpr) 
such as      private static String toEpr = 
http://alpha1:8080/axis2/rest/MyService; 
 and again, to which class MyService goes is stated in the service.xml file 
deployed with the MyService.aar for example.

Still, this did not result in a working client application.

Can somebody explain to me, in detail, how to get the user guide (version 
1.1.1) example working?  
 
++> I hope it helps a bit, but FLEXIBILITY such as offered with Axis2 has it's 
price in learning how to configure the system. OK, I agree, an 
out-of-box-working-example, would be good.
BTW: what IDE are you using to develop your code. Did you attempt to use 
debugging technics and single step through axis2 client and service examples. 
Do so, you learn a lot. 

Or even better, can somebody make sure that the user guide examples work out of 
the box? For people who are new to a technology (like myself to Axis2), simple 
tutorials and samples are extremely valuable. Not working examples are 
extremely frustrating, and quickly result in loss of confidence in the 
technology; "If they can't even get the examples working....."

Thanks,
Tom 
 
Regards ++> Josef 


Reply via email to