Search in sources :

Example 36 with EndpointImpl

use of org.apache.cxf.jaxws.EndpointImpl in project survey by markoniemi.

the class WebServiceConfig method userServiceEndpoint.

@Bean
public Endpoint userServiceEndpoint() {
    EndpointImpl endpoint = new EndpointImpl(bus, userService);
    endpoint.setAddress("/soap/userService");
    endpoint.publish("/soap/userService");
    return endpoint;
}
Also used : EndpointImpl(org.apache.cxf.jaxws.EndpointImpl) Bean(org.springframework.context.annotation.Bean)

Example 37 with EndpointImpl

use of org.apache.cxf.jaxws.EndpointImpl in project survey by markoniemi.

the class WebServiceConfig method fileServiceEndpoint.

@Bean
public Endpoint fileServiceEndpoint() {
    EndpointImpl endpoint = new EndpointImpl(bus, fileService);
    endpoint.setAddress("/soap/fileService");
    endpoint.publish("/soap/fileService");
    return endpoint;
}
Also used : EndpointImpl(org.apache.cxf.jaxws.EndpointImpl) Bean(org.springframework.context.annotation.Bean)

Example 38 with EndpointImpl

use of org.apache.cxf.jaxws.EndpointImpl in project cxf by apache.

the class WSDiscoveryServiceImpl method startup.

public synchronized boolean startup(boolean optional) {
    String preferIPv4StackValue = System.getProperty("java.net.preferIPv4Stack");
    String preferIPv6AddressesValue = System.getProperty("java.net.preferIPv6Addresses");
    if (!started && client.isAdHoc()) {
        Bus b = BusFactory.getAndSetThreadDefaultBus(bus);
        try {
            udpEndpoint = new EndpointImpl(bus, new WSDiscoveryProvider());
            Map<String, Object> props = new HashMap<>();
            props.put("jaxws.provider.interpretNullAsOneway", "true");
            udpEndpoint.setProperties(props);
            if ("true".equals(preferIPv6AddressesValue) && "false".equals(preferIPv4StackValue)) {
                try {
                    udpEndpoint.publish("soap.udp://[FF02::C]:3702");
                    started = true;
                } catch (Exception e) {
                    LOG.log(Level.WARNING, "Could not start WS-Discovery Service with ipv6 address", e);
                }
            }
            if (!started) {
                udpEndpoint.publish("soap.udp://239.255.255.250:3702");
                started = true;
            }
        } catch (RuntimeException ex) {
            if (!optional) {
                throw ex;
            }
            LOG.log(Level.WARNING, "Could not start WS-Discovery Service.", ex);
        } finally {
            if (b != bus) {
                BusFactory.setThreadDefaultBus(b);
            }
        }
    }
    return true;
}
Also used : Bus(org.apache.cxf.Bus) HashMap(java.util.HashMap) EndpointImpl(org.apache.cxf.jaxws.EndpointImpl) XMLStreamException(javax.xml.stream.XMLStreamException) JAXBException(javax.xml.bind.JAXBException) IOException(java.io.IOException)

Example 39 with EndpointImpl

use of org.apache.cxf.jaxws.EndpointImpl in project cxf by apache.

the class ProviderJMSContinuationTest method startServers.

@BeforeClass
public static void startServers() throws Exception {
    startBusAndJMS(ProviderJMSContinuationTest.class);
    Object implementor = new HWSoapMessageDocProvider();
    String address = "jms:queue:test.jmstransport.text?replyToQueueName=test.jmstransport.text.reply";
    EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor);
    ep.getInInterceptors().add(new IncomingMessageCounterInterceptor());
    ep.setBus(bus);
    ep.getFeatures().add(cff);
    ep.publish(address);
}
Also used : EndpointImpl(org.apache.cxf.jaxws.EndpointImpl) BeforeClass(org.junit.BeforeClass)

Example 40 with EndpointImpl

use of org.apache.cxf.jaxws.EndpointImpl in project cxf by apache.

the class MissingQualification1226Test method lookForMissingNamespace.

@Test
public void lookForMissingNamespace() throws Exception {
    EndpointImpl endpoint = getBean(EndpointImpl.class, "helloWorld");
    Document d = getWSDLDocument(endpoint.getServer());
    NodeList schemas = assertValid("//xsd:schema[@targetNamespace='http://nstest.helloworld']", d);
    Element schemaElement = (Element) schemas.item(0);
    String ef = schemaElement.getAttribute("elementFormDefault");
    assertEquals("qualified", ef);
}
Also used : EndpointImpl(org.apache.cxf.jaxws.EndpointImpl) NodeList(org.w3c.dom.NodeList) Element(org.w3c.dom.Element) Document(org.w3c.dom.Document) AbstractCXFSpringTest(org.apache.cxf.test.AbstractCXFSpringTest) Test(org.junit.Test)

Aggregations

EndpointImpl (org.apache.cxf.jaxws.EndpointImpl)61 QName (javax.xml.namespace.QName)14 Test (org.junit.Test)9 Bus (org.apache.cxf.Bus)8 BeforeClass (org.junit.BeforeClass)7 Bean (org.springframework.context.annotation.Bean)7 Endpoint (javax.xml.ws.Endpoint)5 URL (java.net.URL)4 HashMap (java.util.HashMap)4 LoggingInInterceptor (org.apache.cxf.ext.logging.LoggingInInterceptor)4 LoggingOutInterceptor (org.apache.cxf.ext.logging.LoggingOutInterceptor)4 Feature (org.apache.cxf.feature.Feature)4 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)4 SpringBusFactory (org.apache.cxf.bus.spring.SpringBusFactory)3 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 JAXBException (javax.xml.bind.JAXBException)2 XMLStreamException (javax.xml.stream.XMLStreamException)2 WebServiceException (javax.xml.ws.WebServiceException)2