I am attempting to do some SOAP scripting for my first time, and have
run into a problem pretty early on.  When I use the
"factory.create_rpc_driver" I get the error as shown below.
Interestingly, when I use the deprecated "factory.create_driver" the
driver is created, but the rest of my script doesn't work (I think
because the driver and rpc_driver are different).

Anyway, if anyone can give a poor n00b a clue I'd be thankful.


Here the error I am recieving:

ignored attr: {}version
ignored attr: {}abstract
ignored attr: {}default
/usr/lib/ruby/1.8/wsdl/operation.rb:67:in `outputparts': undefined
method `find_message' for nil:NilClass (NoMethodError)
	from /usr/lib/ruby/1.8/wsdl/soap/methodDefCreator.rb:72:in
`collect_documentparameter'
	from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:132:in `create_param_def'
	from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:101:in `add_operation'
	from /usr/lib/ruby/1.8/xsd/namedelements.rb:58:in `each'
	from /usr/lib/ruby/1.8/xsd/namedelements.rb:57:in `each'
	from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:96:in `add_operation'
	from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:40:in `create_rpc_driver'
	from ./test.rb:10


Here's my test script:

#!/usr/bin/ruby

require 'soap/wsdlDriver'

soapServer="http://10.0.1.231:8443"
systemServiceWSDL='/axis2/services/SystemService?wsdl'
wsdlURL="#{soapServer}#{systemServiceWSDL}"

factory = SOAP::WSDLDriverFactory.new(wsdlURL)
driver = factory.create_rpc_driver
driver.wiredump_dev = STDOUT

result = driver.LoginRequest(:domainName => "domain", :userName =>
"admin", :password => "password")

puts result


And here is the wsdl document I get from the remote server:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:impl="http://somewhere.com/webproxy/
systemservice" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://
schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="http://
somewhere.com/core" xmlns:ns="http://schemas.xmlsoap.org/soap/
encoding/" name="SystemService" targetNamespace="http://somewhere.com/
webproxy/systemservice">
	<wsdl:types>
		<xs:schema version="1.0" elementFormDefault="qualified"
targetNamespace="http://somewhere.com/webproxy/systemservice"
xmlns="http://somewhere.com/webproxy/systemservice" xmlns:core="http://
somewhere.com/core" xmlns:impl="http://somewhere.com/webproxy/
systemservice">
			<xs:import namespace="http://somewhere.com/core"
schemaLocation="common/BaseMessages.xsd"/>
			<xs:simpleType name="LoginStatusCodeType">
				<xs:restriction base="xs:token">
					<xs:enumeration value="Success"/>
					<xs:enumeration value="Failure"/>
					<xs:enumeration value="Challenge"/>
				</xs:restriction>
			</xs:simpleType>
			<xs:complexType name="LoginStatus">
				<xs:sequence>
					<xs:element name="status" type="impl:LoginStatusCodeType"/>
					<xs:element name="challenge" type="xs:string" minOccurs="0"/>
				</xs:sequence>
			</xs:complexType>
			<xs:element name="LoginRequest">
				<xs:annotation>
					<xs:documentation>Login into the system

domainName: the domain to login
userName: the user name
password: the password
                        </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:complexContent>
						<xs:extension base="core:SimpleRequestType">
							<xs:sequence>
								<xs:element name="domainName" type="xs:string"/>
								<xs:element name="userName" type="xs:string"/>
								<xs:element name="password" type="xs:string"/>
							</xs:sequence>
						</xs:extension>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
			<xs:complexType name="LoginResponseType">
				<xs:annotation>
					<xs:documentation>The response of the login request

loginStatus: if the status is Success, a valid token is returned for
requests followed, if the status is Challenge, the response to the
challenge shall be sent
authToken: the token used by the further requests
                        </xs:documentation>
				</xs:annotation>
				<xs:complexContent>
					<xs:extension base="core:SimpleResponseType">
						<xs:sequence>
							<xs:element name="loginStatus" type="impl:LoginStatus"/>
							<xs:element name="authToken" type="core:AuthTokenType"
minOccurs="0"/>
						</xs:sequence>
					</xs:extension>
				</xs:complexContent>
			</xs:complexType>
			<xs:element name="LoginResponse" type="impl:LoginResponseType"/>
			<xs:element name="RespondToChallengeRequest">
				<xs:annotation>
					<xs:documentation>Send the response to the challenge
                        </xs:documentation>
				</xs:annotation>
				<xs:complexType>
					<xs:complexContent>
						<xs:extension base="core:SimpleRequestType">
							<xs:sequence>
								<xs:element name="challengeResponse" type="xs:string"/>
							</xs:sequence>
						</xs:extension>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="RespondToChallengeResponse"
type="impl:LoginResponseType"/>
			<xs:element name="LogoutRequest">
				<xs:complexType>
					<xs:complexContent>
						<xs:extension base="core:SimpleRequestType"/>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
			<xs:complexType name="ServiceDescType">
				<xs:sequence>
					<xs:element name="name" type="xs:string"/>
					<xs:element name="version" type="xs:string"/>
					<xs:element name="definition" type="xs:string"/>
				</xs:sequence>
			</xs:complexType>
			<xs:element name="GetSystemInfoRequest">
				<xs:complexType>
					<xs:annotation>
						<xs:documentation>Get the system informations: the service
description and all the accessible domain ids and names. If no service
name is specified, return the service description of all services
                        </xs:documentation>
					</xs:annotation>
					<xs:complexContent>
						<xs:extension base="core:SimpleRequestType">
							<xs:sequence>
								<xs:element name="serviceName" type="xs:string" minOccurs="0"
maxOccurs="unbounded"/>
							</xs:sequence>
						</xs:extension>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="GetSystemInfoResponse">
				<xs:complexType>
					<xs:annotation>
						<xs:documentation>Return the service list and all the accessible
domain ids and names
                    </xs:documentation>
					</xs:annotation>
					<xs:complexContent>
						<xs:extension base="core:SimpleResponseType">
							<xs:sequence>
								<xs:element name="serviceDesc" type="impl:ServiceDescType"
minOccurs="0" maxOccurs="unbounded"/>
								<xs:element name="domainName" type="xs:string"
maxOccurs="unbounded"/>
								<xs:element name="domainId" type="xs:unsignedInt"
maxOccurs="unbounded"/>
							</xs:sequence>
						</xs:extension>
					</xs:complexContent>
				</xs:complexType>
			</xs:element>
		</xs:schema>
	</wsdl:types>
	<wsdl:message name="LoginRequest">
		<wsdl:part name="LoginRequest" element="impl:LoginRequest"/>
	</wsdl:message>
	<wsdl:message name="LoginResponse">
		<wsdl:part name="LoginRequest" element="impl:LoginResponse"/>
	</wsdl:message>
	<wsdl:message name="RespondToChallengeRequest">
		<wsdl:part name="RespondToChallengeRequest"
element="impl:RespondToChallengeRequest"/>
	</wsdl:message>
	<wsdl:message name="RespondToChallengeResponse">
		<wsdl:part name="RespondToChallengeResponse"
element="impl:RespondToChallengeResponse"/>
	</wsdl:message>
	<wsdl:message name="LogoutRequest">
		<wsdl:part name="LogoutRequest" element="impl:LogoutRequest"/>
	</wsdl:message>
	<wsdl:message name="GetSystemInfoRequest">
		<wsdl:part name="GetSystemInfoRequest"
element="impl:GetSystemInfoRequest"/>
	</wsdl:message>
	<wsdl:message name="GetSystemInfoResponse">
		<wsdl:part name="GetSystemInfoResponse"
element="impl:GetSystemInfoResponse"/>
	</wsdl:message>
	<wsdl:portType name="SystemPortType">
		<wsdl:operation name="LoginRequest">
			<wsdl:input message="impl:LoginRequest"/>
			<wsdl:output message="impl:LoginResponse"/>
		</wsdl:operation>
		<wsdl:operation name="RespondToChallengeRequest">
			<wsdl:input message="impl:RespondToChallengeRequest"/>
			<wsdl:output message="impl:RespondToChallengeResponse"/>
		</wsdl:operation>
		<wsdl:operation name="LogoutRequest">
			<wsdl:input message="impl:LogoutRequest"/>
		</wsdl:operation>
		<wsdl:operation name="GetSystemInfoRequest">
			<wsdl:input message="impl:GetSystemInfoRequest"/>
			<wsdl:output message="impl:GetSystemInfoResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="SystemSoapBinding" type="impl:SystemPortType">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/
soap/http"/>
		<wsdl:operation name="LoginRequest">
			<soap:operation soapAction="urn:#LoginRequest"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
		<wsdl:operation name="RespondToChallengeRequest">
			<soap:operation soapAction="urn:#RespondToChallengeRequest"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
		<wsdl:operation name="LogoutRequest">
			<soap:operation soapAction="urn:#LogoutRequest"/>
			<wsdl:input>
				<soap:body use="literal"/>
			</wsdl:input>
		</wsdl:operation>
		<wsdl:operation name="GetSystemInfoRequest">
			<soap:operation soapAction="urn:#GetSystemInfoRequest"/>
			<input>
				<soap:body use="literal"/>
			</input>
			<output>
				<soap:body use="literal"/>
			</output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="SystemService">
		<wsdl:port name="System" binding="impl:SystemSoapBinding">
			<soap:address location="http://localhost:8080/axis2/services/
SystemService"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>