• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

soap & soapenv

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/"
...>
<soapenv:Header>
<!-- extensions of Header blocks go here -->
</soapenv:Header>
<soapenv:Body>
<!-- message payload goes here -->
</soapenv:Body>
</soapenv:Envelope>
[/code]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic