DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20680>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20680

style="document" - WSDL2Java fails reading WSDL

           Summary: style="document" - WSDL2Java fails reading WSDL
           Product: Axis
           Version: 1.1rc2
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WSDL processing
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Simple java class:

package com.bt.wsai;

public class Simple
{
    private static final String EOL = System.getProperty("line.separator");

    public Simple() {}
    
    public String reverse(String in) throws java.rmi.RemoteException
    {
        return new StringBuffer(in).reverse().toString();
    }
    
    public static void main(String[] args)
    {
        try
        {
            Simple s = new Simple();
            if (args.length == 1)
                System.out.println(s.reverse(args[0]));
            else
                throw new Exception("invalid usage - java com.bt.wsai.Simple 
string");
        }
        catch (Exception e)
        {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

deployed as a WS using this wsdd:

<deployment xmlns="http://xml.apache.org/axis/wsdd/";
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

 <service name="SimpleRPC" provider="java:RPC" style="document">
  <parameter name="className" value="com.bt.wsai.Simple"/>
  <parameter name="allowedMethods" value="reverse"/>
 </service>
</deployment>

When trying to create client stubs using WSDL2Java I get this exception:

java.io.IOException: Element {http://schemas.xmlsoap.org/wsdl/}reverseReturn is 
referenced but not defined.
    at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined
(SymbolTable.java:527)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate
(SymbolTable.java:408)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate
(SymbolTable.java:393)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
    at java.lang.Thread.run(Thread.java:484)

Reply via email to