biggie_mac 0 Newbie Poster

I'm having problems understanding how soap works. I understood how to build a request but what do you do with it?? what do you do with the xml file that you build?? practicle example/question....i'm using a java application where a user introduces in a form the domain and username. And having these 2 values, I want to get his name and surname. So my boss says"query this web service:" and he gives me a link with a soap request like:

POST /service/getname.asmx HTTP/1.1
Host: xxx
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://mysite/servicename"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://mysite" xmlns:types="..." xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <tns:GetUserProfile>
      <domain xsi:type="xsd:string">string</domain>
      <account xsi:type="xsd:string">string</account>
    </tns:GetUserProfile>
  </soap:Body>
</soap:Envelope>

and a url to a wsdl...but I don't know how exactly to use this? can anyone explain how all this works? how do I connect java with the wsdl and with the soap so I can get the soap response? I understood the basics..you build a xml file as request, you get a xml file as a response. But at this point I can't figure it out how to send that request(that xml file)..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.