This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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" Server returned HTTP response code: 500 for URL:
at Source)
at Source)
at SOAPClient4XG.main(
Exception in thread "main" java.lang.Exception: missing end tag near line 1, column 0
at qdxml.QDParser.exc(
at qdxml.QDParser.parse(
at Reporter.reportOnFile(
at Reporter.main(
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
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=""
<!-- extensions of Header blocks go here -->
<!-- message payload goes here -->
I agree. Here's the link:
subject: soap & soapenv
jQuery in Action, 3rd edition