} catch( Exception exp ) {
category.error( exp );
throw AxisFault.makeFault(exp);
}
JavaClass jc = JavaClass.find(obj.getClass());
String allowedMethods = getServiceAllowedMethods(service);
/** ??? Should we enforce setting methodName? As it was,
* if it's null, we allowed any method. This seems like it might
* be considered somewhat insecure (it's an easy mistake to
* make). Tossing an Exception if it's not set, and using "*"
* to explicitly indicate "any method" is probably better.
*/
if ((allowedMethods == null) || allowedMethods.equals(""))
throw new AxisFault("Server.NoMethodConfig",
JavaUtils.getMessage("noOption00", getServiceClassNameOptionName(), serviceName),
null, null);
if (allowedMethods.equals("*"))
allowedMethods = null;
/** If the class knows what it should be exporting,
* respect its wishes.
*/
if (obj instanceof AxisServiceConfig) {
allowedMethods = ((AxisServiceConfig)obj).getMethods();
}
try {
AxisClassLoader cl = msgContext.getClassLoader();
Class cls = jc.getJavaClass();
String url = msgContext.getStrProp(MessageContext.TRANS_URL);
String urn = (String)msgContext.getTargetService();
String description = "Service";
Document doc = WSDLUtils.writeWSDLDoc(cls, allowedMethods,
url, urn, description, msgContext);