Foros de discusión

Acceder al Web Service de Liferay 6

thumbnail
José Humberto Márquez Zambrano, modificado hace 12 años.

Acceder al Web Service de Liferay 6

New Member Mensajes: 3 Fecha de incorporación: 12/05/11 Mensajes recientes
Hola a todos,

He instalado Liferay 6.0.6 CE sobre un servidor de aplicaciones de WebLogic 10.3. Además de esto tengo desplegado tunnel-web.war para acceder via axis al Web Service de Liferay. Esta es la configuración con respecto al componente axis configurado en el siguiente enlace Web Services via SOAP:


##
## Axis Servlet
##

#
# See Main Servlet on how to protect this servlet.
#
axis.servlet.hosts.allowed=<myip>,127.0.0.1,SERVER_IP
axis.servlet.https.required=false
</myip>


Estoy intentando acceder con estas url (el puerto de weblogic es 7090):
  • http://127.0.0.1:7090/tunnel-web/axis/Portal_UserService
  • http://127.0.0.1:7090/tunnel-web/secure/axis/Portal_UserService
  • http://<screenname>:<password>@127.0.0.1:7090/tunnel-web/axis/Portal_UserService
  • http://<screenname>:<password>@127.0.0.1:7090/tunnel-web/secure/axis/Portal_UserService


Pero me muestran estos dos errores (las dos primeras opciones generan el primer error, las dos segundas, el segundo error):


[AxisFault]: java.rmi.RemoteException: PermissionChecker not initialized
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.rmi.RemoteException: PermissionChecker not initialized
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}hostname:PR282663

java.rmi.RemoteException: PermissionChecker not initialized
        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:601)
        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:2938)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)



[AxisFault]: (401)Unauthorized
AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode:
 faultString: (401)Unauthorized
 faultActor:
 faultNode:
 faultDetail:
        {}:return code:  401
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN"&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;Error 401--Unauthorized&lt;/TITLE&gt;
&lt;META NAME="GENERATOR" CONTENT="WebLogic Server"&gt;
&lt;/HEAD&gt;
&lt;BODY bgcolor="white"&gt;
&lt;FONT FACE=Helvetica&gt;&lt;BR CLEAR=all&gt;
&lt;TABLE border=0 cellspacing=5&gt;&lt;TR&gt;&lt;TD&gt;&lt;BR CLEAR=all&gt;
&lt;FONT FACE="Helvetica" COLOR="black" SIZE="3"&gt;&lt;H2&gt;Error 401--Unauthorized&lt;/H2&gt;
&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;TABLE border=0 width=100% cellpadding=10&gt;&lt;TR&gt;&lt;TD VALIGN=top WIDTH=100% BGCOLOR=white&gt;&lt;FONT FACE="Courier New"&gt;&lt;FONT FACE=&amp;
quot;Helvetica" SIZE="3"&gt;&lt;H3&gt;From RFC 2068 &lt;i&gt;Hypertext Transfer Protocol -- HTTP/1.1&lt;/i&gt;:&lt;/H3&gt;
&lt;/FONT&gt;&lt;FONT FACE="Helvetica" SIZE="3"&gt;&lt;H4&gt;10.4.2 401 Unauthorized&lt;/H4&gt;
&lt;/FONT&gt;&lt;P&gt;&lt;FONT FACE="Courier New"&gt;The request requires user authentication. The response MUST include a WWW-Authenticate header fie
ld (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (se
ction 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credential
s. 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 S
HOULD be presented the entity that was given in the response, since that entity MAY include relevant diagnostic information. HTTP access authentication is expla
ined in section 11.&lt;/FONT&gt;&lt;/P&gt;
&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;/TABLE&gt;

&lt;/BODY&gt;
&lt;/HTML&gt;

        {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 com.liferay.util.axis.SimpleHTTPSender.invoke(SimpleHTTPSender.java:66)
        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 com.liferay.client.soap.portal.service.http.Portal_UserServiceSoapBindingStub.getUserByScreenName(Portal_UserServiceSoapBindingStub.java:1552)


Por favor, si ya alguien ha trabajado con liferay 6 CE y weblogic 10 usando el Web Service agradezco mucho me pueda orientar con un ejemplo.

Si necesitan alguna información para identificar más rápidamente el problema por favor no dudar en escribirme.

Saludos
Ric CR, modificado hace 12 años.

RE: Acceder al Web Service de Liferay 6

New Member Mensaje: 1 Fecha de incorporación: 25/05/11 Mensajes recientes
Hola!
Tengo el mismo problema con los web services de Liferay en Weblogic, (401 Unauthorized) pudiste resolverlo?
Gracias
thumbnail
José Humberto Márquez Zambrano, modificado hace 11 años.

RE: Acceder al Web Service de Liferay 6

New Member Mensajes: 3 Fecha de incorporación: 12/05/11 Mensajes recientes
Hola,

No logré resolver este problema en ese momento, la solución luego pasó por otro camino, pero pienso que se debe crear un realm en weblogic para que liferay use eso como mecanismo de autenticación.

Saludos.