title: SOAP vs HTTP POST in WSDL
body: <p>I have the following wsdl</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
           xmlns:ota="http://www.opentravel.org/OTA/2003/05"
           targetNamespace="http://www.opentravel.org/OTA/2003/05"
           name="OCDistributorsService"&gt;
  
  &lt;types&gt;
      &lt;xs:schema&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelSearchRQ.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelSearchRS.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelDescriptiveInfoRQ.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelDescriptiveInfoRS.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRQ.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelAvailRS.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelResRQ.xsd"/&gt;
          &lt;xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="xsd/OTA_HotelResRS.xsd"/&gt;
      &lt;/xs:schema&gt;
  &lt;/types&gt;
  
  &lt;message name="ListPropertiesRequest"&gt;
      &lt;part name="request" element="ota:OTA_HotelSearchRQ"/&gt;
  &lt;/message&gt;
  &lt;message name="ListPropertiesResponse"&gt;
      &lt;part name="response" element="ota:OTA_HotelSearchRS"/&gt;
  &lt;/message&gt;
  
  &lt;message name="GetPropertyDetailsRequest"&gt;
      &lt;part name="request" element="ota:OTA_HotelDescriptiveInfoRQ"/&gt;
  &lt;/message&gt;
  &lt;message name="GetPropertyDetailsResponse"&gt;
      &lt;part name="response" element="ota:OTA_HotelDescriptiveInfoRS"/&gt;
  &lt;/message&gt;
  
  &lt;message name="GetMultiAvailabilityRequest"&gt;
      &lt;part name="request" element="ota:OTA_HotelAvailRQ"/&gt;
  &lt;/message&gt;
  &lt;message name="GetMultiAvailabilityResponse"&gt;
      &lt;part name="response" element="ota:OTA_HotelAvailRS"/&gt;
  &lt;/message&gt;
  
  &lt;message name="GetSingleAvailabilityRequest"&gt;
      &lt;part name="request" element="ota:OTA_HotelAvailRQ"/&gt;
  &lt;/message&gt;
  &lt;message name="GetSingleAvailabilityResponse"&gt;
      &lt;part name="response" element="ota:OTA_HotelAvailRS"/&gt;
  &lt;/message&gt;
  
  &lt;message name="CheckAvailabilityRequest"&gt;
      &lt;part name="request" element="ota:OTA_HotelAvailRQ"/&gt;
  &lt;/message&gt;
  &lt;message name="CheckAvailabilityResponse"&gt;
      &lt;part name="response" element="ota:OTA_HotelAvailRS"/&gt;
  &lt;/message&gt;
  
  &lt;message name="DoReservationRequest"&gt;
      &lt;part name="request" element="ota:OTA_HotelResRQ"/&gt;
  &lt;/message&gt;
  &lt;message name="DoReservationResponse"&gt;
      &lt;part name="response" element="ota:OTA_HotelResRS"/&gt;
  &lt;/message&gt;
  
  &lt;portType name="OCDistributorsV1Port"&gt;
  
      &lt;operation name="ListProperties"&gt;
          &lt;input message="ota:ListPropertiesRequest"/&gt;
          &lt;output message="ota:ListPropertiesResponse"/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="GetPropertyDetails"&gt;
          &lt;input message="ota:GetPropertyDetailsRequest"/&gt;
          &lt;output message="ota:GetPropertyDetailsResponse"/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="GetMultiAvailability"&gt;
          &lt;input message="ota:GetMultiAvailabilityRequest"/&gt;
          &lt;output message="ota:GetMultiAvailabilityResponse"/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="GetSingleAvailability"&gt;
          &lt;input message="ota:GetSingleAvailabilityRequest"/&gt;
          &lt;output message="ota:GetSingleAvailabilityResponse"/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="CheckAvailability"&gt;
          &lt;input message="ota:CheckAvailabilityRequest"/&gt;
          &lt;output message="ota:CheckAvailabilityResponse"/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="DoReservation"&gt;
          &lt;input message="ota:DoReservationRequest"/&gt;
          &lt;output message="ota:DoReservationResponse"/&gt;
      &lt;/operation&gt;
  
  &lt;/portType&gt;
  
  &lt;binding name="OCDistributorsV1POST" type="ota:OCDistributorsV1Port"&gt;
  
      &lt;http:binding verb="POST"/&gt;
  
      &lt;operation name="ListProperties"&gt;
          &lt;http:operation location="ListProperties"/&gt;
          &lt;input/&gt;
          &lt;output/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="GetPropertyDetails"&gt;
          &lt;http:operation location="GetPropertyDetails"/&gt;
          &lt;input/&gt;
          &lt;output/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="GetMultiAvailability"&gt;
          &lt;http:operation location="GetMultiAvailability"/&gt;
          &lt;input/&gt;
          &lt;output/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="GetSingleAvailability"&gt;
          &lt;http:operation location="GetSingleAvailability"/&gt;
          &lt;input/&gt;
          &lt;output/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="CheckAvailability"&gt;
          &lt;http:operation location="CheckAvailability"/&gt;
          &lt;input/&gt;
          &lt;output/&gt;
      &lt;/operation&gt;
  
      &lt;operation name="DoReservation"&gt;
          &lt;http:operation location="DoReservation"/&gt;
          &lt;input/&gt;
          &lt;output/&gt;
      &lt;/operation&gt;
  
  &lt;/binding&gt;
  
  &lt;service name="OCDistributorsServiceV1"&gt;
      &lt;port name="POST" binding="ota:OCDistributorsV1POST"&gt;
          &lt;http:address location="http://sandbox-api-distributors.odigeoconnect.com/distributors/v1/"/&gt;
      &lt;/port&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p></p>
  
  <p>And I'm using jaxws-maven-plugin to auto generate my client classes. My maven plugin conf is as follows:</p>
  
  <pre><code>    &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;jaxws-maven-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;sei/&gt;
                  &lt;verbose&gt;true&lt;/verbose&gt;
                  &lt;extension&gt;true&lt;/extension&gt;
                  &lt;packageName&gt;com.odigeo.accommodation.fare.provider.odigeoconnect.generated&lt;/packageName&gt;
                  &lt;wsdlDirectory&gt;${project.basedir}/src/main/conf/resources&lt;/wsdlDirectory&gt;
                  &lt;sourceDestDir&gt;${project.basedir}/src/main/gen-java&lt;/sourceDestDir&gt;
                  &lt;wsdlFiles&gt;
                      &lt;wsdlFile&gt;com/odigeo/accommodation/fare/provider/odigeoconnect/odigeoconnect.wsdl&lt;/wsdlFile&gt;
                  &lt;/wsdlFiles&gt;
                  &lt;bindingDirectory&gt;${project.basedir}/src/main/conf/resources/com/odigeo/accommodation/fare/provider/odigeoconnect&lt;/bindingDirectory&gt;
                  &lt;bindingFiles&gt;
                      &lt;bindingFile&gt;bindings.xjb&lt;/bindingFile&gt;
                  &lt;/bindingFiles&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;wsimport&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>The problem is, that when I try to call the WS, using a the generated ServiceClient that provides the port as follows:</p>
  
  <pre><code>final OTAHotelAvailRS response = port.getSingleAvailability(request);
  </code></pre>
  
  <p>I get the following error: </p>
  
  <pre><code>Cannot create SOAP envelope from: {http://www.opentravel.org/OTA/2003/05}OTA_HotelAvailRS
  </code></pre>
  
  <p>So, the wsdl clearly states that the request is HTTP POST, so why is my generated client trying to parse the response as SOAP? The response from the server is a valid XML.</p>