I'm creating a test application for interfacing with the generated javascript
from wsdl2js. In my XSD, I have a type similar to the following:
<xs:complexType name="RequestChatRequestType">
    <xs:complexContent>
            <xs:extension base="rn:ChatAPIRequestType">
                <xs:sequence>
                    <xs:element name="customFieldsContainer"
type="rn:ChatCustomFieldsContainerType"/>
...
                </xs:sequence>
            </xs:extension>
    </xs:complexContent>
</xs:complexType>

The problem I've encountered is that I'm unsure of how to determine the type
for 'customFieldsContainer' in javascript to link it back to its correct
object. Is there a way to do this, or is it assumed that the implementor of
the generated javascript must know the type contained in the top-level
object? The type IS generated in the comments for the setter, but I can't
find a way to fetch this programmatically. I'm basically looking for: 

          requestObject = new RN_RequestChatRequestType();
          requestObjectCustomFieldContainer = eval('new ' +
requestObject.getCustomFieldsContainerType() + ''()');

Is this currently possible? If not, could this be considered for an
enhancement?

Thanks!

(The intention of this kind of functionality is to create a dynamic test
application that parses the generated javascript for available methods and
creates a UI for calling the setters on an object before submitting the
request to the web service... the end result is a test web page that doesn't
require updating to interface with the web service as the generated
javascript from wsdl is changed)
-- 
View this message in context: 
http://old.nabble.com/wsdl2js---determining-element-types-question-tp27018986p27018986.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to