Hi David,

thanks for your reply.  I wasn't very clear on the post (my appologies) but I 
don't want to create a "Request" class to wrap the String.  I want the contents 
of the <id> tag to populate the String without the wrapper.  The reason being 
that I am using Spring to implement a service end point that uses jibx as the 
marshalling mechanism.

So my class implementing the Marshaller looks like:

import org.springframework.oxm.Marshaller;
import 
org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint;

public class JibxGetJobEndpoint extends AbstractMarshallingPayloadEndpoint {

    public JibxGetJobEndpoint( Marshaller marshaller ) {
        super( marshaller );
    }

    @Override
    protected Object invokeInternal( Object id ) throws Exception {
        System.out.println( "Received id: " + id );
        return getResult( id );
    }
}


As a result, I would really like jibx to unmarshall the <id> tag from my 
example directly into the id parameter (without having to introduce the Request 
wrapper you suggest).

Any ideas are greatly appreciated.

Thanks,

Javier.

--- On Mon, 11/10/08, David Newcomb <[EMAIL PROTECTED]> wrote:

> From: David Newcomb <[EMAIL PROTECTED]>
> Subject: Re: [jibx-users] Unmarshalling a tag to java.lang.String
> To: jibx-users@lists.sourceforge.net
> Received: Monday, November 10, 2008, 12:50 PM
> Something like the following should do the trick.
> [untested]
> 
> <binding>
>    <mapping name="request"
> class="uk.co.bigsoft.Request">
>     <value name="id" field="id"/>
>    </mapping>
> </binding>
> 
> 
> public class Request
> {
>   private String id ;
>   Request()
>   {
>   //
>   }
> 
>   public void setId(String id)
>   {
>    this.id = id;
>   }
> 
>   public String getId()
>   {
>    return id;
>   }
> }
> 
> 
> Regards,
> David
> 
> On Mon, 10 Nov 2008 J S <[EMAIL PROTECTED]> wrote:
> 
> > Hello:
> >
> > I would like the following XML snippet:
> >
> > <request>
> >     <id>foo</id>
> > </request>
> >
> > to be unmarshalled into an instance of
> java.lang.String, whose value is: foo
> > In other words, I'd like to be able to use
> java.lang.String as the   
> > top level class to be used as the target for the
> unmarshalling.
> >
> > If this is possible, can you please suppy a sample
> jibx mapping file  
> >  to accomplish this?
> >
> > Thanks...
> >
> >
> >      
> __________________________________________________________________
> > Looking for the perfect gift? Give the gift of Flickr!
> >
> > http://www.flickr.com/gift/
> >
> >
> -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> > Build the coolest Linux based applications with Moblin
> SDK & win great prizes
> > Grand prize is a trip for two to an Open Source event
> anywhere in the world
> >
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > jibx-users mailing list
> > jibx-users@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/jibx-users
> >
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users


      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your 
favourite sites. Download it now at
http://ca.toolbar.yahoo.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to