Home > Back-end >  Java. Lang. ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDoc
Java. Lang. ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDoc

Time:12-21

Java. Lang. ClassCastException: com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl always be cast to [Ljava. Lang. Object


The customer service side is WSDL created by Apache Axis version: 1.4

 & lt; ? The XML version="1.0" encoding="utf-8"?> 
Built on Apr 22, 2006 (06:55:48 PDT) - & gt;


































































My code is:
 public Boolean requestInjection (VideoInfo VideoInfo) {

Try {
String xmlStr=createXMLStr (videoInfo);

Org. Apache. Axis. The client. The Service Service=new org. Apache. Axis. The client. The Service ();
The service Call Call=(Call). CreateCall ();
Call. The setTimeout (new Integer (20000));
Call. SetTargetEndpointAddress (new URL (INJECTION_URL));
//call. SetEncodingStyle (" utf-8 ");
////call. SetUseSOAPAction (true);
////call. SetSOAPActionURI (" ");
Call. SetOperationName (new QName (" iptv ", "ExecCmd"));//WSDL describes the interface name inside the
Call addParameter (new QName (" iptv ", "CSPID"), XMLType. XSD_STRING, ParameterMode. IN);
Call addParameter (new QName (" iptv ", "LSPID"), XMLType. XSD_STRING, ParameterMode. IN);
Call addParameter (new QName (" iptv ", "CorrelateID"), XMLType. XSD_STRING, ParameterMode. IN);
Call addParameter (new QName (" iptv ", "CmdFileURL"), XMLType. XSD_STRING, ParameterMode. IN);

Call setReturnType (XMLType. SOAP_DOCUMENT);//to return data type (custom types)

Object [] o=(Object []) call. The invoke (new Object [] {CSPID LSPID, CorrelateID, ftpUrl + xmlStr});


After the operation error, or take less than return data, consult a great god, and this is how to return a responsibility??
  • Related