Hi,
I'm trying to generate some friendly client code for accessing a
REST-ish webservice.
To that end, I wrote a WSDL2.0 description of the webservice, containing
the following operation:
<wsdl:operation name="getEvents"
pattern="http://www.w3.org/ns/wsdl/in-out"
style="http://www.w3.org/ns/wsdl/style/iri"
wsdlx:safe="true">
<wsdl:input element="lastfmgeo:getEventsRequest"/>
<wsdl:output element="lastfmgeo:lfm"/>
</wsdl:operation>
The request type is defined as follows:
<xs:element name="getEventsRequest" type="tns:getEventsRequestType">
<xs:annotation>
<xs:documentation>
The request element for the getEvents service.
</xs:documentation>
</xs:annotation>
</xs:element>
<complexType name="getEventsRequestType">
<sequence>
<element name="api_key" type="string" minOccurs="1" maxOccurs="1"/>
<element name="location" type="string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
I called wsdl2code on this (adb bindings), which generated a GeoStub. This
already works, like this:
GeoStub stub = new
GeoStub("http://ws.audioscrobbler.com/2.0/?method=geo.getevents");
GetEventsRequestType request = new
GetEventsRequestType();
request.setApi_key(apiKey);
request.setLocation(location);
GetEventsRequest requestDoc = new GetEventsRequest();
requestDoc.setGetEventsRequest(request);
LfmType response = stub.getEvents(requestDoc).getLfm();
However, it would of course be much nicer if it could look something like this:
GeoStub stub = new
GeoStub("http://ws.audioscrobbler.com/2.0/?method=geo.getevents");
LfmType response = stub.getEvents(apiKey, location);
Would it be possible to generate a friendly interface like this?
Kind regards,
Arnout
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]