SOAP mapping error using Groupwise WSDL

60 views
Skip to first unread message

Steve

unread,
Sep 15, 2006, 12:28:41 PM9/15/06
to soap4r
I'm trying to log into a Groupwise web service using the Groupwise WSDL
(http://developer.novell.com/wiki/index.php/GroupWise_Web_Service_%28SOAP%29)
but I'm receiving this error :

Set XSD::XMLParser::XMLParser as XML processor.
Exception `LoadError' at
/usr/local/lib/site_ruby/1.8/http-access2.rb:31 - no such file to load
-- openssl
importing: http://localhost/groupwise.wsdl
importing: http://localhost/types.xsd
ignored element: {http://www.w3.org/2001/XMLSchema}maxInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}minInclusive of
WSDL::XMLSchema::SimpleRestriction
ignored attr: {}nillable
ignored element: {http://www.w3.org/2001/XMLSchema}minExclusive of
WSDL::XMLSchema::SimpleRestriction
ignored element: {http://www.w3.org/2001/XMLSchema}maxExclusive of
WSDL::XMLSchema::SimpleRestriction
ignored attr: {}default
ignored element: {http://www.w3.org/2001/XMLSchema}list of
WSDL::XMLSchema::SimpleType
importing: http://localhost/methods.xsd
ignored attr: {}nillable
ignored attr: {}default
importing: http://localhost/events.xsd
ignored attr: {}default
ignored element: {http://www.w3.org/2001/XMLSchema}list of
WSDL::XMLSchema::SimpleType
ignored attr: {}nillable
Exception `SOAP::Mapping::MappingError' at
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:90 - cannot find
type {http://www.w3.org/2001/XMLSchema}language
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:90:in
`obj2elesoap': cannot find type
{http://www.w3.org/2001/XMLSchema}language
(SOAP::Mapping::MappingError)
from
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:141:in
`complexobj2soap'
from /usr/lib/ruby/1.8/wsdl/xmlSchema/complexType.rb:56:in
`each_element'
from /usr/lib/ruby/1.8/wsdl/xmlSchema/complexType.rb:52:in
`each_element'
from
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:122:in
`complexobj2soap'
from
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:108:in
`obj2typesoap'
from
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:93:in
`obj2elesoap'
from
/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:39:in `obj2soap'
from /usr/lib/ruby/1.8/soap/mapping/mapping.rb:127:in
`_obj2soap'
... 8 levels...
from /usr/lib/ruby/1.8/soap/rpc/proxy.rb:123:in `call'
from /usr/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call'
from /usr/lib/ruby/1.8/soap/rpc/driver.rb:232:in `loginRequest'
from login.rb:17

The (primitive) code I'm using:

require 'soap/wsdlDriver'

WSDL_URL = "http://localhost/groupwise.wsdl"

param = {
'auth' => 'PlainText',
'language' => '',
'version' => '',
'username' => 'xxxx',
'password' => 'xxxx'
}

soap = SOAP::WSDLDriverFactory.new(WSDL_URL).create_rpc_driver


result = soap.loginRequest(param)

Can anybody point me in the right direction?

Thanks

tpo

unread,
Sep 16, 2006, 2:19:15 AM9/16/06
to soap4r

Steve wrote:
[..]

(http://developer.novell.com/wiki/index.php/GroupWise_Web_Service_%28SOAP%29)
> but I'm receiving this error :
>
> Set XSD::XMLParser::XMLParser as XML processor.

So apparently ruby doesn't find a matching xml processor by itself.

> Exception `LoadError' at
> /usr/local/lib/site_ruby/1.8/http-access2.rb:31 - no such file to load
> -- openssl

... and doesn't find its openssl module either...

I guess your ruby/soap4r installation went somehow wrong. I'd
reinstall.
*t

Steve

unread,
Sep 16, 2006, 5:21:04 AM9/16/06
to soap4r
Thanks for that. I've now re-installed and it has removed the two
errors below (openssl and XML processor).

However, the following error is still issued:

/usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:90:in
`obj2elesoap': cannot find type
{http://www.w3.org/2001/XMLSchema}language
(SOAP::Mapping::MappingError)

Now, I'm very new to XML and SOAP, but I think this is triggered when
processing the following from types.xsd:

<xs:element name="loginRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="auth" type="types:Authentication" />
<xs:element name="language" type="xs:language" />
<xs:element name="version" type="xs:decimal" />
<xs:element name="application" type="xs:string"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>

I believe the error is saying that type "language" is not defined in
the 2001 XMLSchema. However, when I look in that schema, I find (I
think) that type "language" IS defined:

<xs:simpleType name="language" id="language">
<xs:annotation>
<xs:documentation
source="http://www.w3.org/TR/xmlschema-2/#language"/>
</xs:annotation>
<xs:restriction base="xs:token">
<xs:pattern value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"
id="language.pattern">
<xs:annotation>
<xs:documentation source="http://www.ietf.org/rfc/rfc3066.txt">
pattern specifies the content of section 2.12 of XML 1.0e2
and RFC 3066 (Revised version of RFC 1766).
</xs:documentation>
</xs:annotation>
</xs:pattern>
</xs:restriction>
</xs:simpleType>


Am I way off in my assumptions? If not, what could be wrong?

Steve

unread,
Sep 18, 2006, 7:02:47 AM9/18/06
to soap4r
Just an update. Installing the latest soap4r tarball (soap4r-20060830)
fixed this problem.

Now I just need to work out how xsi:type tags are added when using
wsdl2ruby......

NAKAMURA, Hiroshi

unread,
Sep 24, 2006, 9:15:49 AM9/24/06
to soa...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Steve wrote:
> Thanks for that. I've now re-installed and it has removed the two
> errors below (openssl and XML processor).

You didn't have to re-install it. Those messages are dumped only when
you run ruby with -d option. Soap4r tries to detect http-access2 or
net/http for HTTP communication, REXML, xmlscan and XMLParser for XML
processing.

> However, the following error is still issued:
>
> /usr/lib/ruby/1.8/soap/mapping/wsdlliteralregistry.rb:90:in
> `obj2elesoap': cannot find type
> {http://www.w3.org/2001/XMLSchema}language
> (SOAP::Mapping::MappingError)

Hmm. Soap4r does not support following datatypes (including
xsd:language) for now.

#3.3.2 token
#3.3.3 language
#3.3.4 NMTOKEN
#3.3.5 NMTOKENS
#3.3.6 Name
#3.3.7 NCName
#3.3.8 ID
#3.3.9 IDREF
#3.3.10 IDREFS
#3.3.11 ENTITY
#3.3.12 ENTITIES

> Just an update. Installing the latest soap4r tarball (soap4r-20060830)
> fixed this problem.

Fixed? Really? Latest tarball does not support xsd:language, too...

> Now I just need to work out how xsi:type tags are added when using
> wsdl2ruby......

Can you explain what is the problem? What's the SOAP message you must
generate? What soap4r generates instead? Does
driver.generate_explicit_type = true
help?

Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)

iQEVAwUBRRaFBB9L2jg5EEGlAQLd9wgAo2SlJcKmovMBDdo7mdS2XmwLpSWAWfzB
i4VqTASJhDmUzeBj56xlc5tUH17NW4wjzcn8L+wJJsl4PBSJmZhMvSCEFYOm3B70
uaSUtxyy5R+u5L9bYI/YCQm5mUz5A0RXB2K4A9f5rEwhBkfTbx0kwIu6wseZpgUP
oXPDDQO3+M9eJtPhBjiPvdQONkfAL0rIOtdIpVX42urOoGhJvksCyw1dS6D9fcnk
nQ0b22QQwQz7KoqTX39Y3dGtvZGkTsdelVEImFPVXZGtzCGxjlso+rHLPUF/fnoO
k2C9Rm2EY5hfNCH4U7zrx13Xdvti1fUjNCTX0MchL0uxVLUXaHs62Q==
=HT+i
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages