soap - How to add response code to response XML in Java web service using Eclipse IDE? -


i have made web service using eclipse ide. request xml being generated when use soapui test it.

 <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:fil="http://files/">        <soapenv:header/>        <soapenv:body>           <fil:servicecall2>              <!--optional:-->              <arg0>71896</arg0>              <!--optional:-->              <arg1>test10</arg1>              <!--optional:-->              <arg2>pdf</arg2>           </fil:servicecall2>        </soapenv:body>     </soapenv:envelope> 

this response xml on accessing service parameters

<s:envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">    <s:body>       <ns2:servicecall2response xmlns:ns2="http://files/"/>    </s:body> </s:envelope> 

i want java code can add response code tags in response xml.

you have this.

    soapmessage soapresponseobj2 = soapconnection2.call(createsoaprequest(dockindex), url2);     qname name = new qname("responsecode");     soapelement symbol = soapresponseobj2.getsoapbody().addchildelement(name);     symbol.addtextnode("0"); 

refer : https://docs.oracle.com/cd/e19879-01/819-3669/bnbhw/index.html


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -