Could anyone tell me about the diff between these 2 tags. I just start working on sending SOAP to web services. I have the SOAP client in place. When I create XML file to send a request using <soap>, program work good. But when I use <soapenv>, it caused error as follow.
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 500 for URL: https://ws.melissadata.com/dqws/add ress.asmx at com.ibm.net.ssl.www.protocol.http.ch.getInputStream(Unknown Source) at com.ibm.net.ssl.www.protocol.https.t.getInputStream(Unknown Source) at SOAPClient4XG.main(SOAPClient4XG.java:105) Exception in thread "main" java.lang.Exception: missing end tag near line 1, column 0 at qdxml.QDParser.exc(QDParser.java:314) at qdxml.QDParser.parse(QDParser.java:309) at Reporter.reportOnFile(Reporter.java:57) at Reporter.main(Reporter.java:47)
Where do you see or use these tags? The error is complaining about invalid XML, not a particular tag. Could it be that you use <soap> at the beginning and <soapenv> (or vice-versa) at the end of your XML?
As a side note, if the XML works with <soap>, why would you expect to also work with <soapenv>? Does the documentation mention that it should?
if you use "soapenv" <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ...> <soapenv:Header> <!-- extensions of Header blocks go here --> </soapenv:Header> <soapenv:Body> <!-- message payload goes here --> </soapenv:Body> </soapenv:Envelope> [/code]