Hi,
My client code for accessing web service:
internetID = new PersonalDemographicsRequestType();
String endpointURL = "https://csdevib.psoft-oit.umn.edu/PSIGW/PeopleSoftServiceListeningConnector";
UM_SIRC_PERSDEMO_BindingStub stub = null;
stub = new UM_SIRC_PERSDEMO_BindingStub();
PersDemoLocator locator = new PersDemoLocator();
stub = new UM_SIRC_PERSDEMO_BindingStub(new URL(endpointURL), locator);
//stub.createCall();
PersonalDemographicsResponseType fileContent = null;
internetID.setInternetID("irrth002");
//stub.setHeader("cshr.umn.edu/PersDemo.1", "Security:Username", "UMWSSIRC");
//stub.setHeader("cshr.umn.edu/PersDemo.1", "Security:Password", "Hiper2012Zer0409");
/* SOAPHeaderElement header = new SOAPHeaderElement(
"cshr.umn.edu/PersDemo.1", "Security");
SOAPElement node = header.addChildElement("Username");
node.addTextNode("UMWSSIRC");
SOAPElement node2 = header.addChildElement("Password");
node2.addTextNode("Hiper2012Zer0409");
stub.setHeader(header) ;*/
//HttpTransportProperties.Authenticator basicAuthentication = new HttpTransportProperties.Authenticator();
//basicAuthentication.setUsername("UMWSSIRC");
// basicAuthentication.setPassword("Hiper2012Zer0409");
//stub._setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication);
stub._setProperty(stub.USERNAME_PROPERTY, "UMWSSIRC");
stub._setProperty(stub.PASSWORD_PROPERTY, "Hiper2012Zer0409");
//stub.setUsername("UMWSSIRC");
//stub.setPassword("Hiper2012Zer0409");
fileContent=stub.persDemo(internetID);
After running error coming as
{
{http://xml.apache.org/axis/}HttpErrorCode:401
(401)Unauthorized
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at _1.edu.PersDemo.umn.cshr.UM_SIRC_PERSDEMO_BindingStub.persDemo(UM_SIRC_PERSDEMO_BindingStub.java:190)
at _1.edu.PersDemo.umn.cshr.PersDemoclient.main(PersDemoclient.java:51)
But when i try to run in SOAPUI its working fine so credentials are correct please help