Announcement Announcement Module
No announcement yet.
Calling web services using Axis 2 in Spring Framework/ Virgo Server using SSL Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling web services using Axis 2 in Spring Framework/ Virgo Server using SSL

    Hi All,

    1) We have deployed a web application (which comprises of Service layer(Java) and UI layer(Flex)) in Virgo server.
    2) Service layer needs to communicate to a 3rd Party server (C++) using Web services (Axis 2).
    3) We cannot add a key/certificate of 3rd party server into the "key store" file of the virgo server .
    4) Axis 2 has given a option of communicating with 3rd party server as mentioned below:

    SSLContext sslCtx = SSLContext.getInstance("http");
    sslCtx.init(null, new TrustManager[] {new TrustAllTrustManager()}, null);
    stub._getServiceClient().getOptions().setProperty( HTTPConstants.CUSTOM_PROTOCOL_HANDLER,
    new Protocol("https",(ProtocolSocketFactory)new SSLProtocolSocketFactory(sslCtx),443));

    Below is the URL suggesting above

    How ever when i used the above mentioned code from Stand Alone java application it's working fine.
    but in our virgo server which uses Spring FrameWork to load classes gives following statckTrace
    Caused by: java.lang.ExceptionInInitializerError: null
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(
    at java.lang.reflect.Constructor.newInstance(Construc
    at org.springframework.beans.BeanUtils.instantiateCla ss(
    at stantiationStrategy.instantiate(SimpleInstantiatio
    at torResolver.autowireConstructor(ConstructorResolve
    ... 28 common frames omitted
    Caused by: java.lang.ArrayStoreException: r.

    any suggestions would be great help for us.

  • #2
    This forum is for the Spring Integration project and not for general "how do I integrate [foo] with Spring?" questions.