Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> SOAP - HTTP_RAW_POST_DATA
Skobi
post 15.09.2006, 11:09:59
Post #1





Grupa: Zarejestrowani
Postów: 174
Pomógł: 1
Dołączył: 19.02.2004

Ostrzeżenie: (10%)
X----


Kolejne pytanie z SOAP:

Jest taki kod:
  1. <?php
  2. $server = new SoapServer( "soapserver/gilotyna.wsdl" );
  3. $server->setClass("gilotyna" );
  4. $server->handle();
  5. ?>


i taki wynik:
  1. <SOAP-ENV:Envelope>
  2.      <SOAP-ENV:Body>
  3.            <SOAP-ENV:Fault>
  4.                  <faultcode>SOAP-ENV:Server</faultcode>
  5.                  <faultstring>Bad Request. Can't find HTTP_RAW_POST_DATA</faultstring>
  6.            </SOAP-ENV:Fault>
  7.      </SOAP-ENV:Body>
  8. </SOAP-ENV:Envelope>


dlaczego dostaje taki komunikat, co jest nie tak, badz co to powoduje?
Go to the top of the page
+Quote Post
splatch
post 17.09.2006, 12:36:30
Post #2





Grupa: Zarejestrowani
Postów: 487
Pomógł: 7
Dołączył: 7.01.2004
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


W php.ini jest dyrektywa konfiguracyjna dotycząca tej zmiennej - sprawdź czy nie masz jej wyłączonej.


--------------------
Łukasz Dywicki
Independent Java and open source software consultant.
Blog - Java, OSGi, integracja oprogramowania..
Go to the top of the page
+Quote Post
juzwa
post 5.11.2007, 11:49:33
Post #3





Grupa: Zarejestrowani
Postów: 144
Pomógł: 0
Dołączył: 10.07.2006

Ostrzeżenie: (0%)
-----


ustawiłem zmienną

always_populate_raw_post_data

na ON

i teraz mam tylko Bad Request


o co chodzi?

to jest kod serwera
  1. <?php
  2. $data = $HTTP_RAW_POST_DATA;
  3. $server = new SoapServer("serwer.wsdl");
  4. $server->setClass("obslugaSOAP");
  5. $server->handle($data);
  6. ?>


jakby komuś miało pomóc

  1. <?php
  2. //zamiast
  3. $data = $HTTP_RAW_POST_DATA;
  4. //zrobiłem
  5. $data = file_get_contents('php://input');
  6.  
  7. $server = new SoapServer("serwer.wsdl");
  8. $server->setClass("obslugaSOAP");
  9. $server->handle($data);
  10. ?>
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 13.06.2025 - 06:55