相关疑难解决方法(0)

如何使用wsdl2java为wsdl生成SOAP 1.2绑定?

我简要说明:

如何让wsdl2java生成SOAP 1.2绑定?

详细说明:

我使用工具(apache cxf 3.0.2)为wsdl生成了java服务类wsdl2java:

MBA-Anton:bin asmirnov$ ./wsdl2java -server -catalog /tmp/wsdl/catalog  -d /tmp/onvif/server http://www.onvif.org/onvif/ver10/network/wsdl/remotediscovery.wsdl
Run Code Online (Sandbox Code Playgroud)

然后我创建了服务代码并运行它,它正在运行:

public static void main(String args[]) throws InterruptedException {
        System.out.println("Starting Server");
        Endpoint.publish("udp://239.255.255.250:3702", new DiscoveryService());

        System.out.println("Server ready...");

        Thread.sleep(10 * 60 * 1000); // 10 min
        System.out.println("Server exiting");
        System.exit(0);
    }
Run Code Online (Sandbox Code Playgroud)

开始记录:

Starting Server
28.11.2014 19:51:59 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://www.onvif.org/ver10/network/wsdl}DiscoveryService from class org.onvif.ver10.network.wsdl.DiscoveryLookupPort
28.11.2014 19:52:00 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be udp://239.255.255.250:3702
28.11.2014 19:52:00 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: …
Run Code Online (Sandbox Code Playgroud)

xml wsdl cxf wsdl2java ws-discovery

8
推荐指数
0
解决办法
3181
查看次数

标签 统计

cxf ×1

ws-discovery ×1

wsdl ×1

wsdl2java ×1

xml ×1