Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question on wsa:Action="http://example.com/numbers/AddNumbersPortType/Result"

 
Steven Jiang
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone can help me with my question as follows.


My question is what is:
wsa:Action="http://example.com/numbers/AddNumbersPortType/Result"
for???

My project use it as well, I searched URL, can not find another reference, only defined in one place.

Thank you
Steven
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. wsa:Action, like SOAPAction, indicates the intent of the SOAP HTTP request. When applied to the message input (<input wsa:action="http://example.com/getDataRequest" />), Axis2 will use the information to find the operation to invoke.

Per this link, how the action information is used varies with the tool: "In WSE, the action URI is used to figure out what policy to apply to a message and how to dispatch to code (if you are using the low-level messaging API). In some tools, the action URI is not used for dispatching; they favor the name of the element in the message body instead." (WSE = WS-Eventing)

If you search for "Listing 14" at this link: "In Listing 14, we see the final response message with the expected result and the output action set in Listing 8." If you follow through the example, it seems that the Action URI associated with the output is actually used as the action in the response's Header section as you can see in the wsa:Action line in Listing 14. And this is what I have observed with GlassFish as well when I was performing some tests last night. So, if we annotate the web method like this:
then the SOAP Response might have a header section like this (or a :
If, instead of being returned to the sender of the request, the response is routed to the next node in a chain, the action may indicate to the next node what to do next. So based on this analysis (with almost no info available on the web), I am thinking that the output action is useful in a scenario where WS-Addressing is used to route SOAP data over multiple SOAP nodes in a chain. However, in my tests with GlassFish, it didn't look like the input action was being used for dispatching to the right method (as I had read about Axis). Instead, it looked like the input action made no difference at all, and maybe it was using the method name instead. Maybe I didn't do something right ... So I am still confused ... this time about how the input action is used in GlassFish.

Hope that helped a bit.
 
Steven Jiang
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your detailed response. it definitely helps me understand much more.

Appreciate it.
Steven
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic