Announcement Announcement Module
Collapse
No announcement yet.
Calling web services using Axis 2 in Spring Framework/ Virgo Server using SSL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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
    Error:
    Caused by: java.lang.ExceptionInInitializerError: null
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
    at org.springframework.beans.BeanUtils.instantiateCla ss(BeanUtils.java:126)
    at org.springframework.beans.factory.support.SimpleIn stantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:108)
    at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:280)
    ... 28 common frames omitted
    Caused by: java.lang.ArrayStoreException: org.apache.axis2.java.security.TrustAllTrustManage r.

    ----------------------------
    any suggestions would be great help for us.

  • #2
    This forum is for the Spring Integration project http://www.springsource.org/spring-integration/ and not for general "how do I integrate [foo] with Spring?" questions.

    Comment

    Working...
    X