You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Josir Gomes <jo...@jsk.com.br> on 2007/07/12 16:46:34 UTC

Code generation on Eclipse 3.2 STP 0.6

Hi folks,

I'm a experienced Delphi user and the IndySOAP library contributor (on 
sourceforge).
Now I am trying to change to Java using Eclipse and STP.

I'm using CTX 2.0 thru Eclipse STP 0.6 plugin.

I built a very simple test WSDL and then I generated the java source 
code using the Java-WS tool / Generating Code.

The code were generated without erros but when I try to compile it, it 
has compiler errors in 2 classes:

Implementation Class:
public class TesteImpl implements Teste {
Error: The type Teste cannot be a superinterface of TesteImpl; a 
superinterface must be an interface

It's probably a small glitch because all code were generated. How can I 
fix it?

The model and the WSDL is located on:   
http://www.jsk.com.br/ws/CXFTest1.html

Thanks in advance,

Josir Gomes
http://www.jsk.com.br
Rio de Janeiro - Brasil


Re: Code generation on Eclipse 3.2 STP 0.6

Posted by James Mao <ja...@iona.com>.
Hi,

I see the problem, the problem is caused by that you have a service 
named "Teste" and also you have a portType named "Teste"
According to the jaxws spec, we have a way to solve the naming collision,
in command line tools we support the naming collision,  you will get the 
following artifacts when using command line wsdl2java
Teste.java  (SEI)
Teste_Service.java (Client stub)
Teste_TesteSOAP_Client.java (Client main line code)
Teste_TesteSOAP_Server.java (Service main line code)
TesteImpl.java (Impl)

but seems that the STP does not use the command line generators to 
generate the artifacts, and they generate the artifacts by them self
So your Teste.java is actually your Client stub (Teste_Service.java), 
the SEI class has been overwrite by this class, that cause the 
compilation error.

I'll talk this to STP team, hope they can fix this soon.

So stay tuned

BTW, the work around solution is rename your service to "TesteService"

Enjoy!
James


> Hi folks,
>
> I'm a experienced Delphi user and the IndySOAP library contributor (on 
> sourceforge).
> Now I am trying to change to Java using Eclipse and STP.
>
> I'm using CTX 2.0 thru Eclipse STP 0.6 plugin.
>
> I built a very simple test WSDL and then I generated the java source 
> code using the Java-WS tool / Generating Code.
>
> The code were generated without erros but when I try to compile it, it 
> has compiler errors in 2 classes:
>
> Implementation Class:
> public class TesteImpl implements Teste {
> Error: The type Teste cannot be a superinterface of TesteImpl; a 
> superinterface must be an interface
>
> It's probably a small glitch because all code were generated. How can 
> I fix it?
>
> The model and the WSDL is located on:   
> http://www.jsk.com.br/ws/CXFTest1.html
>
> Thanks in advance,
>
> Josir Gomes
> http://www.jsk.com.br
> Rio de Janeiro - Brasil
>

Re: Code generation on Eclipse 3.2 STP 0.6

Posted by Willem Jiang <ni...@iona.com>.
Maybe this two links will help you.
They tell you a traditional way that how to use CXF to build a wsdl 
first application.

http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html
http://cwiki.apache.org/CXF20DOC/developing-a-service.html

Cheers,

Willem.

Josir Gomes wrote:
> Thanks for replying Dan.
>
> I didn't want to bother the developers before I am sure that this is 
> really a bug.
> I've already looked into the jira database and didn't find any similar 
> issue.
>
> Could you list what are the steps did you take to generate the source 
> code from the WSDL?
>
> I put the generated source code on the same link
> http://issues.apache.org/jira/browse/CXF
>
> Josir Gomes
>> Hmmm I tried out your wsdl with our tooling and didn't have any 
>> issues. I
>> don't have STP installed right now, so I could not be triggering the
>> problem. Can you send along the classes that were generated? I think the
>> mailing list strips attachments, so you may have to open a jira issue:
>>
>> http://issues.apache.org/jira/browse/CXF
>>
>> Thanks,
>> - Dan
>>
>> On 7/12/07, Josir Gomes <jo...@jsk.com.br> wrote:
>>>
>>> Hi folks,
>>>
>>> I'm a experienced Delphi user and the IndySOAP library contributor (on
>>> sourceforge).
>>> Now I am trying to change to Java using Eclipse and STP.
>>>
>>> I'm using CTX 2.0 thru Eclipse STP 0.6 plugin.
>>>
>>> I built a very simple test WSDL and then I generated the java source
>>> code using the Java-WS tool / Generating Code.
>>>
>>> The code were generated without erros but when I try to compile it, it
>>> has compiler errors in 2 classes:
>>>
>>> Implementation Class:
>>> public class TesteImpl implements Teste {
>>> Error: The type Teste cannot be a superinterface of TesteImpl; a
>>> superinterface must be an interface
>>>
>>> It's probably a small glitch because all code were generated. How can I
>>> fix it?
>>>
>>> The model and the WSDL is located on:
>>> http://www.jsk.com.br/ws/CXFTest1.html
>>>
>>> Thanks in advance,
>>>
>>> Josir Gomes
>>> http://www.jsk.com.br
>>> Rio de Janeiro - Brasil
>>>
>>>
>>
>>
>

Re: Code generation on Eclipse 3.2 STP 0.6

Posted by Josir Gomes <jo...@jsk.com.br>.
Thanks for replying Dan.

I didn't want to bother the developers before I am sure that this is 
really a bug.
I've already looked into the jira database and didn't find any similar 
issue.

Could you list what are the steps did you take to generate the source 
code from the WSDL?

I put the generated source code on the same link
http://issues.apache.org/jira/browse/CXF

Josir Gomes
> Hmmm I tried out your wsdl with our tooling and didn't have any issues. I
> don't have STP installed right now, so I could not be triggering the
> problem. Can you send along the classes that were generated? I think the
> mailing list strips attachments, so you may have to open a jira issue:
>
> http://issues.apache.org/jira/browse/CXF
>
> Thanks,
> - Dan
>
> On 7/12/07, Josir Gomes <jo...@jsk.com.br> wrote:
>>
>> Hi folks,
>>
>> I'm a experienced Delphi user and the IndySOAP library contributor (on
>> sourceforge).
>> Now I am trying to change to Java using Eclipse and STP.
>>
>> I'm using CTX 2.0 thru Eclipse STP 0.6 plugin.
>>
>> I built a very simple test WSDL and then I generated the java source
>> code using the Java-WS tool / Generating Code.
>>
>> The code were generated without erros but when I try to compile it, it
>> has compiler errors in 2 classes:
>>
>> Implementation Class:
>> public class TesteImpl implements Teste {
>> Error: The type Teste cannot be a superinterface of TesteImpl; a
>> superinterface must be an interface
>>
>> It's probably a small glitch because all code were generated. How can I
>> fix it?
>>
>> The model and the WSDL is located on:
>> http://www.jsk.com.br/ws/CXFTest1.html
>>
>> Thanks in advance,
>>
>> Josir Gomes
>> http://www.jsk.com.br
>> Rio de Janeiro - Brasil
>>
>>
>
>


Re: Code generation on Eclipse 3.2 STP 0.6

Posted by Dan Diephouse <da...@envoisolutions.com>.
Hmmm I tried out your wsdl with our tooling and didn't have any issues. I
don't have STP installed right now, so I could not be triggering the
problem. Can you send along the classes that were generated? I think the
mailing list strips attachments, so you may have to open a jira issue:

http://issues.apache.org/jira/browse/CXF

Thanks,
- Dan

On 7/12/07, Josir Gomes <jo...@jsk.com.br> wrote:
>
> Hi folks,
>
> I'm a experienced Delphi user and the IndySOAP library contributor (on
> sourceforge).
> Now I am trying to change to Java using Eclipse and STP.
>
> I'm using CTX 2.0 thru Eclipse STP 0.6 plugin.
>
> I built a very simple test WSDL and then I generated the java source
> code using the Java-WS tool / Generating Code.
>
> The code were generated without erros but when I try to compile it, it
> has compiler errors in 2 classes:
>
> Implementation Class:
> public class TesteImpl implements Teste {
> Error: The type Teste cannot be a superinterface of TesteImpl; a
> superinterface must be an interface
>
> It's probably a small glitch because all code were generated. How can I
> fix it?
>
> The model and the WSDL is located on:
> http://www.jsk.com.br/ws/CXFTest1.html
>
> Thanks in advance,
>
> Josir Gomes
> http://www.jsk.com.br
> Rio de Janeiro - Brasil
>
>


-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog