<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Is the soap api still valid for Liferay 7.0</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110988218" />
  <subtitle>Is the soap api still valid for Liferay 7.0</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110988218</id>
  <updated>2026-04-08T01:01:03Z</updated>
  <dc:date>2026-04-08T01:01:03Z</dc:date>
  <entry>
    <title>Is the soap api still valid for Liferay 7.0</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110988217" />
    <author>
      <name>William Gosse</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110988217</id>
    <updated>2018-09-19T18:51:59Z</updated>
    <published>2018-09-19T18:51:59Z</published>
    <summary type="html">&lt;p&gt;I was trying to use the 7.0 client zip downloadable from Sourceforge
  to write a client app but I'm having some issues. The Developer
  Network article for the soap api seems a little out of date for 7.0.
  Here the url:  &lt;a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/soap-web-services"&gt;https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-0/soap-web-services&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The article references package that start with com.liferay.portal but
  the stuff I downloaded for 7 GA7 use packages that starts with com.liferay.client.soap.portal.&lt;/p&gt;
&lt;p&gt;Any I tried using the sample code that's in the article with the
  necessary changes.  It seems to work some what but when I hit the
  following code:&lt;/p&gt;
&lt;p&gt;// Get the ID of the remote user&lt;br /&gt; userId =
  userSoap.getUserIdByScreenName(companySoap.getCompanyId(),
  remoteUser);&lt;br /&gt; System.out.println(&amp;quot;userId for user named
  &amp;quot; + remoteUser + &amp;quot; is &amp;quot; + userId);&lt;/p&gt;
&lt;p&gt;I get the following exception:&lt;/p&gt;
&lt;p&gt;2018-09-19 18:06:53.457 ERROR
  [http-nio-8080-exec-5][UserServiceSoap:826]
  com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission:
  User 20119 must have VIEW permission for
  com.liferay.portal.kernel.model.User 20155&lt;br /&gt;
  com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission:
  User 20119 must have VIEW permission for
  com.liferay.portal.kernel.model.User 20155&lt;br /&gt;         at
  com.liferay.portal.service.permission.UserPermissionImpl.check(UserPermissionImpl.java:69)&lt;br /&gt;
          at
  com.liferay.portal.kernel.service.permission.UserPermissionUtil.check(UserPermissionUtil.java:39)&lt;br /&gt;  &lt;/p&gt;
&lt;p&gt;I did have to open up the new Service Access Policy to allow all
  services to be accessible. Before that nothing seemed to work.  Also
  tried adding the following to my code as part of the authentication
  but no luck:&lt;/p&gt;
&lt;p&gt;            // Locate the User service&lt;br /&gt;           
   UserServiceSoapServiceLocator locatorUser = new
  UserServiceSoapServiceLocator();&lt;br /&gt;             UserServiceSoap
  userSoap = locatorUser&lt;br /&gt;                   
   .getPortal_UserService(_getURL(remoteUser, password, serviceUserName,
  true));&lt;br /&gt;            &lt;strong&gt; ((Portal_UserServiceSoapBindingStub)
    userSoap).setUsername(remoteUser);&lt;br /&gt;           
     ((Portal_UserServiceSoapBindingStub) userSoap).setPassword(password);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The exception seems to be saying that I'm not logged in as my admin
  user. Not sure what if anything I'm missing. I did this in 6.2 but its
  been a while. I've attached my source but its pretty much the same
  that's in the article.&lt;/p&gt;</summary>
    <dc:creator>William Gosse</dc:creator>
    <dc:date>2018-09-19T18:51:59Z</dc:date>
  </entry>
</feed>
