mercredi 27 mai 2015

How to construct soap message with xsd element name rather element type

<xsd:element name="echodemo" type="EchodemoType">
    <xsd:annotation>
        <xsd:documentation>
            Root element
        </xsd:documentation>
    </xsd:annotation>

this is my XSD.

but when i had generate the java object from xsd by chooing generate java in RSA ., it generating EchodemoType.java .. so am creating instance LIKE below before passing the request to my service

EchodemoType request = new EchodemoType();
request.setEchoRequest("This is Echo String !!!");
request .setVersion(new BigDecimal("1.0"));

while invoke my webservice am seeing the the soap message like below.,

<EchodemoType version="1.0">
<ns2:echoRequest>This is Echo String !!!</ns2:echoRequest>
</EchodemoType>

basically i want the soap message start tag with element name "echodemo" rather with type "EchodemoType".also i want it with the name space

<echodemo  version="1.0" xmlns="http://ift.tt/1Fbws3C">
 <ns2:echoRequest>This is Echo String !!!</ns2:echoRequest>here
</echodemo>

please tell me the way to generate the class to have that soap message or where i need to correct this?

Aucun commentaire:

Enregistrer un commentaire