405 The requested resource does not support http method ‘GET’. but I’m using POST

I hosted a WebAPI application in IIS with no code changes. When I call a certain url, I get a 405 with an error message in the response body saying GET is not allowed, but I’m calling with POST.

In troubleshooting, I found that calling with other methods gives me a 405, and the method in the error message matches the one I used. This is expected, but the confusing part is that I’m using POST and the error message says that GET is not allowed.

No puedo enviar valor de etiqueta SELECT por URL GET. Ayuda

Cuando cambio la opción del combobox no me envia el valor que escojo para CANTIDAD. Solo envia 1 por la URL. Les agradecería mucho su ayuda de antemano gracias

Codigo:

<form action='carrito.php' method='get'><table><tr><td>" . $  key['id'] ."</td><td>" . $  key['nombre'] . "</td><td>" . $  key['descripcion'] . "</td><td>  		<select name='cantidad' id='idcantidad'> 		 	<option value='1'>1</option> 		 	<option value='2'>2</option> 		 	<option value='3'>3</option> 		 	<option value='4'>4</option> 		 	<option value='5'>5</option> 		 	<option value='6'>6</option> 		 	<option value='7'>7</option> 		 	<option value='8'>8</option> 		 	<option value='9'>9</option> 		 	<option value='10'>10</option> 		 	</select> 		 	<a href=\"javascript:location.href='carrito.php?agregar=$  id_articulo&cantidad='+document.getElementById('idcantidad').options[document.getElementById('idcantidad').selectedIndex].value;\">agregar</a> 		</td></tr></table></form>

Unable to receive SOAP POST request at client side. Getting error Request method ‘GET’ not supported

I am creating a Client to consume the SOAP request. The Client is sending request using HTTP POST. Below are two requests that I need to consume:

Request 1:

<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:abc="http://pay_test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    <soapenv:Header />    <soapenv:Body>       <abc:RequestService soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">          <InputXml xsi:type="xsd:string">&lt;?xml version="1.0" encoding="UTF-8"?&gt;         &lt;Request&gt;         &lt;TransactionID&gt;10000000000078804924&lt;/TransactionID&gt;         &lt;TransactionType&gt;BillPayment&lt;/TransactionType&gt;         &lt;TransactionDateStamp&gt;29-03-2019 11:27:26&lt;/TransactionDateStamp&gt;         &lt;AmountPaid&gt;50.00&lt;/AmountPaid&gt;               &lt;/Request&gt;</InputXml>       </abc:RequestService>    </soapenv:Body> </soapenv:Envelope> 

Request 2:

<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns="https://billpayment.xyz.in/">    <soap:Body>       <DoPayment>          <CompanyName>TEST</CompanyName>          <UseName>RAHUL</UseName>          <Password>12345678</Password>          <AccountNumber>000066654</AccountNumber>          <Amount>11.00</Amount>          <TransactionID>78398100</TransactionID>       </DoPayment>    </soap:Body> </soap:Envelope> 

I am using the below code to consume the request:

@Controller public class MessageDetailsController {  @RequestMapping(value = "/", method = { RequestMethod.POST }, consumes = {"text/xml"}, produces = "text/xml")     public ResponseEntity messageStub(@RequestBody String requestString)             throws ClientProtocolException, IOException {         try {             System.out.println("received xml soap request");             System.out.println(requestString);         }         catch (Exception e) {             e.printStackTrace();         } } 

I have tried the above method with @Controller and @RestController. But the Client is not able to hit to this method. I am getting the below error because Client is not able to hit the POST method of my class.

WARN 17707 — [ebContainer : 6] o.s.web.servlet.PageNotFound: Request method ‘GET’ not supported

ERROR 17707 — [ebContainer : 6] o.s.boot.web.support.ErrorPageFilter: Cannot forward to error page for request [/] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

I want to avoid using the generated Java code using WSDL and want to consume the request in the above manner as I have to consume so many services. I have below queries:

Does this way of consuming SOAP request is correct or am I missing something? The first SOAP request is encoded, So will it require any other parameters as well for RequestMapping?

Error “Cannot modify header information – headers already sent” a la hora de traer datos con un $.get o un $.getJSON

Buenas y espero me ayuden con esta problematica que tengo ahora.

Tengo un input que a la hora de escribir en él al usuario le aparece palabras o datos que vienen desde una tabla, esto lo logro con la funcion a continuación.

function initializeAutoCompletes() {          $  .getJSON('/admin/projects/memorias_institucionales/source', {             table: "onomastico"         })         .done(function(data) {             console.log(data);             $  (".onomasticos").typeahead({                 source: data             });         });          $  .get('/admin/projects/memorias_institucionales/source', {             table: "onomastico"         })              .done(function(response) {                    console.log(response);                    //Funcion de prueba, imprime el error              });      }     initializeAutoCompletes(); 

He notado que con la funcion de prueba la cual imprime el error me imprime por consola lo siguiente:

<p>Severity: Warning</p> <p>Message:  Cannot modify header information - headers already sent by (output started at ruta_del_proyecto/controllers/projects.php:396)</p> <p>Filename: libraries/Session.php</p> <p>Line Number: 675</p> 

He notado que solo me imprime dicho error solo si hay menos de 62 registros en la tabla “onomasticos”, ya cuando pasa de 62 el autocompletar no funciona y al final de imprimir el json me imprime el error. Por si lo necesitan estoy trabajando en PHP con CodeIgniter y esta es la funcion source de mi controlador:

public function source() {         $  table = $  _GET['table'];         $  data = $  this->adm_model->select_all("description",$  table);          foreach($  data as $  dataRow)             $  json[] = $  dataRow['description'];          if($  json)             echo json_encode($  json);         else             echo json_encode(array($  q." *** (Nuevo $  table)"));     } 

Y esta es la funcion del modal con la cual traigo los datos:

public function select_all($  s,$  table)     {         $  this->db->select($  s);         $  this->db->from($  table);         $  dataResult = $  this->db->get();          return $  dataResult->result_array() ? $  dataResult->result_array() : -1;     } 

AppleScript: Can I ‘get’ highlighted text from Mail.app?

I’m trying to make a script that takes selected text in Mail.app, gets it into the script and does some processing to it.

I don’t want to have a GUI script that emulates command-C to copy the text to the clipboard. I’d like to be able to set a variable in my script directly to whatever text is selected. This text might be in a ‘compose’ window, or it might be non-editable text in a ‘read message’ window.

Right now I have this Mail script set up so it asks for input. And I copy the selected text, and paste it into the dialog box. But it would be very nice to skip that step and have the script get the selection directly.

NodeJS – TypeError: Cannot read property ‘get’ of undefined

Sou iniciante em NodeJs e me deparei com esse problema quando fui exportar um modulo: “TypeError: Cannot read property ‘get’ of undefined”. Não entendi porque deu o erro já que o código está idêntico ao do professor do curso, mas ainda assim ocorre o erro. Atualmente o código está assim:

module.exports = function(app){   app.get('/noticias', (req, res)=>{     res.render('noticias/noticias')   }) } 

Quando eu faço o require do módulo o servidor não sobe, dando esse erro que comentei. Espero que possam me ajudar, agradeço desde já 🙂