Adding one part into another part in WSDL4J

213 Views Asked by At

I am generating WSDL dynamically using WSDL4J and I am able to create a WSDL file, but I want a nested structure (I mean, I want to declare a complex element and add it into the message).

So I want to add the TestService element into the wsdl:message TestServiceRequest dynamically using Java code and WSDL4J...

<element name="TestService">
    <complexType>
        <sequence>
            <element name="servicetag" type="xsd:string"/>
            <element name="header" type="xsd:string"/>
            <element name="requestparam" type="xsd:string"/>
            <element name="body" type="xsd:string"/>
        </sequence>
    </complexType>
</element>
<wsdl:message name="TestServiceRequest">
    <wsdl:part name="parameters" element="tns:TestService">
    </wsdl:part>
</wsdl:message>

How can I achieve that?

0

There are 0 best solutions below