Hi all,
I'm facing the issue WARN - No endpoint mapping found for [SaajSoapMessage {http://www.w3.org/2001/04/xmlenc#}EncryptedData] when trying to encrypt a SOAP message using my own keystore with X509 standard.
I have developed a producer and consumer and both of them were working fine if the SOAP message is signed using my own keystore with x509.
But when I added encryption for the SOAP message, I got that error.
Here is my client configuration
- securityPolicy-client.xml
<xwss:SecurityConfiguration dumpMessages="true"
xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
<xwss:Sign includeTimestamp="false">
<xwss:X509Token certificateAlias="client" />
</xwss:Sign>
<xwss:RequireSignature requireTimestamp="false" />
<!-- ******************************* -->
<xwss:Encrypt>
<xwss:X509Token certificateAlias="client" keyReferenceType="Identifier"/>
<xwss:KeyEncryptionMethod algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
<xwssataEncryptionMethod algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
</xwss:Encrypt>
<xwss:RequireEncryption />
</xwss:SecurityConfiguration>
- ws-client.xml
<bean id="keyStore"
class="org.springframework.ws.soap.security.suppor t.KeyStoreFactoryBean">
<property name="password" value="changeit" />
<property name="location" value="classpath:client.jks" />
</bean>
<bean id="keyStoreHandler"
class="org.springframework.ws.soap.security.xwss.c allback.KeyStoreCallbackHandler">
<property name="keyStore" ref="keyStore" />
<property name="trustStore" ref="keyStore" />
<property name="privateKeyPassword" value="changeit" />
<property name="defaultAlias" value="client" />
</bean>
<bean id="wsSecurityInterceptor"
class="org.springframework.ws.soap.security.xwss.X wsSecurityInterceptor">
<property name="policyConfiguration" value="classpath:securityPolicy-client.xml" />
<property name="callbackHandlers">
<list>
<ref bean="keyStoreHandler" />
</list>
</property>
</bean>
Here is my server configuration
- securityPolicy-server.xml
<xwss:SecurityConfiguration dumpMessages="true"
xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
<xwss:Sign includeTimestamp="false">
<xwss:X509Token certificateAlias="service" />
</xwss:Sign>
<xwss:RequireSignature requireTimestamp="false" />
<!-- ******************************* -->
<xwss:Encrypt>
<xwss:X509Token certificateAlias="service" keyReferenceType="Identifier"/>
<xwss:KeyEncryptionMethod algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
<xwssataEncryptionMethod algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
</xwss:Encrypt>
<xwss:RequireEncryption />
</xwss:SecurityConfiguration>
- ws-service.xml
<bean id="keyStoreHandler"
class="org.springframework.ws.soap.security.xwss.c allback.KeyStoreCallbackHandler">
<property name="trustStore" ref="trustStore" />
<!-- <property name="keyStore" ref="trustStore" /> -->
<!--
<property name="privateKeyPassword" value="changeit" />
<property name="defaultAlias" value="service" />
-->
</bean>
<bean id="trustStore"
class="org.springframework.ws.soap.security.suppor t.KeyStoreFactoryBean">
<property name="location" value="classpath:service.jks" />
<property name="password" value="changeit" />
</bean>
<bean id="wsSecurityInterceptor"
class="org.springframework.ws.soap.security.xwss.X wsSecurityInterceptor">
<property name="policyConfiguration" value="classpath:securityPolicy-server.xml" />
<property name="secureResponse" value="false" />
<property name="callbackHandlers">
<list>
<ref bean="keyStoreHandler" />
</list>
</property>
</bean>
Please see below for the details of logs
Exception in thread "main" org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]
at org.springframework.ws.client.core.WebServiceTempl ate.handleError(WebServiceTemplate.java:627)
at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:551)
at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:502)
at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 351)
at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 345)
at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 337)
at com.copart.c2.sample.ws.client.SaleListInvoker.sen dSOAPMessage(SaleListInvoker.java:31)
at com.copart.c2.sample.ws.client.SaleListClientTest. main(SaleListClientTest.java:12)
....
146298 INFO - Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
146564 INFO - FrameworkServlet 'ws': initialization completed in 8611 ms
148095 WARN - No endpoint mapping found for [SaajSoapMessage {http://www.w3.org/2001/04/xmlenc#}EncryptedData]
236388 WARN - No endpoint mapping found for [SaajSoapMessage {http://www.w3.org/2001/04/xmlenc#}EncryptedData]
259547 WARN - No endpoint mapping found for [SaajSoapMessage {http://www.w3.org/2001/04/xmlenc#}EncryptedData]
Any help would be much appreciated,
Thanks a lot


ataEncryptionMethod algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"/>
Reply With Quote
