Thanks again,
I'll try to modify the wsdl adding enumeration elements,
Regards,
Jorge Fernández
Glen Mazza <[EMAIL PROTECTED]> escribió: I'm still a web services newbie, but
that doesn't seem standard--having
client code rely on programmatic constructs present in the server code.
The client should not need to be aware of the internal architecture (or
even programming language) of the server.
I wonder if you could use an XML Schema enumeration facet in your
wsdl:types section to declare and limit the acceptable range of
commands. I have not done this before, however.
As for, "I would like to know how my client can have access to my
CodeOperations values so he knows what are the operations permitted and
which values are permitted." that seems like a need for UDDI in general,
although it may be overkill for your situation.
Glen
Am Donnerstag, den 08.03.2007, 12:45 +0100 schrieb Jorge Fernandez:
> Hi Glen,
>
> Thanks for your help. This tutorial is very interesting and I learned
> many things about wsdl but it didn't help in my case (or I didn't find
> the relationship) because my problem is that I have static final
> attributes in my data types like (maybe the sintax is wrong and it
> makes nosense the code but is something similar):
>
> public class CodeOperations{
> static final int getUserID=1;
> static final int getUserName=2;
> }
>
> And in my service I have an operation like:
>
> public String operationExample(int codeOperation) throws Exception{
> if(codeOperation==CodeOperations.getUserID){
> String response=getUserID();
> } else if(codeOperation==CodeOperations.getUserName){
> String response=getUserName();
> }else{
> throw new Exception("wrong operation");
> }
> }
>
> I would like to know how my client can have access to my
> CodeOperations values so he knows what are the operations permitted
> and which values are permitted. I don't know if this is possible from
> the wsdl.
>
>
> thanks and regards
>
> Jorge Fernandez
>
>
>
> Glen Mazza escribió:
> I'm unsure how much this will help you, but this tutorial[1],
> on page 6,
> listings 36 and 37, has auxiliary classes which are somehow
> linked to
> allow usage by java2wsdl. It may be similar to what you
> need--you can
> download the tutorial source code to find out.
>
> Glen
>
> [1]
>
> http://www-128.ibm.com/developerworks/edu/ws-dw-ws-understand-web-services2.html
>
>
> Am Mittwoch, den 07.03.2007, 15:04 +0100 schrieb Jorge
> Fernandez:
> > Hi,
> >
> > I would appreciate a lot if someone can give a hint on this:
> >
> > I'm building a web service with axis2 1.1.1 and I have some
> java
> > classes from which I generate a wsdl but I have some static
> or final
> > fields that I use like operation codes and I need the client
> could
> > know those specific values so he can send them to my web
> service. Is
> > there anyway for doing this??
> >
> > thanks and regards
> >
> > Jorge Fernandez
> >
> >
> >
> >
> >
> >
> ______________________________________________________________________
> >
> > LLama Gratis a cualquier PC del Mundo.
> > Llamadas a fijos y móviles desde 1 céntimo por minuto.
> > http://es.voice.yahoo.com
>
>
>
>
>
> ______________________________________________________________________
>
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com