掲示板
AxisFault for webservice invocation
7年前 に sharath karnati によって更新されました。
AxisFault for webservice invocation
New Member 投稿: 8 参加年月日: 16/03/22 最新の投稿
Hi All,
Trying to invoke axis webservice(in Linux) but it is throwing below error. It is working fine for local server (http://localhost:8080)
Added below lines in portal-ext.properties file
The webservice client code
The getURL method is returning below string:
http://xyz0123vu:Test!@dev-dw-a002:7001/api/axis/Portal_UserService
The same code working fine in local server(windows). Can someone please let me know, how to resolve this issue.
Thanks in advance.
Regards,
Sharath
Trying to invoke axis webservice(in Linux) but it is throwing below error. It is working fine for local server (http://localhost:8080)
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Failure trying to get the Call object; nested exception is:
java.lang.NoClassDefFoundError: javax/portlet/PortletResponse
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:dev-dw-a002.fun.com
Failure trying to get the Call object; nested exception is:
java.lang.NoClassDefFoundError: javax/portlet/PortletResponse
at com.liferay.portal.service.http.Portal_UserServiceSoapBindingStub.createCall(Portal_UserServiceSoapBindingStub.java:1411)
at com.liferay.portal.service.http.Portal_UserServiceSoapBindingStub.getUserById(Portal_UserServiceSoapBindingStub.java:2038)
at com.client.webservice.ClientService.main(ClientService.java:37)
Caused by: java.lang.NoClassDefFoundError: javax/portlet/PortletResponse
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at com.liferay.portal.service.http.Portal_UserServiceSoapBindingStub.createCall(Portal_UserServiceSoapBindingStub.java:1396)
... 2 more
Caused by: java.lang.ClassNotFoundException: javax.portlet.PortletResponse
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
Added below lines in portal-ext.properties file
axis.servlet.hosts.allowed=127.0.0.1,dev-dw-a002
axis.servlet.https.required=false
The webservice client code
UserServiceSoapServiceLocator locatorUser = new UserServiceSoapServiceLocator();
UserServiceSoap serviceUser = locatorUser.getPortal_UserService(getURL("Portal_UserService"));
PropertiesUtil propertiesUtil = PropertiesUtil.getInstance();
String email = (String)propertiesUtil.getProperty("user.email");
String screenName= (String)PropertiesUtil.getInstance().getProperty("user.screenName");
System.out.println("email:"+ email+" , screenName:"+screenName);
// to use Basic HTTP Authentication:
((Stub) serviceUser)._setProperty(Call.USERNAME_PROPERTY, screenName);
((Stub) serviceUser)._setProperty(Call.PASSWORD_PROPERTY, PASSWORD);
UserSoap user = serviceUser.getUserById(11130));
System.out.println("userEmail firstName: " + user.getFirstName() + " , lastName:"+ user.getLastName() + " , screenName:"+user.getScreenName());
The getURL method is returning below string:
http://xyz0123vu:Test!@dev-dw-a002:7001/api/axis/Portal_UserService
The same code working fine in local server(windows). Can someone please let me know, how to resolve this issue.
Thanks in advance.
Regards,
Sharath
7年前 に sharath karnati によって更新されました。
RE: AxisFault for webservice invocation
New Member 投稿: 8 参加年月日: 16/03/22 最新の投稿
Can someone please let me know, how to resolve this issue?
7年前 に sharath karnati によって更新されました。
java.rmi.RemoteException: Authenticated access required
New Member 投稿: 8 参加年月日: 16/03/22 最新の投稿
Hi,
Now I'm able to resolve classNotFoundException but getting below error
http://xvtest01:Test@dev-dw-a002.fun.com:7001/api/axis/Portal_UserService URL is correct and this is working correctly in my local server.
Added below lines in portal-ext.properties file
Can someone please let me know, how to resolve this issue.
Thanks in advance.
Regards,
Sharath.
Now I'm able to resolve classNotFoundException but getting below error
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException: Authenticated access required
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:dev-dw-a002.fun.com
java.rmi.RemoteException: Authenticated access required
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.liferay.portal.service.http.Portal_UserServiceSoapBindingStub.getUserById(Portal_UserServiceSoapBindingStub.java:2047)
at com.client.webservice.ClientService.main(ClientService.java:37)
http://xvtest01:Test@dev-dw-a002.fun.com:7001/api/axis/Portal_UserService URL is correct and this is working correctly in my local server.
Added below lines in portal-ext.properties file
axis.servlet.hosts.allowed=100.21.72.50,dev-dw-a002,dev-dw-a002.fun.com
axis.servlet.https.required=false
Can someone please let me know, how to resolve this issue.
Thanks in advance.
Regards,
Sharath.