掲示板

failed to liferay webservice

14年前 に praveen kumar によって更新されました。

failed to liferay webservice

New Member 投稿: 3 参加年月日: 10/03/19 最新の投稿
the following is my error, could any help me on this, why am getting this ?


AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:lab93

java.rmi.RemoteException
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:1774)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)
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:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
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:107)
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)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
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.addUser(Portal_UserServiceSoapBindingStub.java:1295)
at com.liferay.portal.events.lir.main(lir.java:81)
the error : java.rmi.RemoteException
thumbnail
14年前 に Corné A によって更新されました。

RE: failed to liferay webservice

Liferay Legend 投稿: 1313 参加年月日: 06/10/03 最新の投稿
It depends on what you are trying to do.
Please elaborate.
14年前 に praveen kumar によって更新されました。

RE: failed to liferay webservice

New Member 投稿: 3 参加年月日: 10/03/19 最新の投稿
hi,

i want to add new user to liferay portal databse using the webservice (http://10115:password@10.1.11.93:9000/tunnel-web/axis/Portal_UserService), and i need to assign the user to particular group. when am trying to do this i got the above exception.
please verify my code and help me....

thanks in advance

my code is here :
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package com.liferay.portal.events;

/**
*
* @author Praveen
*/
import java.net.URL;

import com.liferay.client.soap.portal.model.UserSoap;
import com.liferay.client.soap.portal.service.ServiceContext;
import com.liferay.client.soap.portal.service.http.GroupServiceSoap;
import com.liferay.client.soap.portal.service.http.GroupServiceSoapServiceLocator;
import com.liferay.client.soap.portal.service.http.UserServiceSoap;
import com.liferay.client.soap.portal.service.http.UserServiceSoapServiceLocator;

public class SampleWSClient1
{
public static void main(String[] args)
{
try
{
long creatorUserId = 0;
boolean autoPassword = false;
boolean autoScreenName = false;
String openId = "";
java.util.Locale locale = new java.util.Locale("en_US");
String middleName = "";
int prefixId = 0;
int suffixId = 0;
int birthdayMonth = 3;
int birthdayDay = 23;
int birthdayYear = 1985;
String jobTitle = "";
//long[] groupIds = null;
long[] organizationIds = null;
long[] roleIds = null;
long[] userGroupIds = null;
boolean sendEmail = false;
ServiceContext serviceContext = new ServiceContext();
String remoteUser = "test";
String password = "test";
String screenName="praveekan";
String emailAddress="pravee@liferay.com";
String password1="password";
String firstName="pravee";
String lastName="kan";
long[] groupIds = null;
UserServiceSoapServiceLocator locator = new UserServiceSoapServiceLocator();
UserServiceSoap soap = locator.getPortal_UserService(_getURL("12721", "Portal_UserService"));


UserSoap usoap= soap.addUser(10112, autoPassword,password1,password1,autoScreenName,screenName,emailAddress,openId,"ENGLISH",firstName,middleName,lastName,prefixId,suffixId, true,birthdayMonth,birthdayDay,birthdayYear, jobTitle, groupIds,organizationIds,roleIds,userGroupIds, sendEmail,new ServiceContext());
long[] uid={usoap.getUserId()};
System.out.println("uid : "+uid[0]);
soap.addUserGroupUsers(14502, uid);
}
catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}


}


public static URL _getURL(String userIdAsString, String serviceName) throws Exception {

// Unathenticated url

String url = "http://10.1.11.93:9000/tunnel-web/axis/" + serviceName;

// Authenticated url

if (true) {


url = "http://10115:password@10.1.11.93:9000/tunnel-web/axis/" + serviceName;
}
System.out.println(url);
return new URL(url);
}
}