The magic string argument is either "IMAGE" or "THUMBNAIL"? Then use an
enum, e.g.
enum ImageSize { IMAGE, THUMBNAIL }
instead of the string. Enums are supported in the WSDL.
Werner
On 20.08.2007 06:02, Matthew Kerle wrote:
Hi all,
xfire: 1.2.6 (using JSR181 annotation factory)
java: 1.6.0_01
tomcat: 5.5.23
bit of a funny question, one of the methods exposed by my web service
requires the client to pass in a "magic string" so that the service can
route the request properly. the method asks for the bytes of an image by
it's id, and returns either the full image, or a thumbnail version of
the image depending on whether the client passed in the String "IMAGE"
or "THUMBNAIL".
Now, I don't want to write two methods to encapsulate this, I like the
current method, the only thing is that I want to expose the magic
strings to the client via the WSDL so that they don't need to magically
'know' the correct argument, they can just get it from their generated
stubs.
Does anyone know how to do this? I've tried just adding the fields to
the interface, but they aren't picked up by the WSDL (I restarted tomcat
after the edit, no change). Is there something else I should do? I'm
using jsr181 so maybe I'm missing an annotation?
@WebService
public interface ImageService {
public static final String THUMBNAIL = "THUMBNAIL";
public static final String IMAGE = "IMAGE";
//web service methods...
}
thanks!
--
* Matthew Kerle
* * IT Consultant *
* Canberra, Australia *
Mobile: +61404 096 863
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Web: Matthew Kerle <http://threebrightlights.blogspot.com/>
--------------------------------------------------------------------- To
unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email