Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > wsdl/operation.rb blowing up

Reply
Thread Tools

wsdl/operation.rb blowing up

 
 
Dan.McNulty@gmail.com
Guest
Posts: n/a
 
      07-10-2008

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", assword => "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/"
xmlnss="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">
<wsdlart name="LoginRequest" element="impl:LoginRequest"/>
</wsdl:message>
<wsdl:message name="LoginResponse">
<wsdlart name="LoginRequest" element="impl:LoginResponse"/>
</wsdl:message>
<wsdl:message name="RespondToChallengeRequest">
<wsdlart name="RespondToChallengeRequest"
element="impl:RespondToChallengeRequest"/>
</wsdl:message>
<wsdl:message name="RespondToChallengeResponse">
<wsdlart name="RespondToChallengeResponse"
element="impl:RespondToChallengeResponse"/>
</wsdl:message>
<wsdl:message name="LogoutRequest">
<wsdlart name="LogoutRequest" element="impl:LogoutRequest"/>
</wsdl:message>
<wsdl:message name="GetSystemInfoRequest">
<wsdlart name="GetSystemInfoRequest"
element="impl:GetSystemInfoRequest"/>
</wsdl:message>
<wsdl:message name="GetSystemInfoResponse">
<wsdlart name="GetSystemInfoResponse"
element="impl:GetSystemInfoResponse"/>
</wsdl:message>
<wsdlortType name="SystemPortType">
<wsdlperation name="LoginRequest">
<wsdl:input message="impl:LoginRequest"/>
<wsdlutput message="impl:LoginResponse"/>
</wsdlperation>
<wsdlperation name="RespondToChallengeRequest">
<wsdl:input message="impl:RespondToChallengeRequest"/>
<wsdlutput message="impl:RespondToChallengeResponse"/>
</wsdlperation>
<wsdlperation name="LogoutRequest">
<wsdl:input message="impl:LogoutRequest"/>
</wsdlperation>
<wsdlperation name="GetSystemInfoRequest">
<wsdl:input message="impl:GetSystemInfoRequest"/>
<wsdlutput message="impl:GetSystemInfoResponse"/>
</wsdlperation>
</wsdlortType>
<wsdl:binding name="SystemSoapBinding" type="impl:SystemPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/
soap/http"/>
<wsdlperation name="LoginRequest">
<soapperation soapAction="urn:#LoginRequest"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
</wsdlperation>
<wsdlperation name="RespondToChallengeRequest">
<soapperation soapAction="urn:#RespondToChallengeRequest"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
</wsdlperation>
<wsdlperation name="LogoutRequest">
<soapperation soapAction="urn:#LogoutRequest"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
</wsdlperation>
<wsdlperation name="GetSystemInfoRequest">
<soapperation soapAction="urn:#GetSystemInfoRequest"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="SystemService">
<wsdlort name="System" binding="impl:SystemSoapBinding">
<soap:address location="http://localhost:8080/axis2/services/
SystemService"/>
</wsdlort>
</wsdl:service>
</wsdl:definitions>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Response is not available in this context - page blowing rao ASP .Net 1 08-27-2004 10:55 PM
Purchasing Camera Experience...... Bad hair Day Rant - Blowing Off Steaml... BobS Digital Photography 2 08-21-2004 04:07 AM
Re: Deano explains that he's not bothered by his wife blowing hisfriends. =?iso-8859-1?Q?=B1?= Digital Photography 0 07-12-2004 07:57 AM
ASP net worker process blowing up !! Ashish ASP .Net 1 11-17-2003 05:18 PM
Blowing the doors to Palm - Java programming for Tungsten handhelds asj Java 138 09-01-2003 07:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57