Announcement Announcement Module
Collapse
No announcement yet.
Microsoft Exchange Service Authentication Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Microsoft Exchange Service Authentication

    Hello,

    I would like to retrieve emails from a MS Exchange Server, via Exchange Web Services, using Spring Integration, after authenticating.

    Here's my (very rough) app-context.xml file. Does it look OK to you? What should I put in my securityPolicy.xml file? Will the xwsSecurityInterceptor bean work with NTLM authentication?

    Many thanks.

    Philroc

    Code:
    <contextroperty-placeholder location="client.properties" />
    
    <!-- Authentication -->
    <bean id="messageSender" class="org.springframework.ws.transport.http.Commo nsHttpMessageSender" >
    <property name="credentials">
    <bean class="org.apache.commons.httpclient.UsernamePassw ordCredentials">
    <constructor-arg value="the_user"/>
    <constructor-arg value="the_password"/>
    </bean>
    </property>
    </bean>
    
    <int:channel id="serviceRequestChannel"/>
    
    <int-ws:outbound-gateway
    id="aService"
    request-channel="serviceRequestChannel"
    reply-channel="serviceResponseChannel"
    uri="https://mailserver.com/ews"
    message-sender="messageSender"
    interceptor="xwsSecurityInterceptor"
    />
    
    <int:channel id="serviceResponseChannel">
    <int:queue capacity="10"/>
    </int:channel>
    
    <bean id="keyStoreHandler" class="org.springframework.ws.soap.security.xwss.callback.KeyStoreCallbackHandler">
    <property name="trustStore" ref="trustStore"/>
    </bean>
    
    <bean id="trustStore" class="org.springframework.ws.soap.security.suppor t.KeyStoreFactoryBean">
    <property name="location" value="classpath*:META-INF/spring/integration/keystore.jks"/>
    <property name="password" value="the_password"/>
    </bean>
    
    <bean id="xwsSecurityInterceptor"
    class="org.springframework.ws.soap.security.xwss.X wsSecurityInterceptor">
    <property name="policyConfiguration" value="classpath:securityPolicy.xml"/>
    <property name="callbackHandlers">
    <list>
    <ref bean="keyStoreHandler"/>
    </list>
    </property>
    </bean>
    
    </beans>
Working...
X