You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Bharadwaj, Nandita (GE Healthcare)" <Na...@ge.com> on 2006/07/12 16:18:11 UTC

How to define an interface in wsdl?

How to define an interface in wsdl?
 
Java to wsdl:
How to handle these warnings..when I tried to convert Java to wsdl?
 
Jul 12, 2006 6:18:27 PM org.apache.axis.wsdl.fromJava.Types
isBeanCompatible
WARNING: The class <interface class > 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 def
ine this class in the wsdl file.
[BUT the interface will not contain any default constructors.. so what
to do about this]

It says 'anyType' will be defined for the interface class. But, I cannot
find a anyType defined
in the wsdl file I got after doing a Java2wsdl.
 
WSDL to Java:
I wanted to use the wsdl I got to do a wsdl2java. When I tried with the
file I got from doing Java2wsdl.
As it can not find the definition for that particular parmeter, 
it says..
java.io.IOException: Type
{http://security.framework.rumba.med.ge.com}IUser is referenced but not
defined.
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTab
le.java:665)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:5
18)
        at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:4
95)
        at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
        at java.lang.Thread.run(Unknown Source)
 
Please help me.
 
Thanks,
Nandita
 
 
 
 

Re: How to define an interface in wsdl?

Posted by Anne Thomas Manes <at...@gmail.com>.
You should define beans for each of the value types that you intend to
exchange via your interface. These beans must contain a default
constructor.

If you elect not to use beans, then you should adopt the WSDL First
design approach. First define your message formats using XML Schema
and import the schema into your WSDL (or just inlcude the schema
inline in the types section) and generate stubs an skeletons from the
WSDL. You will then need to write custom de/serializers to map the XML
Schema structures to your value types.

Anne

On 7/12/06, Bharadwaj, Nandita (GE Healthcare) <Na...@ge.com> wrote:
>
>
> How to define an interface in wsdl?
>
> Java to wsdl:
> How to handle these warnings..when I tried to convert Java to wsdl?
>
> Jul 12, 2006 6:18:27 PM org.apache.axis.wsdl.fromJava.Types
> isBeanCompatible
> WARNING: The class <interface class > 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
> def
> ine this class in the wsdl file.
> [BUT the interface will not contain any default constructors.. so what to do
> about this]
>
> It says 'anyType' will be defined for the interface class. But, I cannot
> find a anyType defined
> in the wsdl file I got after doing a Java2wsdl.
>
> WSDL to Java:
> I wanted to use the wsdl I got to do a wsdl2java. When I tried with the file
> I got from doing Java2wsdl.
> As it can not find the definition for that particular parmeter,
> it says..
> java.io.IOException: Type
> {http://security.framework.rumba.med.ge.com}IUser is
> referenced but not defined.
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
>         at
> org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
>         at
> org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
>         at java.lang.Thread.run(Unknown Source)
>
> Please help me.
>
> Thanks,
> Nandita
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org