title: How to connect to WSDL web service?
body: <p>Here is the following WSDL web services xml structures:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. --&gt;
  &lt;!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. --&gt;
  &lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://dispproj/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dispproj/" name="DipService"&gt;
      &lt;types&gt;
          &lt;xsd:schema&gt;
              &lt;xsd:import namespace="http://dispproj/" schemaLocation="http://www.example.com:8888/OfficeSRV/DipPort?xsd=1" /&gt;
          &lt;/xsd:schema&gt;
      &lt;/types&gt;
      &lt;message name="getDisp"&gt;
          &lt;part name="parameters" element="tns:getDisp" /&gt;
      &lt;/message&gt;
      &lt;message name="getDispResponse"&gt;
          &lt;part name="parameters" element="tns:getDispResponse" /&gt;
      &lt;/message&gt;
      &lt;message name="getActiveoffice"&gt;
          &lt;part name="parameters" element="tns:getActiveoffice" /&gt;
      &lt;/message&gt;
      &lt;message name="getActiveofficeResponse"&gt;
          &lt;part name="parameters" element="tns:getActiveofficeResponse" /&gt;
      &lt;/message&gt;
      &lt;portType name="Dip"&gt;
          &lt;operation name="getDisp"&gt;
              &lt;input message="tns:getDisp" /&gt;
              &lt;output message="tns:getDispResponse" /&gt;
          &lt;/operation&gt;
          &lt;operation name="getActiveoffice"&gt;
              &lt;input message="tns:getActiveoffice" /&gt;
              &lt;output message="tns:getActiveofficeResponse" /&gt;
          &lt;/operation&gt;
      &lt;/portType&gt;
      &lt;binding name="DipPortBinding" type="tns:Dip"&gt;
          &lt;soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" /&gt;
          &lt;operation name="getDisp"&gt;
              &lt;soap12:operation soapAction="" /&gt;
              &lt;input&gt;
                  &lt;soap12:body use="literal" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap12:body use="literal" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
          &lt;operation name="getActiveoffice"&gt;
              &lt;soap12:operation soapAction="" /&gt;
              &lt;input&gt;
                  &lt;soap12:body use="literal" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap12:body use="literal" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
      &lt;/binding&gt;
      &lt;service name="DipService"&gt;
          &lt;port name="DipPort" binding="tns:DipPortBinding"&gt;
              &lt;soap12:address location="http://www.example.com:8888/OfficeSRV/DipPort" /&gt;
          &lt;/port&gt;
      &lt;/service&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>And here is the schema:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.5. --&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://dispproj/" version="1.0" targetNamespace="http://dispproj/"&gt;
      &lt;xs:element name="getActiveoffice" type="tns:getActiveoffice" /&gt;
      &lt;xs:element name="getActiveofficeResponse" type="tns:getActiveofficeResponse" /&gt;
      &lt;xs:element name="getDisp" type="tns:getDisp" /&gt;
      &lt;xs:element name="getDispResponse" type="tns:getDispResponse" /&gt;
      &lt;xs:complexType name="getDisp"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="arg0" type="xs:int" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="getDispResponse"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="return" type="tns:disp" minOccurs="0" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="disp"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="disps" type="xs:anyType" nillable="true" minOccurs="0" maxOccurs="unbounded" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="getActiveoffice"&gt;
          &lt;xs:sequence /&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="getActiveofficeResponse"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="return" type="tns:activeOffices" minOccurs="0" maxOccurs="unbounded" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="activeOffices"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="offADDRESS" type="xs:string" minOccurs="0" /&gt;
              &lt;xs:element name="offEMAIL" type="xs:string" minOccurs="0" /&gt;
              &lt;xs:element name="offFAX" type="xs:string" minOccurs="0" /&gt;
              &lt;xs:element name="offLIECENE" type="xs:string" minOccurs="0" /&gt;
              &lt;xs:element name="offMobile" type="xs:string" minOccurs="0" /&gt;
              &lt;xs:element name="offPHONE" type="xs:string" minOccurs="0" /&gt;
              &lt;xs:element name="offid" type="xs:int" /&gt;
              &lt;xs:element name="offname" type="xs:string" minOccurs="0" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>I am using Postman (which is http request/response client) for Chrome:</p>
  
  <p>Request URL: <a href="http://www.example.com:8888/OfficeSRV/DipPort" rel="nofollow noreferrer">http://www.example.com:8888/OfficeSRV/DipPort</a></p>
  
  <p>Request Body (I learned this body after testing it with: <a href="http://tomi.vanek.sk/index.php?page=wsdl-viewer" rel="nofollow noreferrer">http://tomi.vanek.sk/index.php?page=wsdl-viewer</a>):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://dispproj/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;SOAP-ENV:Body&gt;
          &lt;mns1:getActiveoffice xmlns:mns1="http://dispproj/" /&gt;
      &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>The online WSDL client successfully retrieves a result, but when I tried the url and body of the request with Postman I got the following issues:</p>
  
  <blockquote>
    <p>415: Unsupported Media Type</p>
  </blockquote>
  
  <p>Are there some HTTP request headers that I am missing with my requests?</p>