I need java code to create a SOAP message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • moorcroft
    New Member
    • Mar 2008
    • 57

    I need java code to create a SOAP message

    Hi, I'm new to using SOAP so apologies for any ignorance on my part!

    I'm trying to write java code to create the following SOAP message and return message, and am wondering if someone could please talk me through it? (PS I've starred out parts of it as they are private to my company!)

    Code:
    POST /*****/*****.asmx HTTP/1.1
    Host: localhost
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: length
    
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <GetList xmlns="http://***.***.***.***/***">
          <requestId>long</requestId>
          <laNumber>int</laNumber>
          <hashCode>string</hashCode>
        </GetList>
      </soap12:Body>
    </soap12:Envelope>
    
    HTTP/1.1 200 OK
    Content-Type: application/soap+xml; charset=utf-8
    Content-Length: length
    
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
        <GetListResponse xmlns="http://***.***.***.***/***">
          <GetListResult>xml</GetListResult>
        </GetListResponse>
      </soap12:Body>
    </soap12:Envelope>
    I'd appreciate any help

    Thanks
  • samido
    New Member
    • Oct 2007
    • 52

    #2
    <Complete solution removed due to Posting Guidelines>


    Sam Rabophala
    Last edited by Nepomuk; Sep 22 '08, 01:05 PM. Reason: Removed complete solution

    Comment

    • moorcroft
      New Member
      • Mar 2008
      • 57

      #3
      Thanks for the code, but how come there is no envelope node?

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        Originally posted by samido
        <Complete solution removed due to Posting Guidelines>


        Sam Rabophala
        Sam, it's nice that you want to help, but posting complete solutions is against our Posting Guidelines. You as a full member should know this by now. Therefore I am hereby giving you an official warning: Don't do that again!

        The reason full solutions should not be posted is, because the OP is supposed to learn, not just copy and paste. In some cases, people may learn from a full solution, but quite often, they just copy it, without even trying to understand.

        Greetings,
        Nepomuk (Moderator)

        Comment

        • samido
          New Member
          • Oct 2007
          • 52

          #5
          Sorry about that... my pleasure sir
          kind regards

          Sam Rabophala

          Comment

          Working...