You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user-ja@axis.apache.org by os...@yahoo.co.jp on 2007/10/12 10:05:01 UTC

The client whom I generated by Wsdl2Java automatically fails in the deserialize of response data

皆様
   
  初めて投稿させていただきます。
  daisukeと申します。
   
   
  Wsdl2Javaで作成したwebサービスクライアントが、Webサービスからのレスポンスを
  デシリアライズできません。
   
  また、上記の問題を解決するために、皆様にどのような情報を提供すれば、アドバイスを
  いただけるかの検討もつかない状況です。
   
  どうか、アドバイスのほど、宜しくお願い致します。
   
   
   
  私の気づく範囲で、下記に情報を記します。
   
   
  ・エラー内容です。
   
  - 例外発生: / [en]-(Exception:)
org.xml.sax.SAXException: パラメータ'Responce'のデシリアライズ中: 型{http://www.w3.org/2001/XMLSchema}anyTypeのデシリアライザが見つかりませんでした / [en]-(Deserializing parameter 'Responce':  could not find deserializer for type {http://www.w3.org/2001/XMLSchema}anyType)
 at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
 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:1140)
 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 localhost.axis.services.SampleWebSite.SampleWebSiteSoapBindingStub.sampleMethodF_test(SampleWebSiteSoapBindingStub.java:156)
 at localhost.axis.services.SampleWebSite.ExecuteSampleWebsite.main(ExecuteSampleWebsite.java:47);
   
   
   
  ・対象のWebサービスのWSDLです。
   
  <?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/SampleWebSite" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/axis/services/SampleWebSite" xmlns:intf="http://localhost:8080/axis/services/SampleWebSite" xmlns:tns1="http://site"
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDLはApache Axis version: 1.2
Built on May 03, 2005 (02:20:24 EDT)によって生成されました / [en]-(WSDL created by Apache Axis version: 1.2
Built on May 03, 2005 (02:20:24 EDT))-->
 <wsdl:types>
  <schema targetNamespace="http://site" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="sampleMethodF" type="xsd:anyType"/>
  </schema>
  <schema targetNamespace="http://localhost:8080/axis/services/SampleWebSite" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="sampleMethodFReturn" type="xsd:anyType"/>
  </schema>
 </wsdl:types>
     <wsdl:message name="sampleMethodFResponse">
        <wsdl:part element="impl:sampleMethodFReturn" name="sampleMethodFReturn"/>
     </wsdl:message>
     <wsdl:message name="sampleMethodFRequest">
        <wsdl:part element="tns1:sampleMethodF" name="part"/>
     </wsdl:message>
     <wsdl:portType name="SampleWebSite">
        <wsdl:operation name="sampleMethodF">
           <wsdl:input message="impl:sampleMethodFRequest" name="sampleMethodFRequest"/>
           <wsdl:output message="impl:sampleMethodFResponse" name="sampleMethodFResponse"/>
        </wsdl:operation>
     </wsdl:portType>
     <wsdl:binding name="SampleWebSiteSoapBinding" type="impl:SampleWebSite">
        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="sampleMethodF">
           <wsdlsoap:operation soapAction=""/>
           <wsdl:input name="sampleMethodFRequest">
              <wsdlsoap:body use="literal"/>
           </wsdl:input>
           <wsdl:output name="sampleMethodFResponse">
              <wsdlsoap:body use="literal"/>
           </wsdl:output>
        </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="SampleWebSiteService">
        <wsdl:port binding="impl:SampleWebSiteSoapBinding" name="SampleWebSite">
           <wsdlsoap:address location="http://localhost:8080/axis/services/SampleWebSite"/>
        </wsdl:port>
     </wsdl:service>
  </wsdl:definitions>

   
  ・対象のサービスのWSDDです。
   
  <deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/" 
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
            xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
  <!-- note that either style="message" OR provider="java:MSG" both work -->
  <service name="SampleWebSite" style="message">
    <parameter name="className" value="site.SampleWebSite" />
    <parameter name="allowedMethods" value="sampleMethodF" />
  </service>
</deployment>

 

 
---------------------------------
Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar