jQuery in Action, 3rd edition
The moose likes Web Services and the fly likes soap & soapenv Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "soap & soapenv" Watch "soap & soapenv" New topic

soap & soapenv

Dhana Wongwerawattanakoon

Joined: Jul 22, 2005
Posts: 2
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
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)
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
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?
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
You problem may be relative to the xml namespace.

if you use "soapenv"
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
<!-- extensions of Header blocks go here -->
<!-- message payload goes here -->
I agree. Here's the link: http://aspose.com/file-tools
subject: soap & soapenv
It's not a secret anymore!