• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

SOAP JMS

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need to invoke a WS through soap/jms.I need to send the message over MQ and wait for response and read the message of the queue.I am running on jdk1.6 and used axis2 (ADB) to generate the client.I would like to know how to use the call back and connection pool operations.I have few questions like do i need to configure the mq on my server?,how do i need the connection?,how do i send the replyto queue name to the provider...etc.Can some one provide some insight and few examples.


Thanks
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Axis 2 support soap over jms. You can find this link useful. http://charithaka.blogspot.com/2008/10/soap-over-jms-with-axis2.html

I thinks axis 2 doesn't support soap over jms spec though.
 
sivaprasad pasupulathi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply tripathi.


But What i am looking for is a callback approach,where the handle comes to the client and waits for the repsponse.I am looking for AXIS2 ADB approach..etc.
If you have any information on these,could you please let me know.


Thanks
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AXIS ADB is used for data binding i.e mapping schema elements to java programming model. It has noting to do with soap over JMS. From your post I think you want to send request to jms queue and get the response back. You can use replyto property if you explicitly want to mention the response queue. Otherwise don't mention any reply to property and axis will create a temp queue for response and read response form there. Some time back I have written below mention code, but that is synchronous client i.e client will wait for the response as opposed to call back and pooling techniques which are inherently asynchronous. Try this and with little modification you can convert it to asynchronous. But if you still find it difficult let me know.


-SHIV
 
sivaprasad pasupulathi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shiv,

I tried few options and either of these did not work.Could you please let me know the missing pieces.

Method 1 :

I generated stubs through Axis2 wsdl2Java and after importing them,i found that the generated callback Handler did not contain all the method which other classes were refering to.I used Axis2 1.4.1 and i tried with 1.3 as well.Both had the same issue.The command which i used to generate the stub is

wsdl2Java -uri "C:\wsdl\abc" -d adb -u



Method 2:

I tried to check with the sample code which you have provided.But i Got

exception in thread "main" org.apache.axis2.Axisfault :Transport out has not been set .



here is the change which i added to the existing one



The other question i have here is,if you are to call a service,you need to know the implementations (methods in the service) to invoke it.Don't we need to generate stubs in this approach.

Thanks for your help.

 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Siva,

Regarding method 1,

If you want to generate stubs with asynchronous call you have to use -a option. I tried following command with axis 1.5.1 and was able to make asynchronous call.



If you notice I am using -t option which generate test cases as well.

Regarding you second question:

To not get transport out not found error you have to allow JMS transport in the axis2.xml file in the jar which is being used by your client code at runtime.

Regarding not using generated stub, there are couple of ways to call remote service. You can call a webservice directly using axis clent api without using stubs. But in this case you have to do data binding your self(generation of envelope etc.). If you see under the hood generated stubs do the same thing for you i.e use the axis client api to call remote service.

-shiv


 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOAP is for web service?


thanks in advance!
André AS
Brazil
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic