protected SOAPFactory newSOAPFactory(String arg0) throws SOAPException {
return (SOAPFactory)callFactoryMethod("newSOAPFactory", arg0);
}
private Object callFactoryMethod(String methodName, String arg) throws SOAPException {
SAAJMetaFactory factory =
(SAAJMetaFactory) SaajFactoryFinder.find("javax.xml.soap.MetaFactory");
try {
Method method =
factory.getClass().getDeclaredMethod(methodName, new Class[] { String.class });
boolean accessibility = method.isAccessible();
try {
method.setAccessible(true);
Object result = method.invoke(factory, new Object[] { arg });
return result;