title: Problem consuming Soap service. The endpoint reference (EPR) for the Operation not found is
body: <p>Im following this guide to consuming a soap service:</p>
  
  <p><a href="https://spring.io/guides/gs/consuming-web-service/" rel="nofollow noreferrer">https://spring.io/guides/gs/consuming-web-service/</a></p>
  
  <p>This is my soap wsdl</p>
  
  <pre><code>&lt;?xml version="1.0" standalone="no"?&gt;&lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:tns="http://thomas-bayer.com/blz/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://thomas-bayer.com/blz/"&gt;
      &lt;wsdl:documentation&gt;BLZService&lt;/wsdl:documentation&gt;
      &lt;wsdl:types&gt;
          &lt;xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://thomas-bayer.com/blz/"&gt;
              &lt;xsd:element name="getBank" type="tns:getBankType"&gt;&lt;/xsd:element&gt;
              &lt;xsd:element name="getBankResponse" type="tns:getBankResponseType"&gt;&lt;/xsd:element&gt;
              &lt;xsd:complexType name="getBankType"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name="blz" type="xsd:string"&gt;&lt;/xsd:element&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
              &lt;xsd:complexType name="getBankResponseType"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element name="details" type="tns:detailsType"&gt;&lt;/xsd:element&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
              &lt;xsd:complexType name="detailsType"&gt;
                  &lt;xsd:sequence&gt;
                      &lt;xsd:element minOccurs="0" name="bezeichnung" type="xsd:string"&gt;&lt;/xsd:element&gt;
                      &lt;xsd:element minOccurs="0" name="bic" type="xsd:string"&gt;&lt;/xsd:element&gt;
                      &lt;xsd:element minOccurs="0" name="ort" type="xsd:string"&gt;&lt;/xsd:element&gt;
                      &lt;xsd:element minOccurs="0" name="plz" type="xsd:string"&gt;&lt;/xsd:element&gt;
                  &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
          &lt;/xsd:schema&gt;
      &lt;/wsdl:types&gt;
      &lt;wsdl:message name="getBank"&gt;
          &lt;wsdl:part name="parameters" element="tns:getBank"&gt;&lt;/wsdl:part&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:message name="getBankResponse"&gt;
          &lt;wsdl:part name="parameters" element="tns:getBankResponse"&gt;&lt;/wsdl:part&gt;
      &lt;/wsdl:message&gt;
      &lt;wsdl:portType name="BLZServicePortType"&gt;
          &lt;wsdl:operation name="getBank"&gt;
              &lt;wsdl:input message="tns:getBank"&gt;&lt;/wsdl:input&gt;
              &lt;wsdl:output message="tns:getBankResponse" wsaw:Action="http://thomas-bayer.com/blz/BLZService/getBankResponse"&gt;&lt;/wsdl:output&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:portType&gt;
      &lt;wsdl:binding name="BLZServiceSOAP11Binding" type="tns:BLZServicePortType"&gt;
          &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"&gt;&lt;/soap:binding&gt;
          &lt;wsdl:operation name="getBank"&gt;
              &lt;soap:operation style="document" soapAction=""&gt;&lt;/soap:operation&gt;
              &lt;wsdl:input&gt;
                  &lt;soap:body use="literal"&gt;&lt;/soap:body&gt;
              &lt;/wsdl:input&gt;
              &lt;wsdl:output&gt;
                  &lt;soap:body use="literal"&gt;&lt;/soap:body&gt;
              &lt;/wsdl:output&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:binding&gt;
      &lt;wsdl:binding name="BLZServiceSOAP12Binding" type="tns:BLZServicePortType"&gt;
          &lt;soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"&gt;&lt;/soap12:binding&gt;
          &lt;wsdl:operation name="getBank"&gt;
              &lt;soap12:operation style="document" soapAction=""&gt;&lt;/soap12:operation&gt;
              &lt;wsdl:input&gt;
                  &lt;soap12:body use="literal"&gt;&lt;/soap12:body&gt;
              &lt;/wsdl:input&gt;
              &lt;wsdl:output&gt;
                  &lt;soap12:body use="literal"&gt;&lt;/soap12:body&gt;
              &lt;/wsdl:output&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:binding&gt;
      &lt;wsdl:binding name="BLZServiceHttpBinding" type="tns:BLZServicePortType"&gt;
          &lt;http:binding verb="POST"&gt;&lt;/http:binding&gt;
          &lt;wsdl:operation name="getBank"&gt;
              &lt;http:operation location="BLZService/getBank"&gt;&lt;/http:operation&gt;
              &lt;wsdl:input&gt;
                  &lt;mime:content part="getBank" type="text/xml"&gt;&lt;/mime:content&gt;
              &lt;/wsdl:input&gt;
              &lt;wsdl:output&gt;
                  &lt;mime:content part="getBank" type="text/xml"&gt;&lt;/mime:content&gt;
              &lt;/wsdl:output&gt;
          &lt;/wsdl:operation&gt;
      &lt;/wsdl:binding&gt;
      &lt;wsdl:service name="BLZService"&gt;
          &lt;wsdl:port name="BLZServiceSOAP11port_http" binding="tns:BLZServiceSOAP11Binding"&gt;
              &lt;soap:address location="http://www.thomas-bayer.com/axis2/services/BLZService"&gt;&lt;/soap:address&gt;
          &lt;/wsdl:port&gt;
          &lt;wsdl:port name="BLZServiceSOAP12port_http" binding="tns:BLZServiceSOAP12Binding"&gt;
              &lt;soap12:address location="http://www.thomas-bayer.com/axis2/services/BLZService"&gt;&lt;/soap12:address&gt;
          &lt;/wsdl:port&gt;
          &lt;wsdl:port name="BLZServiceHttpport" binding="tns:BLZServiceHttpBinding"&gt;
              &lt;http:address location="http://www.thomas-bayer.com/axis2/services/BLZService"&gt;&lt;/http:address&gt;
          &lt;/wsdl:port&gt;
      &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>As you can see the element soapAction is empty. This causes the following error:</p>
  
  <p><strong><em>The endpoint reference (EPR) for the Operation not found is <a href="http://www.thomas-bayer.com/axis2/services/BLZService" rel="nofollow noreferrer">http://www.thomas-bayer.com/axis2/services/BLZService</a> and the WSA Action =</em></strong> </p>
  
  <p>Here is my SoapClient:</p>
  
  <pre><code>public class TestClient extends WebServiceGatewaySupport {
  
      /**
       * Makes the call, Generic Exception is understood as no authorized.
       *
       * @param endpoint
       * @param request
       * @return WebServiceIOException if connection fails.
       */
      public GetBankResponseType executeSoapClientGetUserProfile(String endpoint, GetBankType request){
  
          WebServiceTemplate webServiceTemplate = getWebServiceTemplate();
          try {
              return (GetBankResponseType) webServiceTemplate.marshalSendAndReceive(endpoint, request);
          } catch (Exception e) {
              logger.debug(e.getMessage());
          }
          return null;
      }
  }
  </code></pre>
  
  <p>In soapUI works perfectly:
  <a href="https://i.stack.imgur.com/z13k2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z13k2.png" alt="enter image description here"></a></p>
  
  <p>What could be the problem??</p>
  
  <p>Thanks!!</p>