ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext(new String[] {"/org/apache/cxf/jaxws/spring/servers.xml"});
JaxWsServerFactoryBean bean;
BindingConfiguration bc;
SoapBindingConfiguration sbc;
bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBindingRPC");
assertNotNull(bean);
bc = bean.getBindingConfig();
assertTrue(bc instanceof SoapBindingConfiguration);
sbc = (SoapBindingConfiguration) bc;
assertEquals("rpc", sbc.getStyle());
WSDLQueryHandler handler = new WSDLQueryHandler((Bus)ctx.getBean("cxf"));
ByteArrayOutputStream bout = new ByteArrayOutputStream();
handler.writeResponse("http://localhost/test?wsdl", "/test",
bean.create().getEndpoint().getEndpointInfo(),
bout);
String wsdl = bout.toString();
assertTrue(wsdl.contains("name=\"stringArray\""));
assertTrue(wsdl.contains("name=\"stringArray\""));
bean = (JaxWsServerFactoryBean) ctx.getBean("simple");
assertNotNull(bean);
bean = (JaxWsServerFactoryBean) ctx.getBean("inlineWsdlLocation");
assertNotNull(bean);
assertEquals(bean.getWsdlLocation(), "wsdl/hello_world_doc_lit.wsdl");
bean = (JaxWsServerFactoryBean) ctx.getBean("inlineSoapBinding");
assertNotNull(bean);
bc = bean.getBindingConfig();
assertTrue(bc instanceof SoapBindingConfiguration);
sbc = (SoapBindingConfiguration) bc;
assertTrue("Not soap version 1.2: " + sbc.getVersion(), sbc.getVersion() instanceof Soap12);
bean = (JaxWsServerFactoryBean) ctx.getBean("inlineDataBinding");
boolean found = false;
String[] names = ctx.getBeanNamesForType(SpringServerFactoryBean.class);