Hi

I'm using Axis to read a WSDL Uri, and I'm trying to dynamically build a
SOAP Web Service Client based on that WSDL Uri.

The problem I find is that if one of the IN parameters is of type element,
there is no easy way of getting that element. The javax.wsdl.Types interface
returns a list of ExtensibilityElements, but these are of class
javax.wsdl.extensions.UnknownExtensibilityElement. I would expect to have a
Schema interface, so I could access the Schema elements.

Is there another easier way of accessing the schema elements??

My code so far:

import org.apache.axis.wsdl.gen.*;
import org.apache.axis.wsdl.*;
import org.apache.axis.wsdl.symbolTable.*;
import javax.xml.namespace.*;
import org.apache.axis.encoding.XMLType;
import javax.wsdl.*;
import javax.wsdl.extensions.*;
import javax.wsdl.extensions.soap.*;

Parser p = new Parser();
p.run(wsdluri);
Definition d = p.getSymbolTable().getDefinition();
Types types = d.getTypes();
if (types != null) {
                        
        List typesElementsList = types.getExtensibilityElements();
        if (typesElementsList != null) {
                for (int j=0; j < typesElementsList.size() ;j++ ) {
                        ExtensibilityElement typesElmnt =
(ExtensibilityElement)                          typesElementsList.get(j);
                        System.out.println(typesElmnt.getClass().getName());
                        System.out.println("Type: " +
typesElmnt.getElementType().toString());
                }
        }
}

Any ideas/suggestions?

Cheers,
Chico.

-- 
The content of this e-mail is confidential, may contain privileged material
and is intended solely for the recipient(s) named above. If you receive this
in error, please notify Software AG immediately and delete this e-mail.

Software AG (UK) Limited
Registered in England & Wales 1310740
Registered Office: Hudson House, Hudson Way,
Pride Park, Derby DE24 8HS

Reply via email to