You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ana Carolina Chaves Machado <ac...@gonzaga.cesar.org.br> on 2005/03/02 00:36:10 UTC

Doubts on WSDL design

Hi, 

I need implement the Web Service using the Document/Literal style (WSDL) 
based in following Java interface: 

public class AccessControlFacade { 

   public IServices getInstance();
   public User authenticateUser(String login, String password);
   public boolean authorizeService(User user, Service service);
   public Collection listServicesByUser(User user);
   public boolean authorizeOperation(User user, Service service, Operation 
operation);
   public Collection listOperationsByUser(User user, Service service);
   public Collection listUsersByProfile(Profile profile);
   public Collection listServicesByProfile(Profile profile);
} 

where 

public class User {
   private String name;
   private String email;
   private String login;
   private String password;
   private Profile activeProfile;
   private Collection profiles;
   private Collection operations;
} 

public class Profile{ 

 private int id;
 private String name;
 private String description;
 private Collection services;
 private Collection users; 

} 

public class Service {
 private int id;
 private String name;
 private String description;
 private Collection operations;
} 

public class Operation {
   private int id;
   private String name;
   private String description;
   private String link;
   private String operation;
   private Service service;
} 


My doubt is if the signature of the methods these coherent with the style
Document/Literal of Web services and also if the types, as Collection, is 
allowed to reach interoperabilidade. 

What I would have to modify it my Web service to reach interoperability?
In case that I want to use the style of programming Document-Literal Wrapped
what I would have to modify to reach the same objectives? 

I am confused in relation to this two styles and I would like to understand
using this practical example. 

Thanks for attention,
Ana Carolina 


Re: Doubts on WSDL design

Posted by Bill Keese <bi...@tech.beacon-it.co.jp>.
Hi Ana,

You should use an arrays rather than collections.  I recommend 
Document-Literal Wrapped .  As per the usual recommendation, you should 
write your WSDL file first, rather than writing the java classes first 
as you have done.  (Since you have already written java classes, I 
suggest you run Java2WSDL to generate a WSDL file, but from now on, you 
should edit that file manually, if necessary.


Bill

Ana Carolina Chaves Machado wrote:

> Hi,
> I need implement the Web Service using the Document/Literal style 
> (WSDL) based in following Java interface:
> public class AccessControlFacade {
>   public IServices getInstance();
>   public User authenticateUser(String login, String password);
>   public boolean authorizeService(User user, Service service);
>   public Collection listServicesByUser(User user);
>   public boolean authorizeOperation(User user, Service service, 
> Operation operation);
>   public Collection listOperationsByUser(User user, Service service);
>   public Collection listUsersByProfile(Profile profile);
>   public Collection listServicesByProfile(Profile profile);
> }
> where
> public class User {
>   private String name;
>   private String email;
>   private String login;
>   private String password;
>   private Profile activeProfile;
>   private Collection profiles;
>   private Collection operations;
> }
> public class Profile{
> private int id;
> private String name;
> private String description;
> private Collection services;
> private Collection users;
> }
> public class Service {
> private int id;
> private String name;
> private String description;
> private Collection operations;
> }
> public class Operation {
>   private int id;
>   private String name;
>   private String description;
>   private String link;
>   private String operation;
>   private Service service;
> }
>
> My doubt is if the signature of the methods these coherent with the style
> Document/Literal of Web services and also if the types, as Collection, 
> is allowed to reach interoperabilidade.
> What I would have to modify it my Web service to reach interoperability?
> In case that I want to use the style of programming Document-Literal 
> Wrapped
> what I would have to modify to reach the same objectives?
> I am confused in relation to this two styles and I would like to 
> understand
> using this practical example.
> Thanks for attention,
> Ana Carolina
>
>