title: SOAP .net web service: Server did not recognize the value of HTTP Header SOAPAction
body: <p>When i try to call my webservice do i get the following error: </p>
  
  <pre><code>System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://tempuri.org/GetFlights. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)
  </code></pre>
  
  <p><a href="http://sogaardlameduck.azurewebsites.net/LameDuckService.asmx?WSDL" rel="nofollow noreferrer">http://sogaardlameduck.azurewebsites.net/LameDuckService.asmx?WSDL</a></p>
  
  <p><img src="https://i.stack.imgur.com/Eh2R3.png" alt="enter image description here"></p>
  
  <p>When we use the webservice in other .net programs do we not have any problems, but all Java applicaitons fail with this error. What we we missing to support SOAPAction?</p>
  
  <p>This is our web service:</p>
  
  <pre><code>[WebService(Namespace = "http://sogaardlameduck.azurewebsites.net/")]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      [System.ComponentModel.ToolboxItem(false)]
      // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
      // [System.Web.Script.Services.ScriptService]
      public class LameDuckService : System.Web.Services.WebService
      {
          private TravelGoodEntities entities;
          private BankService bankService;
          private int groupNumber;
          private accountType account;
  
          public LameDuckService()
          {
              entities = new TravelGoodEntities();
              bankService = new BankService();
              groupNumber = 10;
              account = new accountType()
              {
                  number = "50208812",
                  name = "LameDuck"
              };
          }
  
          [WebMethod(Description = "Book a flight")]
          public int BookFlight(int bookingId, CreditCardModel model)
          {
              var flight = entities.Flights.Where(x =&gt; x.Id == bookingId).FirstOrDefault();
              if (flight == null)
                  throw new FlightNotFoundException();
  
              // count reservations
              var count = flight.Flight_Reservations.Count;
              if(count &gt;= flight.Seats)
                  throw new NoAvailableSeatsException();
  
              try
              {
                  if (!bankService.validateCreditCard(groupNumber, new creditCardInfoType()
                  {
                      name = model.Name,
                      number = model.Number,
                      expirationDate = new expirationDateType()
                      {
                          year = model.ExpirationDateYear,
                          month = model.ExpirationDateMonth
                      }
                  }, flight.Price))
                      throw new CreditCardValidationFailedException();
  
                  if (!bankService.chargeCreditCard(groupNumber, new creditCardInfoType()
                  {
                      name = model.Name,
                      number = model.Number,
                      expirationDate = new expirationDateType()
                      {
                          year = model.ExpirationDateYear,
                          month = model.ExpirationDateMonth
                      }
                  }, flight.Price, account))
                      throw new CreditCardChargeFailedException();
              }
              catch (SoapException e)
              {
                  throw new CreditCardValidationFailedException();
              }
  
              var reservation = new DataAccess.Flight_Reservations()
              {
                  FlightId = flight.Id,
                  Booked = DateTime.UtcNow
              };
              entities.Flight_Reservations.Add(reservation);
              entities.SaveChanges();
  
              return reservation.Id;
          }
          [WebMethod(Description = "Search for flights")]
          public List&lt;Models.Flight&gt; GetFlights(FlightSearchModel model)
          {
              var select = entities.Flights.Select(x =&gt; x);
  
              if (model.DestinationLocation != null)
                  select = select.Where(x =&gt; x.DestinationLocation == model.DestinationLocation);
              if (model.DepartureLocation != null)
                  select = select.Where(x =&gt; x.DepartureLocation == model.DepartureLocation);
              if (model.Date != new DateTime())
                  select = select.Where(x =&gt; x.DepartueTime.Year == model.Date.Year &amp;&amp;
                      x.DepartueTime.Month == model.Date.Month &amp;&amp;
                      x.DepartueTime.Day == model.Date.Day);
  
              return select.Select(x =&gt; new Models.Flight()
              {
                  Id = x.Id,
                  Airline = x.Airline,
                  ArrivalTime = x.ArrivalTime,
                  Carrier = x.Carrier,
                  DepartueTime = x.DepartueTime,
                  DepartureLocation = x.DepartureLocation,
                  DestinationLocation = x.DestinationLocation,
                  Price = x.Price,
                  Seats = x.Seats
              }).ToList();
          }
          [WebMethod(Description = "Cancel a flight")]
          public bool CancelFlight(int bookingId, CreditCardModel model)
          {
              var booking = entities.Flight_Reservations.Where(x =&gt; x.Id == bookingId).FirstOrDefault();
              if (booking == null)
                  throw new FlightNotFoundException();
  
              var flight = entities.Flights.Where(x =&gt; x.Id == booking.FlightId).FirstOrDefault();
              if (flight == null)
                  throw new FlightNotFoundException();
  
              if (!bankService.refundCreditCard(groupNumber, new creditCardInfoType()
              {
                  name = model.Name,
                  number = model.Number,
                  expirationDate = new expirationDateType()
                  {
                      year = model.ExpirationDateYear,
                      month = model.ExpirationDateMonth
                  }
              }, flight.Price, account))
                  throw new UnableToRefundException();
  
              entities.Flight_Reservations.Remove(booking);
              entities.SaveChanges();
  
              return true;
          }
          [WebMethod(Description = "Get a flight by booked id")]
          public Models.Flight GetFlightByBookedId(int bookingId)
          {
              var booking = entities.Flight_Reservations.Where(c =&gt; c.Id == bookingId).FirstOrDefault();
              if (booking == null)
                  throw new FlightNotFoundException();
  
              var x = entities.Flights.Where(c =&gt; c.Id == booking.FlightId).FirstOrDefault();
              if (x == null)
                  throw new FlightNotFoundException();
              return new Models.Flight()
              {
                  Id = x.Id,
                  Airline = x.Airline,
                  ArrivalTime = x.ArrivalTime,
                  Carrier = x.Carrier,
                  DepartueTime = x.DepartueTime,
                  DepartureLocation = x.DepartureLocation,
                  DestinationLocation = x.DestinationLocation,
                  Price = x.Price,
                  Seats = x.Seats
              };
          }
          [WebMethod(Description = "Get a flight by id")]
          public Models.Flight GetFlight(int id)
          {
              var x = entities.Flights.Where(c =&gt; c.Id == id).FirstOrDefault();
              if (x == null)
                  throw new FlightNotFoundException();
              return new Models.Flight()
              {
                  Id = x.Id,
                  Airline = x.Airline,
                  ArrivalTime = x.ArrivalTime,
                  Carrier = x.Carrier,
                  DepartueTime = x.DepartueTime,
                  DepartureLocation = x.DepartureLocation,
                  DestinationLocation = x.DestinationLocation,
                  Price = x.Price,
                  Seats = x.Seats
              };
          }
      }
  </code></pre>
  
  <p>Update:
  I get the show error on: <a href="http://wsdlbrowser.com/soapclient?wsdl_url=http%3A%2F%2Fsogaardlameduck.azurewebsites.net%2FLameDuckService.asmx%3FWSDL&amp;function_name=GetFlights" rel="nofollow noreferrer">http://wsdlbrowser.com/soapclient?wsdl_url=http%3A%2F%2Fsogaardlameduck.azurewebsites.net%2FLameDuckService.asmx%3FWSDL&amp;function_name=GetFlights</a></p>
  
  <p>But if i use: <a href="http://www.soapclient.com/" rel="nofollow noreferrer">http://www.soapclient.com/</a> Do i not have any problems:
  <img src="https://i.stack.imgur.com/qWeD9.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/9Ajci.png" alt="enter image description here"></p>