Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1828

Show
Ignore:
Timestamp:
06/04/07 22:49:06 (1 year ago)
Author:
nahi
Message:
  • WSDLDriverFactory + rpc/encoded + anyType return caused an error. closes #353.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/wsdl/soap/methodDefCreator.rb

    r1824 r1828  
    173173      end 
    174174    elsif part.type == XSD::AnyTypeName 
    175       [XSD::AnyTypeName
     175      [nil
    176176    else 
    177177      raise RuntimeError.new("part: #{part.name} cannot be resolved") 
  • trunk/test/wsdl/any/any.wsdl

    r1771 r1828  
    4242  </message> 
    4343 
     44  <message name="msg_echoany_request"> 
     45  </message> 
     46 
     47  <message name="msg_echoany_response"> 
     48    <part name="echoany_return" type="xsd:anyType"/> 
     49  </message> 
     50 
    4451  <message name="setOutputAndCompleteRequest"> 
    4552    <part name="parameters" element="txd:setOutputAndCompleteRequest"/> 
     
    5461      <input message="tns:msg_echoitem"/> 
    5562      <output message="tns:msg_echoitem"/> 
     63    </operation> 
     64 
     65    <operation name="echoAny"> 
     66      <input message="tns:msg_echoany_request"/> 
     67      <output message="tns:msg_echoany_response"/> 
    5668    </operation> 
    5769 
     
    7486    </operation> 
    7587 
     88    <operation name="echoAny"> 
     89      <soap:operation style="rpc" soapAction="urn:example.com:echoAny"/> 
     90      <input> 
     91        <soap:body use="encoded"/> 
     92      </input> 
     93      <output> 
     94        <soap:body use="encoded"/> 
     95      </output> 
     96    </operation> 
     97 
    7698    <operation name="setOutputAndComplete"> 
    7799      <soap:operation soapAction="urn:example.com:echo"/> 
  • trunk/test/wsdl/any/expectedDriver.rb

    r1790 r1828  
    1515      { :request_style =>  :document, :request_use =>  :literal, 
    1616        :response_style => :document, :response_use => :literal, 
     17        :faults => {} } 
     18    ], 
     19    [ XSD::QName.new("urn:example.com:echo", "echoAny"), 
     20      "urn:example.com:echoAny", 
     21      "echoAny", 
     22      [ ["retval", "echoany_return", [nil]] ], 
     23      { :request_style =>  :rpc, :request_use =>  :encoded, 
     24        :response_style => :rpc, :response_use => :encoded, 
    1725        :faults => {} } 
    1826    ], 
  • trunk/test/wsdl/any/test_any.rb

    r1794 r1828  
    3636        XSD::QName.new(TypeNamespace, 'foo.bar') 
    3737      ) 
     38      add_rpc_operation(self,  
     39        XSD::QName.new("urn:example.com:echo", "echoAny"), 
     40        "urn:example.com:echoAny", 
     41        "echoAny", 
     42        [ ["retval", "echoany_return", [XSD::QName.new("http://www.w3.org/2001/XMLSchema", "anyType")]] ], 
     43        { :request_style =>  :rpc, :request_use =>  :encoded, 
     44          :response_style => :rpc, :response_use => :encoded, 
     45          :faults => {} } 
     46      ) 
    3847    end 
    3948   
     
    4655      res 
    4756      # TODO: arg 
     57    end 
     58 
     59    AnyStruct = Struct.new(:a, :b) 
     60    def echoAny 
     61      AnyStruct.new(1, Time.mktime(2007, 1, 1)) 
    4862    end 
    4963  end 
     
    133147  end 
    134148 
     149  def test_anyreturl_wsdl 
     150    wsdl = File.join(DIR, 'any.wsdl') 
     151    @client = ::SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver 
     152    @client.endpoint_url = "http://localhost:#{Port}/" 
     153    @client.wiredump_dev = STDOUT if $DEBUG 
     154    res = @client.echoAny 
     155    assert_equal(1, res.a) 
     156    assert_equal(2007, res.b.year) 
     157  end 
     158 
    135159  def test_wsdl 
    136160    wsdl = File.join(DIR, 'any.wsdl')