use of javax.wsdl.xml.WSDLReader in project jbossws-cxf by jbossws.
the class JBWS2528TestCase method test.
@Test
@RunAsClient
public void test() throws Exception {
File destDir = new File(TEST_DIR, "wsprovide" + FS + "java");
String absOutput = destDir.getAbsolutePath();
String command = JBOSS_HOME + FS + "bin" + FS + "wsprovide" + EXT + " -k -w -o " + absOutput + " --classpath " + CLASSES_DIR + " " + ENDPOINT_CLASS;
// wildfly9 security manager flag changed from -Djava.security.manager to -secmgr.
// Can't pass -secmgr arg through arquillian because it breaks arquillian's
// config of our tests.
// the -secmgr flag MUST be provided as an input arg to jboss-modules so it must
// come after the jboss-modules.jar ref.
String additionalJVMArgs = System.getProperty("additionalJvmArgs", "");
String securityManagerDesignator = additionalJVMArgs.replace("-Djava.security.manager", "-secmgr");
File policyFile = new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2528/jbws2528-security.policy");
String securityPolicyFile = " -Djava.security.policy=" + policyFile.getCanonicalPath();
Map<String, String> env = new HashMap<>();
env.put("JAVA_OPTS", securityManagerDesignator + securityPolicyFile);
executeCommand(command, null, "wsprovide", env);
URL wsdlURL = new File(destDir, "JBWS2528EndpointService.wsdl").toURI().toURL();
WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
Definition wsdlDefinition = wsdlReader.readWSDL(wsdlURL.toString());
PortType portType = wsdlDefinition.getPortType(new QName("http://jbws2528.jaxws.ws.test.jboss.org/", "JBWS2528Endpoint"));
Operation op = (Operation) portType.getOperations().get(0);
@SuppressWarnings("unchecked") List<String> parOrder = op.getParameterOrdering();
assertEquals("id", parOrder.get(0));
assertEquals("Name", parOrder.get(1));
assertEquals("Employee", parOrder.get(2));
}
use of javax.wsdl.xml.WSDLReader in project jbossws-cxf by jbossws.
the class JBWS2960TestCase method getWSDLDefinition.
private Definition getWSDLDefinition(final String wsdlLocation) throws Exception {
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
return wsdlReader.readWSDL(null, wsdlLocation);
}
use of javax.wsdl.xml.WSDLReader in project jbossws-cxf by jbossws.
the class EarTestCase method getWSDLDefinition.
private Definition getWSDLDefinition(String wsdlLocation) throws Exception {
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
return definition;
}
use of javax.wsdl.xml.WSDLReader in project pentaho-kettle by pentaho.
the class Wsdl method getReader.
/**
* Get a WSDLReader.
*
* @return WSDLReader.
* @throws WSDLException
* on error.
*/
private WSDLReader getReader() throws WSDLException {
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
ExtensionRegistry registry = wsdlFactory.newPopulatedExtensionRegistry();
wsdlReader.setExtensionRegistry(registry);
wsdlReader.setFeature("javax.wsdl.verbose", true);
wsdlReader.setFeature("javax.wsdl.importDocuments", true);
return wsdlReader;
}
use of javax.wsdl.xml.WSDLReader in project pentaho-platform by pentaho.
the class AxisUtil method getWsdlDefinition.
public static Definition getWsdlDefinition(AxisConfiguration axisConfig, IServiceConfig webservice) throws Exception {
String wsdlStr = getWsdl(axisConfig, webservice);
InputStream in = new ByteArrayInputStream(wsdlStr.getBytes());
InputSource source = new InputSource(in);
WSDLFactoryImpl factory = new WSDLFactoryImpl();
WSDLReader reader = factory.newWSDLReader();
// $NON-NLS-1$
Definition def = reader.readWSDL("", source);
return def;
}
Aggregations