You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Zampella Luigi <Lu...@italtel.it> on 2007/06/25 14:26:26 UTC

PullPoint: GetMessages(int maxNumber)

Hi,

the Web Services Base Notification 1.3 (WS-BaseNotification) Committee
Specification, 31 July 2006, declares the format of GetMessages request:

 

<wsnt:GetMessages> 

<wsnt:MaximumNumber>xsd:nonNegativeInteger</wsnt:MaximumNumber> ? 

{any} * 

</wsnt:GetMessages> 

 

 

Muse 2.0.0 and Muse 2.2.0 release the PullPoint interface is following:

 

    /**

     * 

     * @see PullPointDataStore#getMessages(int)

     *

     */

    NotificationMessage[] getMessages(int maxNumber)

        throws UnableToGetMessagesFault;

 

The {any} element is not present in the method signature. Why?

 

Thanks

 

Luigi

 

    




 

 


Internet Email Confidentiality Footer
-----------------------------------------------------------------------------------------------------
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e' vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto. 

This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred. 
-----------------------------------------------------------------------------------------------------


Re: R: PullPoint: GetMessages(int maxNumber)

Posted by Daniel Jemiolo <da...@us.ibm.com>.





This would complicate the routing code quite a bit, as instead of using
just the Java method signature and SOAP message for parsing/routing, we'd
need to go back and look at the resource's WSDL as well, and see if it had
an xsd:any at the end of the given operation, copy the last N parameters
into a dummy DOM Element, and make the call. We'd also need logic to
determine if a SOAP message had N parameters that fit the foo(param1,
param2, ..., paramN) model or if the last one was part of an xsd:any and
needed to be 'wrapped'. In all, I fear it would be rather shaky and hard to
debug.

A better solution might be this: the default implementation class
(SimplePullPoint) doesn't do anything with the data that might be in that
xsd:any slot, so presumably you're already writing your own class to handle
extra parameters. I suggest writing an implementation of the PullPoint
interface that simply forwards to an instance of SimplePullPoint, doing
whatever additional processing you need before/after. Using encapsulation
instead of inheritance will help you avoid the problem of having two
getMessages() methods in your PullPoint interface.

Dan



"Zampella Luigi" <Lu...@italtel.it> wrote on 06/25/2007 09:40:25
AM:

> Yes, it is right.
>
> Thanks
> Luigi
>
>
> -----Messaggio originale-----
> Da: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Inviato: lunedì 25 giugno 2007 14.43
> A: muse-user@ws.apache.org
> Oggetto: Re: PullPoint: GetMessages(int maxNumber)
>
> This is true of a few other WS-* operations. The main reason is that Muse
> invokes your Java code by using the WS-A Action to find the right Java
> method; it then uses the number/type of parameters in the Java method to
> determine how it should deserialize the SOAP body. Without this system,
we
> would have to use some kind of mapping/binding file, like in JAX-RPC, and
> we still would not have variable parameters (because Java 1.4.x doesn't).
> I think what you want is for Muse to recognize when an operation has an
> xsd:any and then lump any remaining parameter elements under one Element,
> so we can invoke a method like getMessages(int, Element). This is the
only
> way I can see this working given that Java 1.4.x doesn't have variable
> args. Is this right?
>
> Dan
>
>
> "Zampella Luigi" <Lu...@italtel.it> wrote on 06/25/2007 08:26:26
> AM:
>
> > Hi,
> >
> > the Web Services Base Notification 1.3 (WS-BaseNotification) Committee
> > Specification, 31 July 2006, declares the format of GetMessages
request:
> >
> >
> >
> > <wsnt:GetMessages>
> >
> > <wsnt:MaximumNumber>xsd:nonNegativeInteger</wsnt:MaximumNumber> ?
> >
> > {any} *
> >
> > </wsnt:GetMessages>
> >
> >
> >
> >
> >
> > Muse 2.0.0 and Muse 2.2.0 release the PullPoint interface is following:
> >
> >
> >
> >     /**
> >
> >      *
> >
> >      * @see PullPointDataStore#getMessages(int)
> >
> >      *
> >
> >      */
> >
> >     NotificationMessage[] getMessages(int maxNumber)
> >
> >         throws UnableToGetMessagesFault;
> >
> >
> >
> > The {any} element is not present in the method signature. Why?
> >
> >
> >
> > Thanks
> >
> >
> >
> > Luigi
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Internet Email Confidentiality Footer
> >
>
-----------------------------------------------------------------------------------------------------

>
> > La presente comunicazione, con le informazioni in essa contenute e
> > ogni documento o file allegato, e' rivolta unicamente alla/e
> > persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a
> > riceverla. Se non siete i destinatari/autorizzati siete avvisati che
> > qualsiasi azione, copia, comunicazione, divulgazione o simili basate
> > sul contenuto di tali informazioni e' vietata e potrebbe essere
> > contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia
> > di protezione dei dati personali). Se avete ricevuto questa
> > comunicazione per errore, vi preghiamo di darne immediata notizia al
> > mittente e di distruggere il messaggio originale e ogni file
> > allegato senza farne copia alcuna o riprodurne in alcun modo il
> contenuto.
> >
> > This e-mail and its attachments are intended for the addressee(s)
> > only and are confidential and/or may contain legally privileged
> > information. If you have received this message by mistake or are not
> > one of the addressees above, you may take no action based on it, and
> > you may not copy or show it to anyone; please reply to this e-mail
> > and point out the error which has occurred.
> >
>
-----------------------------------------------------------------------------------------------------

>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
>

R: PullPoint: GetMessages(int maxNumber)

Posted by Zampella Luigi <Lu...@italtel.it>.
Yes, it is right.

Thanks
Luigi


-----Messaggio originale-----
Da: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Inviato: lunedì 25 giugno 2007 14.43
A: muse-user@ws.apache.org
Oggetto: Re: PullPoint: GetMessages(int maxNumber)

This is true of a few other WS-* operations. The main reason is that Muse
invokes your Java code by using the WS-A Action to find the right Java
method; it then uses the number/type of parameters in the Java method to
determine how it should deserialize the SOAP body. Without this system, we
would have to use some kind of mapping/binding file, like in JAX-RPC, and
we still would not have variable parameters (because Java 1.4.x doesn't).
I think what you want is for Muse to recognize when an operation has an
xsd:any and then lump any remaining parameter elements under one Element,
so we can invoke a method like getMessages(int, Element). This is the only
way I can see this working given that Java 1.4.x doesn't have variable
args. Is this right?

Dan


"Zampella Luigi" <Lu...@italtel.it> wrote on 06/25/2007 08:26:26
AM:

> Hi,
>
> the Web Services Base Notification 1.3 (WS-BaseNotification) Committee
> Specification, 31 July 2006, declares the format of GetMessages request:
>
>
>
> <wsnt:GetMessages>
>
> <wsnt:MaximumNumber>xsd:nonNegativeInteger</wsnt:MaximumNumber> ?
>
> {any} *
>
> </wsnt:GetMessages>
>
>
>
>
>
> Muse 2.0.0 and Muse 2.2.0 release the PullPoint interface is following:
>
>
>
>     /**
>
>      *
>
>      * @see PullPointDataStore#getMessages(int)
>
>      *
>
>      */
>
>     NotificationMessage[] getMessages(int maxNumber)
>
>         throws UnableToGetMessagesFault;
>
>
>
> The {any} element is not present in the method signature. Why?
>
>
>
> Thanks
>
>
>
> Luigi
>
>
>
>
>
>
>
>
>
>
>
>
>
> Internet Email Confidentiality Footer
>
-----------------------------------------------------------------------------------------------------

> La presente comunicazione, con le informazioni in essa contenute e
> ogni documento o file allegato, e' rivolta unicamente alla/e
> persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a
> riceverla. Se non siete i destinatari/autorizzati siete avvisati che
> qualsiasi azione, copia, comunicazione, divulgazione o simili basate
> sul contenuto di tali informazioni e' vietata e potrebbe essere
> contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia
> di protezione dei dati personali). Se avete ricevuto questa
> comunicazione per errore, vi preghiamo di darne immediata notizia al
> mittente e di distruggere il messaggio originale e ogni file
> allegato senza farne copia alcuna o riprodurne in alcun modo il
contenuto.
>
> This e-mail and its attachments are intended for the addressee(s)
> only and are confidential and/or may contain legally privileged
> information. If you have received this message by mistake or are not
> one of the addressees above, you may take no action based on it, and
> you may not copy or show it to anyone; please reply to this e-mail
> and point out the error which has occurred.
>
-----------------------------------------------------------------------------------------------------

>

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: PullPoint: GetMessages(int maxNumber)

Posted by Daniel Jemiolo <da...@us.ibm.com>.





This is true of a few other WS-* operations. The main reason is that Muse
invokes your Java code by using the WS-A Action to find the right Java
method; it then uses the number/type of parameters in the Java method to
determine how it should deserialize the SOAP body. Without this system, we
would have to use some kind of mapping/binding file, like in JAX-RPC, and
we still would not have variable parameters (because Java 1.4.x doesn't).
I think what you want is for Muse to recognize when an operation has an
xsd:any and then lump any remaining parameter elements under one Element,
so we can invoke a method like getMessages(int, Element). This is the only
way I can see this working given that Java 1.4.x doesn't have variable
args. Is this right?

Dan


"Zampella Luigi" <Lu...@italtel.it> wrote on 06/25/2007 08:26:26
AM:

> Hi,
>
> the Web Services Base Notification 1.3 (WS-BaseNotification) Committee
> Specification, 31 July 2006, declares the format of GetMessages request:
>
>
>
> <wsnt:GetMessages>
>
> <wsnt:MaximumNumber>xsd:nonNegativeInteger</wsnt:MaximumNumber> ?
>
> {any} *
>
> </wsnt:GetMessages>
>
>
>
>
>
> Muse 2.0.0 and Muse 2.2.0 release the PullPoint interface is following:
>
>
>
>     /**
>
>      *
>
>      * @see PullPointDataStore#getMessages(int)
>
>      *
>
>      */
>
>     NotificationMessage[] getMessages(int maxNumber)
>
>         throws UnableToGetMessagesFault;
>
>
>
> The {any} element is not present in the method signature. Why?
>
>
>
> Thanks
>
>
>
> Luigi
>
>
>
>
>
>
>
>
>
>
>
>
>
> Internet Email Confidentiality Footer
>
-----------------------------------------------------------------------------------------------------

> La presente comunicazione, con le informazioni in essa contenute e
> ogni documento o file allegato, e' rivolta unicamente alla/e
> persona/e cui e' indirizzata ed alle altre da questa autorizzata/e a
> riceverla. Se non siete i destinatari/autorizzati siete avvisati che
> qualsiasi azione, copia, comunicazione, divulgazione o simili basate
> sul contenuto di tali informazioni e' vietata e potrebbe essere
> contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia
> di protezione dei dati personali). Se avete ricevuto questa
> comunicazione per errore, vi preghiamo di darne immediata notizia al
> mittente e di distruggere il messaggio originale e ogni file
> allegato senza farne copia alcuna o riprodurne in alcun modo il
contenuto.
>
> This e-mail and its attachments are intended for the addressee(s)
> only and are confidential and/or may contain legally privileged
> information. If you have received this message by mistake or are not
> one of the addressees above, you may take no action based on it, and
> you may not copy or show it to anyone; please reply to this e-mail
> and point out the error which has occurred.
>
-----------------------------------------------------------------------------------------------------

>