axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dong Liu" <edong...@gmail.com>
Subject [Axis2] dependency between addressing and SOAPAction
Date Mon, 10 Apr 2006 18:09:16 GMT
Hi, folks,

I observed dependency of addressing, SoapAction, wsa:Action, and
options.setAction(). Since /wsa:Action is REQUIRED element of addressing
header, I am not sure if the later client api needs to correlate the
sender.engageModule() and options.setAction() together.

When I do not specify the SoapAction part of a client with addressing
header, the server side will reply fault
"wsa:MessageAddressingHeaderRequired". However when I specify that,
everything will OK.

The messages are:
- without options.setAction()

> POST /axis2/services/MyService HTTP/1.1
> User-Agent: Axis/2.0
> SOAPAction: ""
> Host: 127.0.0.1:1234
> Transfer-Encoding: chunked
> Content-Type: text/xml; charset=UTF-8
>
> 2f0
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">
>       <soapenv:Header>
>          <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:1234/axis2/services/MyService
> </wsa:To>
>          <wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
>             <wsa:Address> http://www.w3.org/2005/08/addressing/anonymous
> </wsa:Address>
>          </wsa:ReplyTo>
>          <wsa:MessageID xmlns:wsa=" http://www.w3.org/2005/08/addressing
> ">urn:uuid:15DAFAE6E699AA75F611446912913181</wsa:MessageID>
>       </soapenv:Header>
>       <soapenv:Body>
>          <example1:echo xmlns:example1=" http://example1.org/example1">
>             <example1:Text>Axis2 Echo String </example1:Text>
>          </example1:echo>
>       </soapenv:Body>
>    </soapenv:Envelope>0


Reply

e17
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="
> http://www.w3.org/2005/08/addressing">
>       <soapenv:Header>
>          <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
> http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
>          <wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
>             <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous
> </wsa:Address>
>          </wsa:ReplyTo>
>          <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">urn:uuid:DA043614D7F126D98611446912917244</wsa:MessageID>
>          <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
> http://www.w3.org/2005/08/addressing/fault</wsa:Action>
>          <wsa:RelatesTo xmlns:wsa="http://www.w3.org/2005/08/addressing"
> wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply
> ">urn:uuid:15DAFAE6E699AA75F611446912913181</wsa:RelatesTo>
>          <wsa:FaultDetail xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">
>             <wsa:ProblemHeaderQName>wsa:Action</wsa:ProblemHeaderQName>
>          </wsa:FaultDetail>
>          <wsa:RelatesTo xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">urn:uuid:15DAFAE6E699AA75F611446912913181</wsa:RelatesTo>
>       </soapenv:Header>
>       <soapenv:Body>
>          <soapenv:Fault>
>             <faultcode>wsa:MessageAddressingHeaderRequired</faultcode>
>             <faultstring>A header representing a Message Addressing
> Property is not valid and the message cannot be processed</faultstring>
>             <detail>
>                <Exception xmlns="">org.apache.axis2.AxisFault: A header
> representing a Message Addressing Property is not valid and the message
> cannot be processed    at
> org.apache.axis2.handlers.addressing.AddressingInHandler.throwFault(
> AddressingInHandler.java:174)    at
> org.apache.axis2.handlers.addressing.AddressingInHandler.checkForMandatoryHeaders
> (AddressingInHandler.java:144)    at
> org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation
> (AddressingInHandler.java:137)    at
> org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(
> AddressingInHandler.java:73)    at org.apache.axis2.engine.Phase.invoke(
> Phase.java:378)    at org.apache.axis2.engine.AxisEngine.invoke(
> AxisEngine.java:427)    at org.apache.axis2.engine.AxisEngine.receive(
> AxisEngine.java:399)    at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
> HTTPTransportUtils.java:288)    at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)    at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
> at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
> WebApplicationHandler.java:473)    at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)    at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(
> WebApplicationContext.java:633)    at org.mortbay.http.HttpContext.handle(
> HttpContext.java:1482)    at org.mortbay.http.HttpServer.service(
> HttpServer.java:909)    at org.mortbay.http.HttpConnection.service(
> HttpConnection.java:816)    at org.mortbay.http.HttpConnection.handleNext(
> HttpConnection.java:982)    at org.mortbay.http.HttpConnection.handle(
> HttpConnection.java:833)    at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)    at
> org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java
> :534)</Exception>
>                <wsa:ProblemHeaderQName xmlns:wsa="
> http://www.w3.org/2005/08/addressing">wsa:Action</wsa:ProblemHeaderQName>
>             </detail>
>          </soapenv:Fault>
>       </soapenv:Body>
>    </soapenv:Envelope>0
>




-with options.setAction()

> POST /axis2/services/MyService HTTP/1.1
> User-Agent: Axis/2.0
> SOAPAction: echo
> Host: 127.0.0.1:1234
> Transfer-Encoding: chunked
> Content-Type: text/xml; charset=UTF-8
>
> 33e
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">
>       <soapenv:Header>
>          <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost:1234/axis2/services/MyService
> </wsa:To>
>          <wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/08/addressing">
>             <wsa:Address> http://www.w3.org/2005/08/addressing/anonymous
> </wsa:Address>
>          </wsa:ReplyTo>
>          <wsa:MessageID xmlns:wsa=" http://www.w3.org/2005/08/addressing
> ">urn:uuid:A8345391CD90696EEC11446915474281</wsa:MessageID>
>          <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">echo</wsa:Action>
>       </soapenv:Header>
>       <soapenv:Body>
>          <example1:echo xmlns:example1="http://example1.org/example1 ">
>             <example1:Text>Axis2 Echo String </example1:Text>
>          </example1:echo>
>       </soapenv:Body>
>    </soapenv:Envelope>0
>

Mime
View raw message