我創建了一個返回Java對象(用戶定義的類)的Java-AXIs2 webservice。在我嘗試使用訪問它的ColdFusion這個訪問Java Web服務時出現Coldfusion錯誤
<cfset wsObj=createobject("webservice","http://localhost:8080/FFMpegHelperServices/services/TranscodeVideoFileFactoryWS?wsdl")>
當我嘗試訪問該wsObj,並做一些操作,我收到以下錯誤
Cannot perform web service invocation getTranscodeVideoFile. The fault returned when invoking the web service operation is:<br> <pre>AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:314) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2448) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.clien... ''</pre> <br>The error occurred on line 34.
任何人有任何想法hopw來處理這個。
WebService類看起來像這樣
public class TranscodeVideoFileFactoryWS {
private TranscodeVideoFile[] temp = new TranscodeVideoFile[1];
public String getTranscodeVideoFile() {
return "nasir";
}
}
我要訪問返回該類。
WebService類看起來像這樣公共類TranscodeVideoFileFactoryWS { \t \t 私人TranscodeVideoFile []臨時=新TranscodeVideoFile [1]; \t \t public String getTranscodeVideoFile(){ \t \t return「nasir」; \t} \t } 我想要訪問正在返回的類。 – nasaa
我已將您的代碼添加到問題中,因此每個人都可以更輕鬆地閱讀它 – duncan
解答澄清。 –