Apache CXF D-OSgi と Eclipse Equinox を開発環境として使用しています。サービスを登録しましたが、IE で wsdl ページを開くことができません。サービス レジスタ コードは次のとおりです。
` Dictionary<String, String> props = new Hashtable<String, String>();
props.put("osgi.remote.interfaces", "*");
props.put("osgi.remote.configuration.type","pojo");
props.put("osgi.remote.configuration.pojo.address", "http://localhost:9000/1");
sr = bundleContext.registerService
(service1.class.getName(), new impl1(), props);`
クライアント プログラムを実行しようとすると、次のエラーが表示されます。
Caused by: java.net.SocketException: SocketException invoking http://localhost:9000/1: Network is unreachable: connect
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2058)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2043)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 43 more
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1955)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1907)
at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:42)
at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1974)
... 46 more
2011-5-10 23:22:04 org.apache.cxf.dosgi.topologymanager.RemoteServiceAdminListenerImpl remoteAdminEvent
情報: Unhandled event type received: 1 2011-5-10 23:22:04 org.apache.cxf.dosgi.topologymanager.TopologyManager$1 modifiedService 情報: TopologyManager: EndpointListener changed ... 2011-5-10 23:22:04 org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore importService 情報: importService() エンドポイント: {endpoint.id=http://localhost:9000/1, objectClass=[Ljava.lang.String;@988707, osgi. remote.configuration.pojo.address=http://localhost:9000/1、osgi.remote.configuration.type=pojo、osgi.remote.interfaces=, service.imported=true, service.imported.configs=org.apache.cxf.ws} 2011-5-10 23:22:04 org.apache.cxf.dosgi.topologymanager.RemoteServiceAdminListenerImpl remoteAdminEvent 情報: 受信した未処理のイベント タイプ: 1 2011-5-10 23:22:04 org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore importService 情報: importService() エンドポイント: {endpoint.id=http://localhost:9000/1, objectClass=[ Ljava.lang.String;@988707、osgi.remote.configuration.pojo.address=http://localhost:9000/1、osgi.remote.configuration.type=pojo、osgi.remote.interfaces=、service.imported= true, service.imported.configs=org.apache.cxf.ws} 2011-5-10 23:22:04 org.apache.cxf.dosgi.topologymanager.RemoteServiceAdminListenerImpl remoteAdminEvent 情報: Unhandled event type received: 1