from soap4r ML.
Hi, I'm developing a webservice client that should connect to an axis
webservice. Almost everything works fine, except for a specific service
which takes an enumeration as one of its parameters.
Here it is the wsdl part that defines the enum:
<simpleType name="QueryFilter">
<restriction base="xsd:string">
<enumeration value="FILTER_ALL"/>
<enumeration value="FILTER_VERIFIED"/>
<enumeration value="FILTER_NOT_VERIFIED"/>
<enumeration value="FILTER_SUGGESTED"/>
</restriction>
</simpleType>
I run wsdl2ruby script and everything worked fine. The QueryFilter type
is transformed into a module:
module QueryFilter
FILTER_ALL = "FILTER_ALL"
FILTER_NOT_VERIFIED = "FILTER_NOT_VERIFIED"
FiLTER_SUGGESTED = "FILTER_SUGGESTED"
FILTER_VERIFIED = "FILTER_VERIFIED"
end
When I try to connect to the service it complains about type
definitions and gives this message
org.xml.sax.SAXException: Bad types (class java.lang.String -> class
QueryFilter)
I run the script in debug mode and noticed that the QueryFilter
parameter is sent with type xsd:string:
...
<filter xsi:type="xsd:string">FILTER_ALL</filter>
...
I have a java client too and running it with axis soap monitor I can
see it uses this form for the same parameter:
...
<multiRef id="id1" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns3:QueryFilter" xmlns:ns3="urn:Quiew"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">FILTER_ALL</multiRef>
...
, where the multiRef id is referenced by a filter element.
Any hints on how I could solve the problem?
Thanks!