cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
278
Views
0
Helpful
2
Replies

AXL CCM5.1 without using SOAPFactory

aleja
Level 1
Level 1

To avoid using the extra classes coming with the axltoolkit I am trying to do the connection to the AXL server without the SOAP factory, which means I can?t use the URLendpoint definition. The creation of the socket looks like this:

X509TrustManager xtm = new MyTrustManager();

TrustManager[] mytm = { xtm };

SSLContext ctx = SSLContext.getInstance("SSL");

ctx.init(null, mytm, null);

SSLSocketFactory sf = ctx.getSocketFactory();

HttpsURLConnection.setDefaultSSLSocketFactory(sf);

HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {

public boolean verify(String hostname,SSLSession session) {

return true;

}

});

Socket socket = sf.createSocket(host,port);

First question, which port number should this be? Using 8443 I get a handshake error.

I am also a bit confused of the message header I should build then. Should it look like this?

POST :8443/axl

Host: ccm:80

Authorization: Basic wuiuiuqzezzq

Accept: text/*

Content-type: text/xml

Content-length:

Again I am a bit confused of the port numbers? Did anybody tried it like this? I also gave it a try using a normal socket, with no SSLContext and then I got no answer at all from the server, and no error.

Thanks!

alej

2 Replies 2

stephan.steiner
Spotlight
Spotlight

The documentation is indeed very confusing....

I didn't have any problems opening a regular HttpsURLConnection to a ccm 5.x so forget about port 8443.. only the axlsqltoolkit uses it but you can do axl by connecting to the standard https port. And there's no need for the special post header either.

oh yes, confusing indeed! I managed it now, thanks a lot for your feedback!!!!!

cheers,

alej

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: