Hi,

I think I ran into a Bug with wsdl2java or the Corba backend, I don't
know which one.

I took the sample from http://wso2.org/library/2807

and added to the IDL these structs and method:


        struct MyDate {
                        string<10> value;
        };

          struct ListContainer {
        sequence<MyDate,10> datum;
     };

    ListContainer getList(
            in string<20> servicename
        );

and ran the service and generated a Client
wsdl2java.bat -or -p test -uri
http://localhost:8080/axis2/services/mycorbaserver?wsdl


The XML that comes back over the wire looks good (this is what
TCPTunnelGui displays):

HTTP/1.1 200 OK
Date: Thu, 12 Jun 2008 15:09:29 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8; action="urn:getListResponse"

165
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";><soapenv:Body><ns:getListResponse
xmlns:ns="http://corba2ws/xsd";><ns:return><ns:datum><ns:value>11.02.2008</ns:value></ns:datum></ns:return><ns:item><ns:value>12.02.2008</ns:value></ns:item></ns:getListResponse></soapenv:Body></soapenv:Envelope>
0

but the client throws

log4j:WARN No appenders could be found for logger
(org.apache.axis2.description.AxisService).
log4j:WARN Please initialize the log4j system properly.
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
Unexpected subelement item
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at test.MycorbaserverStub.fromOM(MycorbaserverStub.java:14019)
        at test.MycorbaserverStub.getList(MycorbaserverStub.java:1302)
        at test.Client.main(Client.java:51)
Caused by: java.lang.Exception:
org.apache.axis2.databinding.ADBException: Unexpected subelement item
        at 
test.MycorbaserverStub$GetListResponse$Factory.parse(MycorbaserverStub.java:10429)
        at test.MycorbaserverStub.fromOM(MycorbaserverStub.java:14013)
        ... 2 more
Caused by: org.apache.axis2.databinding.ADBException: Unexpected subelement item
        at 
test.MycorbaserverStub$GetListResponse$Factory.parse(MycorbaserverStub.java:10423)
        ... 3 more
Exception in thread "main"

The Java Client I used was


        MycorbaserverStub.GetList getlist = new MycorbaserverStub.GetList();
        getlist.setServicename("myservice");
        MycorbaserverStub.GetListResponse resp = stub.getList(getlist);
        MycorbaserverStub.ListContainer lc = resp.get_return();

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to