Nick

curious as to why your implementation does'nt work
could you supply your full WSDL (with the namespace and service declarations) ?

thanks,
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Thu, 25 Sep 2008 15:40:34 -0700
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: RESTfull web services with WSDL 2.0 - Resource
> 
> 
> Thanks for the article Keith.  I gave it a go and after no luck at first I
> noticed you specifically mention Axis2 1.4.1 and after upping from 1.4 to
> that, I'm now getting somewhere. I'm fairly sure I have never seen the step
> where you copy the WSDL to the service archive before.  This seems to be the
> major missing piece of the puzzle. Does the service really read back in the
> WSDL so that it knows how to map incoming REST-style requests?!?! I don't
> think I've seen a service consuming it's own WSDL like that but hey, it
> works! ...nearly
> 
> I'm still not quite there yet.  I cannot pass the value of parameters into
> the methods, I get a NPE and when I debug the service I find the value of
> the city String is null.  My WSDL is:
> <wsdl2:binding name="GigListingsServiceHttpBinding"
> interface="tns:ServiceInterface" whttp:methodDefault="GET"
> type="http://www.w3.org/ns/wsdl/http";>
>         <wsdl2:operation ref="tns:getGigsFor"
> whttp:location="artist/{artist}"/>
>         <wsdl2:operation ref="tns:getGigsIn" whttp:location="city/{city}"/>
>         <wsdl2:operation ref="tns:getMostActiveArtist"
> whttp:location="mostActive"/>
> </wsdl2:binding>
> 
> And the method is defined in the Java interface as:
> public Gig[] getGigsIn(String city);
> 
> I'm using an interface and implementation approach rather than just
> implementation as you have done in the article, could this be an issue? I
> tried changing the WSDL operation location to "city/{param0}" in case it was
> that old problem again but it didn't help. Any ideas? 
> 
> In the article I also noticed that towards the end you give an example of
> what the edited WSDL should look like at
> http://wso2.org/files/StudentService.wsdl but the whttp:locations in the
> HTTPBinding are the originals (pre-editing), is this intended?  And for some
> reason I don't have a <wsdl2:documentation>...</wsdl2:documentation> section
> in my WSDL like you do but I used the Java2WSDL tool - bit weird!  There's
> also a typo ("aloow") in the Future Directions section.  
> 
> Many thanks,
> Nick
> 
> 
> Keithgchapman wrote:
> > 
> > Hi Nick,
> > 
> > The article is now published on wso2.org. You can access it at [1]. As I
> > have stated in future directions in the article I plan to make it really
> > simple do to RESTfull services in Axis2. Somewhat similar to the way I
> > have
> > done it in the Mashup Server
> > <http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.html>
> > .
> > 
> > Please let me know what you think about it.
> > 
> > Thanks,
> > Keith.
> > 
> > [1] http://wso2.org/library/3726
> > [2]
> > http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.html
> > 
> > On Tue, Sep 23, 2008 at 10:32 PM, Nick Steel <
> > [EMAIL PROTECTED]> wrote:
> > 
> >>
> >> Keith,
> >> I currently have a POJO service which I then run through Java2WSDL to
> >> create
> >> a WSDL from.  But since I'm just firing off test requests using my
> >> browser
> >> I
> >> don't understand how a WSDL comes into play.  My problem is that I don't
> >> see
> >> how Axis knows that /{id} maps to that id parameter in the
> >> customerdetails
> >> method.  When using CXF I have to annotate the methods and the parameters
> >> so
> >> it knows whats going on....   But perhaps it will become clear with the
> >> new
> >> article and I look forward to reading that.
> >>
> >> Many thanks,
> >> Nick
> >>
> >>
> >> Keithgchapman wrote:
> >> >
> >> > Hi Nick,
> >> >
> >> > This is definitely possible and this feature is a part of Axis2 and not
> >> > the
> >> > Mashup Server. The only issue is that to do this in Axis2 you will have
> >> to
> >> > deploy your service using a WSDL. I suppose you have used a POJO
> >> approach,
> >> > and my article on doing this with Axis2 (Thats just around the corner)
> >> > will
> >> > describe how you can do this. (Use the java class to generate the WSDL,
> >> > where to edit it and how to deploy). I hope to have it ready within
> >> this
> >> > week.
> >> >
> >> > Thanks,
> >> > Keith.
> >> >
> >> > On Tue, Sep 23, 2008 at 4:30 PM, Nick Steel
> >> > <[EMAIL PROTECTED]
> >> >> wrote:
> >> >
> >> >>
> >> >> Hi Keith,
> >> >>
> >> >> Thanks for the pointer to the article but can you fill in some gaps
> >> for
> >> >> me?
> >> >>
> >> >> If I have a Java interface exposed as a vanilla Axis2 1.4 webservice
> >> with
> >> >> the following example method:
> >> >> public String[] customerdetails(String id) { .. }
> >> >> is it possible to then use REST and have a URL such as
> >> >> /some-endpoint/customerdetails/{id}?
> >> >> And then if I simply goto /some-endpoint/customerdetails/4 with my web
> >> >> browser should it work and populate the parameter with the value 4?
> >> Cause
> >> >> at
> >> >> the moment it doesn't and I can't understand how to fix this.
> >> >>
> >> >> In your article you say Axis uses the constant part of the
> >> httpLocation,
> >> >> so
> >> >> am I right in saying this would be "customerdetails" and Axis2 would
> >> use
> >> >> this to map to the customerdetails(String id) method that's defined in
> >> my
> >> >> service?  Or is this feature only possible with some additional magic
> >> in
> >> >> the
> >> >> mashup software?
> >> >>
> >> >> Cheers,
> >> >> Nick
> >> >>
> >> >>
> >> >> Keithgchapman wrote:
> >> >> >
> >> >> > Hi all,
> >> >> >
> >> >> > I've put a blog
> >> >> > post<
> >> >>
> >> http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.html
> >> >> >[1]
> >> >> > on the above subject. It will be a good resource for those of you
> >> who
> >> >> > want to do RESTfull web services with Axis2. BTW an article on how
> >> you
> >> >> > could
> >> >> > achieve this with Axis2 is just around the corner.
> >> >> >
> >> >> > Thanks,
> >> >> > Keith.
> >> >> >
> >> >> > [1]
> >> >> >
> >> >>
> >> http://www.keith-chapman.org/2008/09/restfull-mashup-with-wsdl-20-wso2.html
> >> >> >
> >> >> > --
> >> >> > Keith Chapman
> >> >> > Senior Software Engineer
> >> >> > WSO2 Inc.
> >> >> > Oxygenating the Web Service Platform.
> >> >> > http://wso2.org/
> >> >> >
> >> >> > blog: http://www.keith-chapman.org
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/RESTfull-web-services-with-WSDL-2.0---Resource-tp19620355p19625368.html
> >> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Keith Chapman
> >> > Senior Software Engineer
> >> > WSO2 Inc.
> >> > Oxygenating the Web Service Platform.
> >> > http://wso2.org/
> >> >
> >> > blog: http://www.keith-chapman.org
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/RESTfull-web-services-with-WSDL-2.0---Resource-tp19620355p19632300.html
> >> Sent from the Axis - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> > 
> > 
> > -- 
> > Keith Chapman
> > Senior Software Engineer
> > WSO2 Inc.
> > Oxygenating the Web Service Platform.
> > http://wso2.org/
> > 
> > blog: http://www.keith-chapman.org
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/RESTfull-web-services-with-WSDL-2.0---Resource-tp19620355p19679663.html
> Sent from the Axis - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_________________________________________________________________
See how Windows Mobile brings your life together—at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/

Reply via email to