Hi all,
POM version : 3.0.1
WSDL File :
http://EPM:Server/axis2/services/ VP_POMAgentAPIService?wsdl
Service name : GetCampaignAttributesList
Purpose : I'm creating a pom agent client to be used on my applications.
First, the VP has an user with the POM privilegies. I have set a password for that user, and I could login succesfully.
{See image attached}
I'm using spring with "interceptors"... the values ${xxx} are filled using a properties file.
<beans:bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="securementActions" value="UsernameToken" />
<property name="securementUsername" value="${ws.auth.user}" />
<property name="securementPassword" value="${ws.auth.pass}" />
<property name="securementPasswordType" value="PasswordDigest" />
</beans:bean>
and the SOAP request generated is:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<wsse:Security 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" SOAP-ENV:mustUnderstand="1">
<wsse:UsernameToken wsu:Id="UsernameToken-1">
<wsse:Username>pomuser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">o8ikEqb/PW4gSjIBUij38/wzvTg=</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">X6c3LE4YBUIxZEodvES4BQ==</wsse:Nonce>
<wsu:Created>2015-04-20T16:03:43.698Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:GetCampaignAttributesList xmlns:ns2="http://services.pim.avaya.com/AgentAPI/"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But the response is:
MENSAJE: << "<html><head><title> - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>This request requires HTTP authentication.</u></p><HR size="1" noshade="noshade"><h3></h3></body></html>"
MENSAJE: org.springframework.ws.client.WebServiceTransportException: Unauthorized [401]
What I'm doing wrong?
Thanks in advanced!
Marcelo.