Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

AXL CCM5.1 without using SOAPFactory

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

Re: AXL CCM5.1 without using SOAPFactory

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.

New Member

Re: AXL CCM5.1 without using SOAPFactory

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

cheers,

alej

110
Views
0
Helpful
2
Replies