Web Service works, but only once!

Hi everyone,

We are implementing a webservice and we managed to get it working flawlessly on localhost.

When we rolled it out to our staging server, we started to observe a strange behaviour: every time we change the file and save it, via VIM or CVS update, the first request shows the correct available services, but once refreshed, it no longer works.

Upon first access, it prints:




<definitions name="EnquiryWsdlController" targetNamespace="urn:EnquiryWsdlControllerwsdl">

−

<wsdl:message name="submitEnquiryRequest">

<wsdl:part name="xml" type="xsd:string"/>

</wsdl:message>

−

<wsdl:message name="submitEnquiryResponse">

<wsdl:part name="return" type="xsd:string"/>

</wsdl:message>

−

<wsdl:portType name="EnquiryWsdlControllerPortType">

−

<wsdl:operation name="submitEnquiry">

<wsdl:documentation/>

<wsdl:input message="tns:submitEnquiryRequest"/>

<wsdl:output message="tns:submitEnquiryResponse"/>

</wsdl:operation>

</wsdl:portType>

−

<wsdl:binding name="EnquiryWsdlControllerBinding" type="tns:EnquiryWsdlControllerPortType">

<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

−

<wsdl:operation name="submitEnquiry">

<soap:operation soapAction="urn:EnquiryWsdlControllerwsdl#submitEnquiry" style="rpc"/>

−

<wsdl:input>

<soap:body use="encoded" namespace="urn:EnquiryWsdlControllerwsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

</wsdl:input>

−

<wsdl:output>

<soap:body use="encoded" namespace="urn:EnquiryWsdlControllerwsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

−

<wsdl:service name="EnquiryWsdlControllerService">

−

<wsdl:port name="EnquiryWsdlControllerPort" binding="tns:EnquiryWsdlControllerBinding">

<soap:address location="http://ourhost/enquiryWsdl/service/ws/1"/>

</wsdl:port>

</wsdl:service>

</definitions>



After one refresh (CTRL-F5) and any access after that, it appears that it no longer recognises the method as a soap enabled one and prints:




<definitions name="EnquiryWsdlController" targetNamespace="urn:EnquiryWsdlControllerwsdl">

<wsdl:portType name="EnquiryWsdlControllerPortType"/>

−

<wsdl:binding name="EnquiryWsdlControllerBinding" type="tns:EnquiryWsdlControllerPortType">

<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

</wsdl:binding>

−

<wsdl:service name="EnquiryWsdlControllerService">

−

<wsdl:port name="EnquiryWsdlControllerPort" binding="tns:EnquiryWsdlControllerBinding">

<soap:address location="http://ourhost/enquiryWsdl/service/ws/1"/>

</wsdl:port>

</wsdl:service>

</definitions>



We are a bit puzzled about this behaviour to say the least.

I would appreciate any light you can shed on the matter.

Many thanks,

Cass Surek

Does it work flawless if you restart the webserver after any modifications? Maybe some problem with some php opcode-cacher?

Thanks for the reply, but no, we’re not using any opcode-cache or accelerator of any sort. I will test restarting Apache tomorrow at work and will post results.

Cheers

Cass

Hi there - it turned out that that behaviour was indeed due to an opcode-cache which I was not aware was running. Disabling it made the problem go away.

Thanks for the help.

No problem. I don’t know what opcode-cacher you’re running, but you obviously have one with an enabled stat-cache. That feature is good to decrease disk-io with the disadvantage you’ve experienced. So you may want to turn off that stat-cache instead of fully disabling the opcode-cacher.