フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is referenc Tom Mahy 2012/03/08 5:23
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Giuseppe Pantaleo 2012/06/18 3:37
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Tom Mahy 2012/06/18 3:41
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Juan Gonzalez 2012/06/18 4:26
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Tom Mahy 2012/06/18 5:16
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Juan Gonzalez 2012/06/18 5:28
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Tom Mahy 2012/06/18 5:31
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Juan Gonzalez 2012/06/18 5:35
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Tom Mahy 2012/06/18 5:47
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Giuseppe Pantaleo 2012/06/19 2:37
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Tom Mahy 2012/06/25 1:17
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Giuseppe Pantaleo 2012/06/26 0:55
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Harish Kumar 2012/07/31 0:33
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Harish Kumar 2012/07/31 0:47
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Giuseppe Pantaleo 2012/06/18 5:30
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe Joe D 2012/07/30 20:14
Tom Mahy
Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is referenc
2012/03/08 5:23
答え

Tom Mahy

ランク: Regular Member

投稿: 103

参加年月日: 2011/05/11

最近の投稿

Hi,

Im trying to make a simple service that can be accessed remotly.

So i create a portlet (with the liferay IDE)
Build a service.

 1
 2
 3<?xml version="1.0" encoding="UTF-8"?>
 4<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
 5<service-builder package-path="be.redtree">
 6    <author>author</author>
 7    <namespace>marketing</namespace>
 8
 9    <entity name="CampaignRef" local-service="false" remote-service="true">
10        <column name="uuid" type="String" primary="true" />
11        <column name="title" type="String" />
12        <column name="groupId" type="long" />
13    </entity>
14
15
16    <entity name="CampaignImage" local-service="false"
17        remote-service="true">
18        <column name="uuid" type="String" primary="true" />
19        <column name="campaignId" type="String" />
20        <column name="imageId" type="long" />
21        <column name="percent" type="long" />
22        <column name="counter" type="long" />
23    </entity>
24
25    <entity name="CampaignResult" local-service="false"
26        remote-service="true">
27        <column name="uuid" type="String" primary="true" />
28        <column name="campaignId" type="String" />
29        <column name="campaignImageId" type="String" />
30        <column name="clicks" type="long" />
31        <column name="groupId" type="long" />
32    </entity>
33
34</service-builder>


build it, add the FinderImpl classes. build it again. No errors.

and build the wsdd
i get the error :

 1
 2[Console output redirected to file:/home/tom/workspaces/workspace-yes-another-one/.metadata/.plugins/com.liferay.ide.eclipse.sdk/sdk.log]
 3Buildfile: /opt/liferay_6.1_sdk/portlets/marketing-service-portlet/build.xml
 4compile:
 5merge:
 6compile-java:
 7merge:
 8build-wsdd:
 9     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
10     [java] Mar 8, 2012 1:10:49 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
11     [java] INFO: Global lib directory /opt/liferay_6.1/tomcat-7.0.23/lib/ext/
12     [java] Mar 8, 2012 1:10:49 PM com.liferay.portal.kernel.log.Jdk14LogImpl info
13     [java] INFO: Portal lib directory /opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/
14     [java] 13:10:49,915 INFO  [EasyConf:122] Refreshed the configuration of all components
15     [java] 13:10:50,356 INFO  [ConfigurationLoader:56] Properties for jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
16     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
17     [java] Loading jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
18     [java] SLF4J: Class path contains multiple SLF4J bindings.
19     [java] SLF4J: Found binding in [jar:file:/opt/liferay_6.1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
20     [java] SLF4J: Found binding in [jar:file:/opt/liferay_6.1_sdk/portlets/marketing-service-portlet/docroot/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
21     [java] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
22     [java]   Java2WSDL be.redtree.service.http.CampaignRefServiceSoap
23     [java] 13:10:55,458 WARN  [Types:1704] The class be.redtree.model.CampaignRef does not contain a default constructor, which is a requirement for a bean class.  The class cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.
24     [java]   WSDL2Java /opt/liferay_6.1_sdk/portlets/marketing-service-portlet/20120308131054853/service.wsdl
25     [java]   Running Wsdl2javaAntTask with parameters:
26     [java]       verbose:false
27     [java]       debug:false
28     [java]       quiet:false
29     [java]       server-side:true
30     [java]       skeletonDeploy:false
31     [java]       helperGen:false
32     [java]       factory:null
33     [java]       nsIncludes:[]
34     [java]       nsExcludes:[]
35     [java]       factoryProps:[]
36     [java]       testCase:false
37     [java]       noImports:false
38     [java]       NStoPkg:{}
39     [java]       output:/opt/liferay_6.1_sdk/portlets/marketing-service-portlet/20120308131054853
40     [java]       protocolHandlerPkgs:
41     [java]       deployScope:
42     [java]       URL:/opt/liferay_6.1_sdk/portlets/marketing-service-portlet/20120308131054853/service.wsdl
43     [java]       all:false
44     [java]       typeMappingVersion:1.2
45     [java]       timeout:45000
46     [java]       failOnNetworkErrors:false
47     [java]       printStackTraceOnFailure:true
48     [java]       namespaceMappingFile:null
49     [java]       username:null
50     [java]       :passwordnull
51     [java]       :noWrappedfalse
52     [java]       :allowInvalidURLfalse
53     [java]       :implementationClassNamenull
54     [java]       :classpathnull
55     [java]       http.proxyHost=null
56     [java]       http.proxyPort=null
57     [java]       http.proxyUser=null
58     [java]       http.proxyPassword=null
59     [java]       socks.proxyHost=null
60     [java]       socks.proxyPort=null
61     [java] java.io.IOException: Type {http://model.redtree.be}CampaignRef is referenced but not defined.
62     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
63     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
64     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
65     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
66     [java]     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
67     [java]     at java.lang.Thread.run(Thread.java:679)
68     [java] Exception in thread "main" WSDL processing error for /opt/liferay_6.1_sdk/portlets/marketing-service-portlet/20120308131054853/service.wsdl :
69     [java]  Type {http://model.redtree.be}CampaignRef is referenced but not defined.
70     [java]     at org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask.execute(Wsdl2javaAntTask.java:304)
71     [java]     at com.liferay.util.ant.Java2WsddTask.generateWsdd(Java2WsddTask.java:108)
72     [java]     at com.liferay.portal.tools.WSDDBuilder._createServiceWSDD(WSDDBuilder.java:130)
73     [java]     at com.liferay.portal.tools.WSDDBuilder.build(WSDDBuilder.java:93)
74     [java]     at com.liferay.portal.tools.WSDDBuilder.main(WSDDBuilder.java:49)
75     [java] Caused by: java.io.IOException: Type {http://model.redtree.be}CampaignRef is referenced but not defined.
76     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
77     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
78     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
79     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
80     [java]     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
81     [java]     at java.lang.Thread.run(Thread.java:679)
82     [java] Java Result: 1
83BUILD SUCCESSFUL
84Total time: 8 seconds


Of course its not built properly.

any advice ?
I have not managed to build a service on 6.1 yet.

On 6.0.6 everything works fine.


Thank you.
Giuseppe Pantaleo
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 3:37
答え

Giuseppe Pantaleo

ランク: New Member

投稿: 15

参加年月日: 2012/06/18

最近の投稿

Hi, I'm experiencing the same problem.
Have you solved it? If so, would you pelase tell me how you solved the problem?

Thanks in advance
Tom Mahy
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 3:41
答え

Tom Mahy

ランク: Regular Member

投稿: 103

参加年月日: 2011/05/11

最近の投稿

Hi,

No we have not. We were loosing too much time trying to find an answer, so we wrote our own service with hibernate for the db connection.
If you manage to solve it i would be very interested in the answer.

Thank you.
Juan Gonzalez
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 4:26
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2380

参加年月日: 2008/10/28

最近の投稿

I see two things here:

  1. Not sure if "local-service=false" has sense if you enabled remote-service
  2. uuid may be a reserved field name. If you want uuid, you can enable it using "uuid=true"
Tom Mahy
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 5:16
答え

Tom Mahy

ランク: Regular Member

投稿: 103

参加年月日: 2011/05/11

最近の投稿

Hi,

Thanks for the speedy answer.

1. locale service
The only reason i disabled this is because its a web service and should not be used by local classes. This keeps the project a bit cleaner.
Anyway. This makes no difference. Enabled or Disabled i get the same error.

2. UUID reserved.
I changed this to another value and the problem persists.

Here is the project before the changes,
before the changes
after the edit

Thank you.
Juan Gonzalez
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 5:28
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2380

参加年月日: 2008/10/28

最近の投稿

Can you change groupId from long to Long and re build-services and wsdd?
Giuseppe Pantaleo
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 5:30
答え

Giuseppe Pantaleo

ランク: New Member

投稿: 15

参加年月日: 2012/06/18

最近の投稿

I also think that "local-service=false" has no sense, but this sholud not be the problem: I have "local-service=true" and I still have the problem.

Here is my service.xml (generated from xmlPortletFactory and hand-modified):
 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
 4<service-builder package-path="org.xmlportletfactory.portal.anagraficareligione">
 5    <author>Giuseppe Pantaleo</author>
 6    <namespace>anag</namespace>
 7    <entity name="anagraficaReligione" local-service="true" remote-service="true" json-enabled="true" human-name="Anagrafica religione">
 8        <!-- Primary key column -->
 9        <column name="idReligione" type="long" primary="true" />
10
11        <!-- Foreign key columns -->
12        <column name="companyId" type="long" />
13        <column name="groupId" type="long" />
14        <column name="userId" type="long" />
15
16        <!-- Other columns -->
17        <column name="label" type="String" />
18       
19        <order by="asc">
20            <order-column name="label"></order-column>
21        </order>
22
23        <!-- Finder Methods Standard -->
24        <finder name="GroupId" return-type="Collection">
25            <finder-column name="groupId" />
26        </finder>
27        <finder name="UserId" return-type="Collection">
28            <finder-column name="userId" />
29        </finder>
30        <finder name="UserIdGroupId" return-type="Collection">
31            <finder-column name="userId" />
32            <finder-column name="groupId" />
33        </finder>
34        <finder name="IdReligione" return-type="anagraficaReligione">
35            <finder-column name="idReligione" />
36        </finder>
37        <finder name="Label" return-type="anagraficaReligione">
38            <finder-column name="label" />
39        </finder>
40    </entity>
41</service-builder>


I want a Web Service acessible remotely via soap and via json.
I have implemented the remote method in the class that implement remote service; than I've launched the build-service ant command and the build-wsdd ant command and I had the error listed below:
 1
 2build-wsdd:
 3     [java] Loading jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
 4     [java] 18-giu-2012 10.16.23 com.liferay.portal.kernel.log.Jdk14LogImpl info
 5     [java] INFO: Global lib directory /D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/lib/ext/
 6     [java] 18-giu-2012 10.16.23 com.liferay.portal.kernel.log.Jdk14LogImpl info
 7     [java] INFO: Portal lib directory /D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/
 8     [java] 10:16:23,124 INFO  [EasyConf:122] Refreshed the configuration of all components
 9     [java] 10:16:23,409 INFO  [ConfigurationLoader:56] Properties for jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
10     [java] Loading jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
11     [java] Loading file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/classes/portal-ext.properties
12     [java] Loading jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
13     [java] SLF4J: Class path contains multiple SLF4J bindings.
14     [java] SLF4J: Found binding in [jar:file:/D:/liferay-portal-6.1.0-ce-ga1/tomcat-7.0.23/webapps/ROOT/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
15     [java] SLF4J: Found binding in [jar:file:/D:/liferay-plugins-sdk-6.1.0-ce-ga1/portlets/anagraficaReligione-portlet/docroot/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
16     [java] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
17     [java]   Java2WSDL org.xmlportletfactory.portal.anagraficareligione.service.http.anagraficaReligioneServiceSoap
18     [java] 10:16:26,563 WARN  [Types:1704] The class org.xmlportletfactory.portal.anagraficareligione.model.anagraficaReligione does not contain a default constructor, which is a requirement for a bean class.  The class cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.
19     [java]   WSDL2Java D:\liferay-plugins-sdk-6.1.0-ce-ga1\portlets\anagraficaReligione-portlet\20120618101626071\service.wsdl
20     [java]   Running Wsdl2javaAntTask with parameters:
21     [java]       verbose:false
22     [java]       debug:false
23     [java]       quiet:false
24     [java]       server-side:true
25     [java]       skeletonDeploy:false
26     [java]       helperGen:false
27     [java]       factory:null
28     [java]       nsIncludes:[]
29     [java]       nsExcludes:[]
30     [java]       factoryProps:[]
31     [java]       testCase:false
32     [java]       noImports:false
33     [java]       NStoPkg:{}
34     [java]       output:D:\liferay-plugins-sdk-6.1.0-ce-ga1\portlets\anagraficaReligione-portlet\20120618101626071
35     [java]       protocolHandlerPkgs:
36     [java]       deployScope:
37     [java]       URL:D:\liferay-plugins-sdk-6.1.0-ce-ga1\portlets\anagraficaReligione-portlet\20120618101626071\service.wsdl
38     [java]       all:false
39     [java]       typeMappingVersion:1.2
40     [java]       timeout:45000
41     [java]       failOnNetworkErrors:false
42     [java]       printStackTraceOnFailure:true
43     [java]       namespaceMappingFile:null
44     [java]       username:null
45     [java]       :passwordnull
46     [java]       :noWrappedfalse
47     [java]       :allowInvalidURLfalse
48     [java]       :implementationClassNamenull
49     [java]       :classpathnull
50     [java]       http.proxyHost=null
51     [java]       http.proxyPort=null
52     [java]       http.proxyUser=null
53     [java]       http.proxyPassword=null
54     [java]       socks.proxyHost=null
55     [java]       socks.proxyPort=null
56     [java] java.io.IOException: Type {http://model.anagraficareligione.portal.xmlportletfactory.org}anagraficaReligione is referenced but not defined.
57     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
58     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
59     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
60     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
61     [java]     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
62     [java]     at java.lang.Thread.run(Thread.java:619)
63     [java] Exception in thread "main" WSDL processing error for D:\liferay-plugins-sdk-6.1.0-ce-ga1\portlets\anagraficaReligione-portlet\20120618101626071\service.wsdl :
64     [java]  Type {http://model.anagraficareligione.portal.xmlportletfactory.org}anagraficaReligione is referenced but not defined.
65     [java]     at org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask.execute(Wsdl2javaAntTask.java:304)
66     [java]     at com.liferay.util.ant.Java2WsddTask.generateWsdd(Java2WsddTask.java:108)
67     [java]     at com.liferay.portal.tools.WSDDBuilder._createServiceWSDD(WSDDBuilder.java:130)
68     [java]     at com.liferay.portal.tools.WSDDBuilder.build(WSDDBuilder.java:93)
69     [java]     at com.liferay.portal.tools.WSDDBuilder.main(WSDDBuilder.java:49)
70     [java] Caused by: java.io.IOException: Type {http://model.anagraficareligione.portal.xmlportletfactory.org}anagraficaReligione is referenced but not defined.
71     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
72     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
73     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
74     [java]     at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
75     [java]     at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
76     [java]     at java.lang.Thread.run(Thread.java:619)
77     [java] Java Result: 1
78BUILD SUCCESSFUL
79Total time: 6 seconds


Here I've noticed the warning
" 10:16:26,563 WARN [Types:1704] The class org.xmlportletfactory.portal.anagraficareligione.model.anagraficaReligione does not contain a default constructor, which is a requirement for a bean class. The class cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file."
The class org.xmlportletfactory.portal.anagraficareligione.model.anagraficaReligione is the class that is referenced but not defined.

Has anyone any suggestions to solve the problem?
Tom Mahy
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 5:31
答え

Tom Mahy

ランク: Regular Member

投稿: 103

参加年月日: 2011/05/11

最近の投稿

same problem im afraid.
Juan Gonzalez
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 5:35
答え

Juan Gonzalez

LIFERAY STAFF

ランク: Liferay Legend

投稿: 2380

参加年月日: 2008/10/28

最近の投稿

Ok will test in few hours. Perhaps is a problem with 6.1 SDK and could be solved in 6.1.1 sdk.

Can you try with simplest single entity so we can check what is the exact field/entity that causes the problem?
Tom Mahy
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/18 5:47
答え

Tom Mahy

ランク: Regular Member

投稿: 103

参加年月日: 2011/05/11

最近の投稿

OK. i tried testing with the most basic service.xml

1<entity name="CampaignRef" local-service="true" remote-service="true">
2        <column name="anotherone" type="Long" primary="true" />
3    </entity>


1<entity name="CampaignRef" local-service="true" remote-service="true">
2        <column name="anotherone" type="String" primary="true" />
3    </entity>


The service impl class will return List<CampaignRef>.
The error will now be shown.

Return the single object : CampaignRef and the WSDL will compile.

Thank you.
Giuseppe Pantaleo
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/19 2:37
答え

Giuseppe Pantaleo

ランク: New Member

投稿: 15

参加年月日: 2012/06/18

最近の投稿

Hi Tom, have you solved the problem?
I was following this guide: http://www.liferay.com/community/wiki/-/wiki/Main/Creating+Liferay+6+plugin+web+service, but I still have the problem.
As you can see I've just left a comment to the author of the guide, to try to solve the problem.
Tom Mahy
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/25 1:17
答え

Tom Mahy

ランク: Regular Member

投稿: 103

参加年月日: 2011/05/11

最近の投稿

Hi,

No i have not solved the problem. I just don't have the time right now as im trying to fix another bug with liferay and terracotta.
If i manage to fix this i will let you know.
Giuseppe Pantaleo
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/06/26 0:55
答え

Giuseppe Pantaleo

ランク: New Member

投稿: 15

参加年月日: 2012/06/18

最近の投稿

I've probably solved the problem: I'm using (referring to your example) 'be.redtree.model.CampaignRefSoap' instead of 'be.redtree.model.CampaignRef' as transport object in remote service implementation class.

Hope this will help you
Joe D
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/07/30 20:14
答え

Joe D

ランク: New Member

投稿: 12

参加年月日: 2012/04/19

最近の投稿

Hi,

I got the same errors when I do build-wsdd.

I figured it out that the error only appear when I got find methods that return-type="Collection" and put these methods in *ServiceImpl.java. It would works fine if I removed those methods that return as A List of Objects.

I'm not sure if I missed and configurations or it's liferay's bug. If anyone have any ideas, please let us know. Thanks
Harish Kumar
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/07/31 0:33
答え

Harish Kumar

ランク: Expert

投稿: 444

参加年月日: 2010/07/31

最近の投稿

Giuseppe Pantaleo:
Hi Tom, have you solved the problem?
I was following this guide: http://www.liferay.com/community/wiki/-/wiki/Main/Creating+Liferay+6+plugin+web+service, but I still have the problem.
As you can see I've just left a comment to the author of the guide, to try to solve the problem.



Hi Giuseppe,

I've tried with the same service.xml as provided by you and its working just fine. I've tested this with Liferay 6.1EE.
Here is the service.xml file -

 1
 2<?xml version="1.0" encoding="UTF-8"?>
 3<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">
 4<service-builder package-path="com.harish">
 5    <author>harish.kumar</author>
 6    <namespace>test_service</namespace>
 7
 8    <entity name="anagraficaReligione" local-service="true" remote-service="true" json-enabled="true" human-name="Anagrafica religione">
 9        <!-- Primary key column -->
10        <column name="idReligione" type="long" primary="true" />
11
12        <!-- Foreign key columns -->
13        <column name="companyId" type="long" />
14        <column name="groupId" type="long" />
15        <column name="userId" type="long" />
16
17        <!-- Other columns -->
18        <column name="label" type="String" />
19       
20        <order by="asc">
21            <order-column name="label"></order-column>
22        </order>
23
24        <!-- Finder Methods Standard -->
25        <finder name="GroupId" return-type="Collection">
26            <finder-column name="groupId" />
27        </finder>
28        <finder name="UserId" return-type="Collection">
29            <finder-column name="userId" />
30        </finder>
31        <finder name="UserIdGroupId" return-type="Collection">
32            <finder-column name="userId" />
33            <finder-column name="groupId" />
34        </finder>
35        <finder name="IdReligione" return-type="anagraficaReligione">
36            <finder-column name="idReligione" />
37        </finder>
38        <finder name="Label" return-type="anagraficaReligione">
39            <finder-column name="label" />
40        </finder>
41    </entity>
42</service-builder>


and here is the console log for your reference (build-wsdd) -

 1
 2Buildfile: D:\Liferay Work\liferay-plugins-sdk-6.1.10-ee-ga1\portlets\testservice-portlet\build.xml
 3compile:
 4merge:
 5     [copy] Copying 5 files to D:\Liferay Work\liferay-plugins-sdk-6.1.10-ee-ga1\portlets\testservice-portlet\docroot\WEB-INF\lib
 6compile-java:
 7merge:
 8build-wsdd:
 9     [java] Loading jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
10     [java] Jul 31, 2012 7:28:02 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
11     [java] INFO: Global lib directory /D:/Liferay Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/lib/ext/
12     [java] Jul 31, 2012 7:28:02 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
13     [java] INFO: Portal lib directory /D:/Liferay Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/
14     [java] 07:28:02,499 INFO  [EasyConf:122] Refreshed the configuration of all components
15     [java] 07:28:02,821 INFO  [ConfigurationLoader:56] Properties for jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
16     [java] Loading jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
17     [java] Loading file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/classes/portal-ext.properties
18     [java] Loading jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
19     [java] SLF4J: Class path contains multiple SLF4J bindings.
20     [java] SLF4J: Found binding in [jar:file:/D:/Liferay%20Work/liferay-portal-6.1.10-ee-ga1/tomcat-7.0.25/webapps/ROOT/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
21     [java] SLF4J: Found binding in [jar:file:/D:/Liferay%20Work/liferay-plugins-sdk-6.1.10-ee-ga1/portlets/testservice-portlet/docroot/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
22     [java] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
23     [java]   Java2WSDL com.harish.service.http.anagraficaReligioneServiceSoap
24     [java]   WSDL2Java D:\Liferay Work\liferay-plugins-sdk-6.1.10-ee-ga1\portlets\testservice-portlet\20120731072805710\service.wsdl
25     [java]   Deleting directory D:\Liferay Work\liferay-plugins-sdk-6.1.10-ee-ga1\portlets\testservice-portlet\20120731072805710
26BUILD SUCCESSFUL
27Total time: 7 seconds


Regards,
Harish Kumar
RE: Service Builder 6.1, Type {http://model.redtree.be}CampaignRef is refe
2012/07/31 0:47
答え

Harish Kumar

ランク: Expert

投稿: 444

参加年月日: 2010/07/31

最近の投稿

Giuseppe Pantaleo:
Hi Tom, have you solved the problem?
I was following this guide: http://www.liferay.com/community/wiki/-/wiki/Main/Creating+Liferay+6+plugin+web+service, but I still have the problem.
As you can see I've just left a comment to the author of the guide, to try to solve the problem.


Hi Giuseppe,

If you are using Liferay 6.1 then you should skip step 21 mentioned in the tutorial as this has been fixed in 6.1


Regards,