use of javax.xml.ws.soap.SOAPBinding in project nhin-d by DirectProject.
the class DocumentRepositoryProxy method initProxy.
private void initProxy() {
try {
URL url = DocumentRepositoryProxy.class.getClassLoader().getResource("XDS.b_DocumentRepositoryWSDLSynchMTOM.wsdl");
QName qname = new QName("urn:ihe:iti:xds-b:2007", "DocumentRepository_Service");
DocumentRepositoryService service = new DocumentRepositoryService(url, qname);
if (handlerResolver != null)
service.setHandlerResolver(handlerResolver);
proxy = service.getDocumentRepositoryPortSoap12(new MTOMFeature(true, 1));
BindingProvider bp = (BindingProvider) proxy;
SOAPBinding binding = (SOAPBinding) bp.getBinding();
binding.setMTOMEnabled(true);
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint);
} catch (Exception e) {
LOGGER.error("Error initializing proxy.", e);
}
}
use of javax.xml.ws.soap.SOAPBinding in project camel by apache.
the class CxfMtomRouterPayloadModeTest method setUp.
@Before
public void setUp() throws Exception {
endpoint = Endpoint.publish("http://localhost:" + port2 + "/" + getClass().getSimpleName() + "/jaxws-mtom/hello", getImpl());
SOAPBinding binding = (SOAPBinding) endpoint.getBinding();
binding.setMTOMEnabled(true);
}
use of javax.xml.ws.soap.SOAPBinding in project camel by apache.
the class CxfMtomConsumerTest method testInvokingService.
@Test
public void testInvokingService() throws Exception {
if (MtomTestHelper.isAwtHeadless(null, log)) {
return;
}
Holder<byte[]> photo = new Holder<byte[]>("RequestFromCXF".getBytes("UTF-8"));
Holder<Image> image = new Holder<Image>(getImage("/java.jpg"));
Hello port = getPort();
SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding();
binding.setMTOMEnabled(true);
port.detail(photo, image);
assertEquals("ResponseFromCamel", new String(photo.value, "UTF-8"));
assertNotNull(image.value);
}
use of javax.xml.ws.soap.SOAPBinding in project camel by apache.
the class CxfMtomProducerPayloadModeTest method setUp.
@Before
public void setUp() throws Exception {
endpoint = Endpoint.publish("http://localhost:" + port + "/" + getClass().getSimpleName() + "/jaxws-mtom/hello", getServiceImpl());
SOAPBinding binding = (SOAPBinding) endpoint.getBinding();
binding.setMTOMEnabled(isMtomEnabled());
}
use of javax.xml.ws.soap.SOAPBinding in project cxf by apache.
the class CXFServletTest method testGetBinding.
@Test
public void testGetBinding() throws Exception {
Endpoint ep = Endpoint.create("http://schemas.xmlsoap.org/wsdl/soap/http", new HelloImpl());
assertTrue(ep.getBinding() instanceof SOAPBinding);
}
Aggregations