dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: SOAP Request

  1. #1
    Join Date
    Jul 2017
    Posts
    1

    SOAP Request

    Hi

    I am trying to send an soap request to a server.

    This is my request:

    Code:
    <soapenv:Envelope
       xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:v5="https://webstamp.post.ch/wsws/soap/v5">
       <soapenv:Header/>
       <soapenv:Body>
          <v5:get_categories>
             <args>
                <identification>
                   <application>sdf8451w8d65d1ad6w5</application>
                   <language>de</language>
                   <userid>123456789</userid>
                   <password>DasPasswort</password>
                </identification>
             </args>
          </v5:get_categories>
       </soapenv:Body>
    </soapenv:Envelope>
    Unfortunately the server replies with: The document has no document element

    Im absolutley new to SOAP.

    So i hope someone can help me

    Thanks

  2. #2
    Join Date
    Mar 2012
    Posts
    3,847
    Hi, I know nothing about SOAP, but the first line "<soapenv:Envelope" seems to lack a closing ">".

    Also, the line "<soapenv:Header/>" seems inconsistent with the rest of the code. All the other "soapenv" entries are in pairs:
    Code:
    <soapenv:something>
    ...
    </soapenv:something>
    So I'd try something like...
    Code:
    <soapenv:Envelope>
       <soapenv:Header>
       xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:v5="https://webstamp.post.ch/wsws/soap/v5">
       </soapenv:Header>
       <soapenv:Body>
          <v5:get_categories>
             <args>
                <identification>
                   <application>sdf8451w8d65d1ad6w5</application>
                   <language>de</language>
                   <userid>123456789</userid>
                   <password>DasPasswort</password>
                </identification>
             </args>
          </v5:get_categories>
       </soapenv:Body>
    </soapenv:Envelope>
    I hope this helps...
    Last edited by jedaisoul; 07-17-2017 at 03:23 PM.

  3. #3
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,819
    Hi there hedie,

    and a warm welcome to these forums.

    Like "jedaisoul" I know nothing about "SOAP" other
    than it appears to look very much like "XML".

    With that it mind, perhaps this attachment might
    be of interest to you.

    coothead
    Attached Files Attached Files
    ~ the original bald headed old fart ~

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    22,023
    Not sure if this is what would generate that specific error message or not, but you need the opening XML declaration:
    Code:
    <?xml version="1.0"?>
    <soapenv:Envelope
       xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
       xmlns:v5="https://webstamp.post.ch/wsws/soap/v5">
       <soapenv:Header/>
       <soapenv:Body>
          <v5:get_categories>
             <args>
                <identification>
                   <application>sdf8451w8d65d1ad6w5</application>
                   <language>de</language>
                   <userid>123456789</userid>
                   <password>DasPasswort</password>
                </identification>
             </args>
          </v5:get_categories>
       </soapenv:Body>
    </soapenv:Envelope>
    ...the first line "<soapenv:Envelope" seems to lack a closing ">"...
    The OP just broke up the first tag across multiple lines, so I don't think that's the issue.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles