> >My test client code is very very simple (and use to work before I
> >tried to change
> >it to https):
> >
> > public static void main(String... argv) throws Exception
> > {
> > URL url = new
> > URL("https://127.0.0.1:8086/foo/ws/HelloWorldService?wsdl ");
> > HelloWorldWsService service=new HelloWorldWsService(url);
> >
> > // HelloWorldWsService service=new HelloWorldWsService();
> >
> > HelloWorldWs helloWorld=service.getHelloWorldWsPort();
> > Client cxfClient = ClientProxy.getClient(helloWorld);
> > HTTPConduit http = (HTTPConduit) cxfClient.getConduit();
> >
> > System.err.println(helloWorld.helloWorld());
> > System.err.println(helloWorld.helloWorld2("foo"));
> > }
>
>
> Same issue -- you're loading the service WSDL through an https URL,
> not an http URL. I suspect what's going on here is that your service
> at port 8066 is not using a server certificate signed by a "trusted"
> certificate. You could try adding the issuer to the JVM trust store
> (as an experiment), but that will seriously weaken your trust model,
> and should not be used as a general solution in a production system.
Thanks for the reply, what you're saying makes sense, but.... my errors don't
(at
least to me).
So based on what you previously said, I had to reconfigure my server, so both
HTTP
and HTTPS are running but now I've reconfigured the end point i.e.
<jaxws:endpoint implementor="org.xxx.ws.HelloWorldWs"
address="/HelloWorldService"
publishedEndpointUrl="https://127.0.0.1:8086/xxx/ws/HelloWorldService"/>
Now if I check the wsdl using my browser it shows
<wsdl:port binding="tns:HelloWorldWsServiceSoapBinding"
name="HelloWorldWsPort">
<soap:address
location="https://127.0.0.1:8086/xxxx/ws/HelloWorldService"/>
</wsdl:port>
which I assume to be what I need.
I've now changed the client to be :
public static void main(String... argv) throws Exception
{
HelloWorldWsService service = new HelloWorldWsService();
HelloWorldWs helloWorld = service.getHelloWorldWsPort();
Client cxfClient = ClientProxy.getClient(helloWorld);
HTTPConduit httpConduit = (HTTPConduit)cxfClient.getConduit();
TLSClientParameters tslClientParameters = new
TLSClientParameters();
tslClientParameters.setSecureSocketProtocol("SSL");
httpConduit.setTlsClientParameters(tslClientParameters);
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(36000);
httpClientPolicy.setAllowChunking(false);
httpClientPolicy.setReceiveTimeout(32000);
httpConduit.setClient(httpClientPolicy);
System.err.println(helloWorld.helloWorld());
System.err.println(helloWorld.helloWorld2("foo"));
}
Now, when I run it, it gets a little further but my new error is :
org.apache.cxf.interceptor.Fault: Unconnected sockets not implemented
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:93)
...
Caused by: com.ctc.wstx.exc.WstxIOException: Unconnected sockets not
implemented
at
com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:91)
...
Caused by: java.net.SocketException: Unconnected sockets not implemented
at javax.net.SocketFactory.createSocket(SocketFactory.java:97)
at
sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:360)
...
Caused by: org.apache.cxf.interceptor.Fault: Unconnected sockets not
implemented
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:93)
...
The line it errors on is actually the
System.err.println(helloWorld.helloWorld());
line. I couldn't find anything searching the internet on "Unconnected sockets
not
implemented" (except a bunch of amq items). I can't really find anything else
that
tells me what is wrong or what is configured wrong.
Any information is appreciated, thanks.
--
Ted Leung
[EMAIL PROTECTED]
// /*
You know things are getting a little fishy when you're commenting out
comments.
// */