2012-07-06 1 views
2

WSDL에서 생성 된 Java 소스 패키지를 사용하여 SOAP 호출을하고 있습니다 .org.xml.sax.SAXException : Axis를 Java로 사용하는 {http://www.w3.org/2001/XMLSchema}anyType의 디시리얼라이저 없음

필요한 세부 정보를 삽입 한 후 응용 프로그램에서 전화를 걸고 오류를 수신합니다.

코드 :

public static String getRioInformation(String msisdn, String endpoint_address) { 
    String rio_response=""; 
    try { 
     System.out.println("here :"); 
     FwiEsbWs4USSDLocator locator=new FwiEsbWs4USSDLocator(); 
     locator.setMaintainSession(true); 

     locator.setFwiEsbWs4USSDEndPointEndpointAddress(endpoint_address); 

     FwiEsbWs4USSDSoapBindingStub temp; 

     FwiEsbWs4USSD fwi; 
     FwiEsbWs4USSDPortType port; 
     GetRioInformationsRequest rio=new GetRioInformationsRequest(); 
     RioSearchRequest search=new RioSearchRequest(); 
     search.setMsisdn(msisdn); 

     DefaultContext def_context = new DefaultContext(); 
     DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
     def_context.setEffectiveDatetime(Calendar.getInstance()); 

     def_context.setSystem(MappingSystem.USSD); 
     search.setContext(def_context); 
     rio.setRioSearchRequest(search); 

     FwiEsbWs4USSD cg= null; 

     //QName q = new QName("http://service.digicel.fr/", "GetRioInformationsRequest"); 
     int responseCode=0; 
     try { 
      //cg=locator.; 

      port = locator.getFwiEsbWs4USSDEndPoint(); 


      DefaultResponse def=new DefaultResponse(); 



      def= port.getRioInformations(rio); 

      ContextEnrichment context = def.getEnrichment(); 
      RioInformation[] rio_info =context.getRioInformation(); 
      rio_response = rio_info[0].getRIO(); 
     } catch (ServiceException ex) { 
      System.out.println("ex 1 :"+ex); 
     } 


    } catch (Exception e) { 
    System.err.println("SOAP Call Error: "+e.toString()); 
    e.printStackTrace(); 
    } 
    return rio_response; 
} 

오류 :

SOAP Call Error: org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType 
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.client.Call.invoke(Call.java:1804) 
    at fr.digicel.service.DigicelFwiEsbWs4USSDSoapBindingStub.getRioInformations(DigicelFwiEsbWs4USSDSoapBindingStub.java:2333) 
    at com.digicel.mynumber.SOAPInteractions.getRioInformation(SOAPInteractions.java:107) 
    at com.digicel.mynumber.Main.<init>(Main.java:97) 
    at com.digicel.mynumber.Main.main(Main.java:253) 
org.xml.sax.SAXException: No deserializer for {http://www.w3.org/2001/XMLSchema}anyType 
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) 
    at org.apache.axis.client.Call.invoke(Call.java:2451) 
    at org.apache.axis.client.Call.invoke(Call.java:2347) 
    at org.apache.axis.client.Call.invoke(Call.java:1804) 
    at fr.digicel.service.DigicelFwiEsbWs4USSDSoapBindingStub.getRioInformations(DigicelFwiEsbWs4USSDSoapBindingStub.java:2333) 
    at com.digicel.mynumber.SOAPInteractions.getRioInformation(SOAPInteractions.java:107) 
    at com.digicel.mynumber.Main.<init>(Main.java:97) 
    at com.digicel.mynumber.Main.main(Main.java:253) 
Caused by: 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) 
     ... 6 more 

오류가 라인에 일어나고있다 "데프 = port.getRioInformations (리오)"오류를 해결하는 데 필요한 것이 무엇? 이 문제를 해결하기 위해 Deserializer 코드 샘플이 필요합니까?

답변

2

나는 일의 노력과 동료의 도움을 쏟은 후에 같은 문제로 싸웠다. 나는 결론에 도달했다. 정적 블록에서 responseTypeType 클래스 (XML 응답 객체에서 구문 분석하려는)에서. elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "anyType"));

변경

elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));

+0

이의 QName이 정답이다. –