views:

76

answers:

1

I have a problem with the Web Service I recently developed. The problem is about the Web Service response. More precisely sometimes the Web Service sends back the following response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
   <soapenv:Body>
      <ns1:GetConstants2Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://usermanagerwstest"&gt;
         <GetConstants2Return xsi:type="ns2:CFComponentSkeleton" xmlns:ns2="http://rpc.xml.coldfusion"/&gt;
      </ns1:GetConstants2Response>
   </soapenv:Body>
</soapenv:Envelope>

Instead the correct response (that sometimes shows up in an intermittent way) is reported below:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
   <soapenv:Body>
      <ns1:GetConstants2Response soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://usermanagerwstest"&gt;
         <GetConstants2Return xsi:type="ns1:Constants2">
            <BooleanTypeFalse xsi:type="xsd:string">0</BooleanTypeFalse>
            <BooleanTypeTrue xsi:type="xsd:string">1</BooleanTypeTrue>
            <GenderFemale xsi:type="xsd:string">F</GenderFemale>
            <GenderMale xsi:type="xsd:string">M</GenderMale>
            <LanguageEnglish xsi:type="xsd:string">inglese</LanguageEnglish>
            <LanguageItalian xsi:type="xsd:string">italiano</LanguageItalian>
         </GetConstants2Return>
      </ns1:GetConstants2Response>
   </soapenv:Body>
</soapenv:Envelope>

Where does the CFCComponentSkeleton comes from? I thank everybody in advance.

+2  A: 

It sounds like perhaps the method was missing. When you hit a CFC and don't pass a method, you get the descriptor - a HTML view of the CFC methods. When you do that with ?wsdl in the URL, it should send the WSDL back. But maybe something is getting in the way. Maybe check your web server logs and see if something odd was passed in the URL. Also look into adding some logging within the CFC as well.

CF Jedi Master
I checked the log files of CF and of the Web Server but I could not find anything useful. The WS now sends back a different response from the one I reported above:.... <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>coldfusion.xml.rpc.CFCInvocationException: [java.lang.ClassCastException : usermanagerwstest.UserInfo2]</faultstring>.... UserInfo2 is a cfc containing some <cfproperty> tag.The Ws is installed on many server but the methods that throw the ClassCastExcpetion are different on every server.
Ivan Paloscia
Do you see anything in the exception logs?
CF Jedi Master