views:

17

answers:

2

We have implemented webservices on Weblogic 10.3.

I am trying to test the webservices using the SOAP UI client (soapui.org).

but I get following error message:

Error 401--Unauthorized

Error 401--Unauthorized

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.4.2 401 Unauthorized

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity MAY include relevant diagnostic information. HTTP access authentication is explained in section 11.

Any idea if I need to do special config on SOAP UI.

Update: after following Zeger's advice, I did a basic authentication i.e. set the username and pwd (weblogic / weblogic) to header of SOAP request (in SOAP UI). However now I get following error:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"&gt; <env:Body> <env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"&gt; <faultcode>wsse:InvalidSecurity</faultcode> <faultstring>Error codes: 1061 2661 1028 Error code:1061</faultstring> </env:Fault> </env:Body> </env:Envelope> 
A: 

Your webservice needs authentication. So, if you want to test this service with SOAP UI, you need to pass the credentials using HTTP Header (the option to set headers is at the lower end of SOAPUI).

Read this more details.

zengr
well I did enter default username and password (weblogic / weblogic) but now I get following error message:
rohit
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <faultcode>wsse:InvalidSecurity</faultcode> <faultstring>Error codes: 1061 2661 1028 Error code:1061</faultstring> </env:Fault> </env:Body></env:Envelope>
rohit
Can you please update your question with the above error. It's not readable here.
zengr
updated my original post.
rohit
A: 

probably your web service requires more complex security head like ws security username token or timestamp. you can not see this header in wsdl so soap ui wont be generating any tag for them.

you can check: http://download.oracle.com/docs/cd/E11035_01/wls100/webserv_sec/message.html#wp243698

Caraxe
well, thanks. I read the whole content and can't really find any definite answer in it.
rohit