I am building a SOAP Service using CXF 2.7.x and Spring 3.2. The SOAP service
works well without security. But I went in and added WS-Security. Here is
the code.
<bean id="authenticationCallback"
class="com.intermedix.triptixcdx.soap.security.UserAuthenticationCallback"/>
<jaxws:endpoint id="submissionsExtract"
implementor="#submissionExtractService" address="/SubmissionExtractService">
<jaxws:properties>
<entry key="mtom-enabled" value="true"/>
</jaxws:properties>
<jaxws:inInterceptors>
<bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="passwordCallbackRef">
<ref bean="authenticationCallback"/>
</entry>
</map>
</constructor-arg>
</bean>
</jaxws:inInterceptors>
</jaxws:endpoint>
Here is the Soap Request.
<soap:Envelope xmlns:ser="http://service.soap.intermedix.com"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">[\n]"
<soap:Header><wsse:Security soap:mustUnderstand="true"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken
wsu:Id="UsernameToken-12"><wsse:Username>dohadmin</wsse:Username><wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">dohadmin</wsse:Password><wsse:Nonce
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">ZbMIPI3hE9r7pppxUZ/rfQ==</wsse:Nonce><wsu:Created>2013-06-14T13:34:00.186Z</wsu:Created></wsse:UsernameToken></wsse:Security></soap:Header>[\n]"
<soap:Body>[\n]"
<ser:getSubmissions>[\n]"
<submFilter>[\n]"
<startDate>2013-05-01</startDate>[\n]"
<endDate>2013-06-01</endDate>[\n]"
<daysPeriod>30</daysPeriod>[\n]"
<fileType>0</fileType>[\n]"
<deptId>669</deptId>[\n]"
</submFilter>[\n]"
</ser:getSubmissions>[\n]"
</soap:Body>[\n]"
</soap:Envelope>"
And am using SoapUI to test it. I just go to the Aut and add user name and
password for the message and set WSS Password Type to PasswordText
When I hit the Soap Service it returns an error message
INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
Can anyone please give me a clue whats happening?
Thank you!!
--
View this message in context:
http://cxf.547215.n5.nabble.com/SOAP-Request-Error-tp5729329.html
Sent from the cxf-user mailing list archive at Nabble.com.