Author |
Message
|
alastor52 |
Posted: Tue Sep 30, 2008 8:14 am Post subject: WMB Web Service |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
I have developed a web service in WMB 6.1. I can call the web service from a test client and everything works fine. Now I want to allow others to view the WSDL so they can connect to the web service. However, when I try this url:
http://www.myserver.com/myservice?wsdl
I get a SOAP Fault error where I was expecting to have the WSDL returned.
Do I need to add something to my message flow? Does WMB not allow for the publishing of the WSDL? Any help would be appreciated.
Thanks  |
|
Back to top |
|
 |
bower5932 |
Posted: Tue Sep 30, 2008 8:25 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I remember discussions about this not being supported and that it might be a future enhancement. I don't remember where the discussions finally ended up. |
|
Back to top |
|
 |
broker_new |
Posted: Tue Sep 30, 2008 8:34 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
|
Back to top |
|
 |
alastor52 |
Posted: Tue Sep 30, 2008 4:02 pm Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
broker_new wrote: |
Let's see it working in future enhancements..  |
NNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!
Seems kind of silly that they would allow for the creation and hosting of web services in WMB and not include the ?wsdl functionality. |
|
Back to top |
|
 |
broker_new |
Posted: Tue Sep 30, 2008 4:26 pm Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
|
Back to top |
|
 |
alastor52 |
Posted: Thu Oct 02, 2008 6:39 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
broker_new wrote: |
Temporarily you can support the same functionality by exposing one more flow
http://www.myserver.com/myservice?wsdl as URL
which returns the schema values.Thats all we do can as of today..  |
Thanks. My brain had already started moving in that direction.
The problem I have now is that using an asterisk (*) in the 'Path suffix for URL' property of the HTTP Input node isn't working as described in the docs. I have several services that I thought I could serve up the WSDLs from a single flow if I set 'Path suffix for URL' to '/services/*'. Then I could make requests to http://localhost:7080/services/service1?wsdl, http://localhost:7080/services/service2?wsdl, etc.
However, it only returns the WSDL if I use the URL http://localhost:7080/services/*?wsdl. So instead of the asterisk working as a wildcard, it is working as a literal. Any suggestions?
Thanks! |
|
Back to top |
|
 |
alastor52 |
Posted: Mon Oct 06, 2008 4:28 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
Well I have found several posts that mention restarting the Broker TWICE after changing the 'Path suffix for URL' attribute of an HTTPInput node. I tried this and it worked. But WHY?!?!?!?!?
I can possibly see restarting Broker once to perhaps clear out some cache or something, but can anyone say why it needs to be restarted twice? I just need to understand. Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 06, 2008 7:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Because of the nature of the cache that needs to be cleared.
The bipHTTPListener process marks URLs that it hasn't served on during shutdown processing. It then marks those for deletion at the next shutdown.
Then it deletes them during startup. |
|
Back to top |
|
 |
alastor52 |
Posted: Mon Oct 06, 2008 7:42 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
AH! Well now that I know it kind of makes sense. I thought it was some sort of caching issue. Thanks for the info. I really appreciate it.
 |
|
Back to top |
|
 |
broker_new |
Posted: Thu Oct 16, 2008 6:52 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
i knew that Broker(WMB 6,WMB 6.1) doesn't support ?wsdl and taken it as a limitation.
Iam trying to expose a service http://localhost:7080/services/service1?wsdl (create a hardcoded response to return the WSDL for the user).
But when i tested the request is always going to /services/service1.
is there any replacement chars for ? in the URL like %20 for a space in URL. |
|
Back to top |
|
 |
alastor52 |
Posted: Thu Oct 16, 2008 7:02 am Post subject: |
|
|
Apprentice
Joined: 09 May 2006 Posts: 37
|
The way I implemented this is by creating a message flow like this:
HTTP Input --> Java Compute --> HTTP Reply
The 'Path suffix for URL' attribute on the HTTP Input node is set to /services/*. This way it can server up multiple WSDLs.
In my Java Compute node I grab the 'X-Query-String' and 'X-Original-HTTP-Command' values out of the HTTPInputHeader. If the first is equal to "wsdl" then I use the second to determine which WSDL to return. Then I simply ready the correct file in from the local file system and send it on to the HTTP Reply node. |
|
Back to top |
|
 |
broker_new |
Posted: Thu Oct 16, 2008 7:22 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
I followed your suggestions and configured the HTTP Input Node URL as /services/* when i tested with http://localhost:7080/services/add
the request is not been accepted by HTTP Input node, iam i doing something wrong here |
|
Back to top |
|
 |
broker_new |
Posted: Thu Oct 16, 2008 7:39 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
Excellent !!
Followed your foot steps bounced the broker twice and it worked well,
Thanks alastor52.
paranoid221 says
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
thats really true,Bouncing broker twice is hard to convince the Admins |
|
Back to top |
|
 |
|