cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT - Deployable Web Service Proxy gets an unauthorized message

Former Member
0 Kudos

Hello Guys!

I had developed a <i>deployable web service proxy</i> that is called from a servlet. The web service is secured by a basic authentication. My servlet instantiates the proxy and I set the stub like the code bellow:

Maintenance myMaintenance = (Maintenance)ctx.lookup("java:comp/env/MaintenanceWSProxy");
MaintenanceViDocument port = (MaintenanceViDocument)myMaintenance.getLogicalPort("MaintenancePort_Document", MaintenanceViDocument.class);			

port._setProperty("javax.xml.rpc.security.auth.username", "user");
port._setProperty("javax.xml.rpc.security.auth.password", "password");

But when I call the servlet, an exception is thrown:

407 - Unauthorized

Somebody knows what is happened?

Thanks a lot!

Best regards,

Marcelo

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Marcelo,

If it's a deployable proxy....u need not specify the user name and password in your code.

Just assign the user name and password through Visual Administrator:

Under Server->services->Web service security

choose runtime -> Web service clients -> (your Deployed proxy )

on the right side of the window u'll see Logon Data:

Select the Authentication as BASIC

and enter the user name and password and save it.

Hope that helps u out.

Tali

Former Member
0 Kudos

Hello Marcelo,

i've got an impression that the return error code is related to servlet itself.

Was the servlet deployed as a portal application or as pure j2ee (via SDM or via portal support page)?

Are you accesing it through portal framework or by a direct link to j2ee application?

If it is an portal application - you need to set security policy for iView or for the application (depends on the way you use it. Via iView or via direct link)

If it is an pure j2ee application, then you can define your security roles within the project. First of all, check those settings. Second step is done in VisualAdmin, where you map objects from UME to your security role defined in project.

hope it helps.

regards

mz