Using Axis 1.2 beta (the one off the web site).

I'm doing a bit of research with handlers. I'm attempting to write a CompressionHandler which will gzip compress the request/response and ungzip it on the other side. So in my server-config.wsdd I have declared a request/response flow element as such:

 <requestFlow>
  <handler type="java:org.apache.axis.handlers.JWSHandler">
   <parameter name="scope" value="session"/>
  </handler>
  <handler type="java:org.apache.axis.handlers.JWSHandler">
   <parameter name="scope" value="request"/>
   <parameter name="extension" value=".jwr"/>
  </handler>
  <handler type="java:foo.bar.CompressionHandler"/>
 </requestFlow>

 <responseFlow>
  <handler type="java:foo.bar.CompressionHandler"/>
 </responseFlow>

I'm not sure about all the stuff in the JWSHandler in the request flow, but it was generated based in the deploy.wsdd from wsdltojava.

Where I've hit a bit of a stumbling block is the client-config.wsdd. I've created on based on my server-config.wsdd:

java org.apache.axis.utils.Admin client server-config.wsdd

This puts a lot of stuff in the client-config.wsdd that I'm not so sure is necessary, as I was running just fine without it, but now things have started acting flakey.

If I put the generated client-config.wsdd in my classpath, it complains with a ClassNotFoundException for my service implementation class (which would be expected becuase it is in another jar not distributed with the client):

<service ... >
     <other parameters here/>
     <parameter name="className" value="foo.bar.ServiceImpl"/>

   <type-mappings-here/>
</service>

So if I remove that one parameter, the client stops complaining(throwing exceptions), but I'm not so sure it is sending anything to the server.

If I remove the client-config.wsdd all together, it sends the message to my server (I get debug logging on the server).

So some of the debug from the log for axis:
java.lang.NoSuchMethodException: org.apache.axis.encoding.ser.BeanSerializerFactory.create(java.lang.Class, javax.xml.namespace.QName)
at java.lang.Class.getMethod(Class.java:978)
at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:234)
at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:517)
at org.apache.axis.deployment.wsdd.WSDDService.initTMR(WSDDService.java:235)
at org.apache.axis.deployment.wsdd.WSDDService.<init>(WSDDService.java:215)
at org.apache.axis.deployment.wsdd.WSDDDeployment.<init>(WSDDDeployment.java:204)
at org.apache.axis.deployment.wsdd.WSDDDocument.setDocument(WSDDDocument.java:121)
at org.apache.axis.deployment.wsdd.WSDDDocument.<init>(WSDDDocument.java:60)
at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:171)
at org.apache.axis.AxisEngine.init(AxisEngine.java:155)
at org.apache.axis.AxisEngine.<init>(AxisEngine.java:139)
at org.apache.axis.client.AxisClient.<init>(AxisClient.java:49)
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)


I'm seeing lots of this from the initialization of my ServiceLocator(generated by wsdl2java).

I'm also seeing this:
No service class was found!  Are you missing a className option?

So if you are still reading this ;), how do I include a client-config.wsdd to just specify that I want to us a global handler in the request/response flows?

Thanks in advance!
 --m






Reply via email to