Thanks R B.

I think my problem is that I didn't engage addressing both at client and server. Now I'm trying fix the problem. I started with Axis2 sample EchoNonBlockingDualClient. I put addressing-1.0.mar in the client classpath. Read archived mails in Axis2 mailinglist, I actually need to copy addressing-1.0.mar to the directory where axis2.jar is. Only putting addressing-1.0.mar in CLASSPATH environment variable won't work. So I engaged addressing sucessfully at the client side. The soap message is,

<?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>http://127.0.0.1:8080/axis2/services/MyService</wsa:To>
        <wsa:ReplyTo>
            <wsa:Address>
                http://192.168.2.110:6060/axis2/services/__ANONYMOUS_SERVICE__/__OPERATION_OUT_IN__
            </wsa:Address>
        </wsa:ReplyTo>
        <wsa:MessageID>
            urn:uuid:79588982FE3D3323FD11594838301071
        </wsa:MessageID>
        <wsa:Action>urn: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>

All addressing headers are there. It looks good to me.

At Axis2 server side, I have <module ref="addressing"> in axis2.xml and copied phaseorder tags from your email to the axis2.xml. But I still don't see addressing is being engaged. The soap message is,

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header />
    <soapenv:Body>
        <example1:echo xmlns:example1=" http://example1.org/example1"
            xmlns:tns="http://ws.apache.org/axis2">
            <example1:Text>Axis2 Echo String</example1:Text>
        </example1:echo>
    </soapenv:Body>
</soapenv:Envelope>

<soap:Header> is still empty. I don't know what I need to configure axis2 to engage addressing at server side.

Thanks for your help!
vike


On 9/28/06, R B <[EMAIL PROTECTED]> wrote:
Hi,

I don't know if it can help.

What I understood is that you try to access your service by using a SOAP session. As specified it the following document, you have to engage the adressing module on both sides (client and server), and change the scope of your service before engaging it. ( http://www.developer.com/services/article.php/3620661).

About setting the adressing module at the launch of Axis2, I think it is enabled by default. If it's not, you have to modify your axis2.xml file and have something like this (this is configured to enable SOAPMonitor as well):

<!-- ================================================= -->
    <!-- Global Modules  -->
    <!-- ================================================= -->
    <!-- Comment this to disable Addressing -->
    <module ref="addressing"/>
    <module ref="soapmonitor"/>
    <!--Configuring module , providing parameters for modules whether they refer or not-->
    <!--<moduleConfig name="addressing">-->
    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
    <!--</moduleConfig>-->

    <!-- ================================================= -->
    <!-- Phases  -->
    <!-- ================================================= -->
    <phaseOrder type="inflow">
        <!--  System pre defined phases       -->
        <phase name="Transport">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.engine.RequestURIBasedDispatcher ">
                <order phase="Dispatch"/>
            </handler>
            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher ">
                <order phase="Dispatch"/>
            </handler>
        </phase>
        <phase name="Security"/>
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.engine.AddressingBasedDispatcher ">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher ">
                <order phase="Dispatch"/>
            </handler>
            <handler name="InstanceDispatcher"
                     class="org.apache.axis2.engine.InstanceDispatcher ">
                <order phase="PostDispatch"/>
            </handler>
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.engine.RequestURIBasedDispatcher ">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher ">
                <order phase="Dispatch"/>
            </handler>
        </phase>
        <!--  System pre defined phases       -->
        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
        <phase name="OperationInPhase"/>
        <phase name="userphase1"/>
        <phase name="soapmonitorPhase"/>
    </phaseOrder>
    <phaseOrder type="outflow">
        <!--      user can add his own phases to this area  -->
        <phase name="OperationOutPhase"/>
        <!--system predefined phase-->
        <!--these phase will run irrespective of the service-->
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
        <phase name="userphase1"/>
        <phase name="soapmonitorPhase"/>
    </phaseOrder>
    <phaseOrder type="INfaultflow">
        <phase name="PreDispatch"/>
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase ">
            <handler name="RequestURIBasedDispatcher"
                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPActionBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="AddressingBasedDispatcher"
                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>

            <handler name="SOAPMessageBodyBasedDispatcher"
                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
                <order phase="Dispatch"/>
            </handler>
            <handler name="InstanceDispatcher"
                     class="org.apache.axis2.engine.InstanceDispatcher">
                <order phase="PostDispatch"/>
            </handler>
        </phase>
        <!--      user can add his own phases to this area  -->
        <phase name="OperationInFaultPhase"/>
        <phase name="userphase1"/>
        <phase name="soapmonitorPhase"/>
    </phaseOrder>
    <phaseOrder type="Outfaultflow">
        <!--      user can add his own phases to this area  -->
        <phase name="OperationOutFaultPhase"/>
        <phase name="PolicyDetermination"/>
        <phase name="MessageOut"/>
        <phase name="userphase1"/>
        <phase name="soapmonitorPhase"/>
    </phaseOrder>

Hope that can help,

RB


On 9/26/06, scott ken <[EMAIL PROTECTED]> wrote:
David,
I started the discussion using my yahoo email account. I suspect that Yahoo treats the Axis2 mailinglist

as a spam. My second email to the mailinglist was bounced back. Now I'm using my
Gmail account to continue asking questions. Thanks!


I engaged the addressing module from axis2 admin webpage. But it seems

not change the result. The request/reply soap messages are still the
same. Do you know what else steps I need to performa to make addressing

effect.

And another question is, if I don't want to engage addressing

dynamically from Axis2 admin servlet but want to do it in configuration files,
is it possible?

Thanks,
vick

David Illsley <

[EMAIL PROTECTED]> wrote: Looks to me like you need 

to engage the addressing module in the axis2
server so that there are addressing headers in the response. See the
Axis2 documentaton for how to do this.

David

On 21/09/06, scott ken wrote:
> My C# client (.dotNet
2.0 and WSE 3.0) generated the following SOAP
> message.
>
>
>
>
>
xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>
> xmlns:wsa=" http://schemas.xmlsoap.org/ws/2004/08/addressing
"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
"
> xmlns:xsd=" http://www.w3.org/2001/XMLSchema"
> xmlns:xop="http://www.w3.org/2004/08/xop/include
"
> xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/"
>
>
xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
">
>
>
>
> urn:uuid:8a8309c1-a21d-48ff-aa52-2647bb377cfc
>

>
>
>
>
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
>
>
>
> http://localhost:8080/axis2/services/CMBWebService

>
>
>
> wsu:Id="Timestamp-010f1103-934c-44fb-8778-1251c874e66e">
> 2006-09-20T23:12:21Z
> 2006-09-20T23:17:21Z
>
>
>
>

>
> ....
>
>
>
>
> The reply message from Axis2 server is
>
>
>
> xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/">
>
>
>
> ....

>
>
>
>
> The C# client encountered this exception
>
> Unhandled Exception:

> Microsoft.Web.Services3.Addressing.AddressingFault: Message
> Information Header Required ---> Micros
> oft.Web.Services3.Addressing.AddressingFormatException:
> WSE202: The
> Action header is required when other address headers

> are present.
> --- End of inner exception stack trace ---

> at
> Microsoft.Web.Services3.Addressing.AddressingHeaders.CheckValid()
> at
>
Microsoft.Web.Services3.Addressing.AddressingHeaders.Load
(SoapEnvelope
> envelope)
> at
Microsoft.Web.Services3.SoapEnvelope.PostLoad(Boolean
> loadAddressing)
> at Microsoft.Web.Services3.SoapEnvelope.PostLoad()
> at Microsoft.Web.Services3.SoapEnvelope.Load
(XmlReader
> reader)

> at
> Microsoft.Web.Services3.Mime.XopDocument.LoadStartPart(MimePart
> startPart)
> at
> Microsoft.Web.Services3.Mime.XopDocument.LoadFromXopPackage(String
> contentType, Stream stream)
> at
>
Microsoft.Web.Services3.Xml.SoapEnvelopeReaderWrapper..ctor(SoapClientMessage
> message, String messageContentType)
> at
>
Microsoft.Web.Services3.WebServicesClientProtocol.GetReaderForMessage

(SoapClientMessage
> message, Int32 bufferSize)
> at
>
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
> message, WebResponse response,
> Stream responseStream, Boolean asyncCall)


> at
> System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
> methodName, Object[] parameters)
>
> I guess it's about some configuration on client side or server
side.


> Can someone tell me what the fix is?
>
> Thanks in advance,
>
> vick
>
>
> ________________________________
> Stay in the know. Pulse on the new Yahoo.com. Check it out.
>
>


--
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------
Get your email and more, right on the new Yahoo.com
--0-1468242578-1159300441=:31885
Content-Type: text/html; charset=iso-8859-1

Content-Transfer-Encoding: 8bit

Hi, David,<br><br>I engaged the addressing module from axis2 admin

webpage. But it seems not change the result. The request/reply soap
messages are still the same. Do you know what else steps I need to performa to

make addressing effect. <br><br>And another question is, if I don't

want to engage addressing dynamically from Axis2 admin servlet but want to
do it in configuration files, is it
possible?<br><br>Thanks,<br>vick<br><br><b><i>David Illsley &lt;

[EMAIL PROTECTED]&gt;</i></b>

wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16,
255); margin-left: 5px; padding-left: 5px;"> Looks to me like you need to

engage the addressing module in the axis2<br>server so that there are

addressing headers in the response. See the<br>Axis2 documentaton for
how to do this.<br>David<br><br>On 21/09/06, scott ken

< [EMAIL PROTECTED]> wrote:<br>&gt; My C# client (.dotNet 2.0 and WSE
3.0) generated the following SOAP<br>&gt; message.<br>&gt;<br>&gt;
<br>&gt;
<soap:Envelope><br>&gt;<br>&gt;


xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"<br>&gt;<br>&gt;

xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing
"<br>&gt;
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"<br>&gt;
xmlns:xsd="http://www.w3.org/2001/XMLSchema
"<br>&gt;
xmlns:xop="
http://www.w3.org/2004/08/xop/include"<br>&gt;

xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/"<br>&gt;<br>&gt;
xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
"&gt;<br>&gt;
<soap:Header><br>&gt; <wsa:Action><br>&gt; <wsa:MessageID><br>&gt;

urn:uuid:8a8309c1-a21d-48ff-aa52-2647bb377cfc<br>&gt;

</wsa:MessageID><br>&gt; <wsa:ReplyTo><br>&gt; <wsa:Address><br>&gt;<br>&gt;
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous<br>&gt;
</wsa:Address><br>&gt; </wsa:ReplyTo><br>&gt; <wsa:To><br>&gt;
http://localhost:8080/axis2/services/CMBWebService<br>&gt;
</wsa:To><br>&gt; <wsse:Security><br>&gt; <wsu:Timestamp><br>&gt;
wsu:Id="Timestamp-010f1103-934c-44fb-8778-1251c874e66e"&gt;<br>&gt;


<wsu:Created>2006-09-20T23:12:21Z</wsu:Created><br>&gt;
<wsu:Expires>2006-09-20T23:17:21Z</wsu:Expires><br>&gt; </wsu:Timestamp><br>&gt;
</wsse:Security><br>&gt; </wsa:Action><br>&gt; <soap:Body><br>&gt;


<MyAppRequest><br>&gt; ....<br>&gt; </MyAppRequest><br>&gt;
</soap:Body><br>&gt; </soap:Header><br>&gt;<br>&gt; The reply


message from Axis2 server is<br>&gt;<br>&gt; <br>&gt;
<soapenv:Envelope><br>&gt;
xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"&gt;<br>&gt; <soapenv:Header><br>&gt; <soapenv:Body><br>&gt;
<MyAppReply><br>&gt; ....<br>&gt; </MyAppReply><br>&gt;


</soapenv:Body><br>&gt; </soapenv:Header><br>&gt;<br>&gt; The C# client
encountered this exception<br>&gt;<br>&gt; Unhandled Exception:<br>&gt;


Microsoft.Web.Services3.Addressing.AddressingFault:
Message<br>&gt; Information Header Required ---&gt; Micros<br>&gt;
oft.Web.Services3.Addressing.AddressingFormatException :
<br>&gt; WSE202:

The<br>&gt; Action header is required when other address headers<br>&gt;
are present.<br>&gt; --- End of inner exception stack trace
---<br>&gt; at<br>&gt;


Microsoft.Web.Services3.Addressing.AddressingHeaders.CheckValid()<br>&gt; at<br>&gt;
Microsoft.Web.Services3.Addressing.AddressingHeaders.Load(SoapEnvelope<br>&gt; envelope)<br>&gt; at


Microsoft.Web.Services3.SoapEnvelope.PostLoad(Boolean<br>&gt;
loadAddressing)<br>&gt; at
Microsoft.Web.Services3.SoapEnvelope.PostLoad()<br>&gt; at Microsoft.Web.Services3.SoapEnvelope.Load

(XmlReader<br>&gt;
reader)<br>&gt; at<br>&gt;
Microsoft.Web.Services3.Mime.XopDocument.LoadStartPart(MimePart<br>&gt; startPart)<br>&gt; at<br>&gt;


Microsoft.Web.Services3.Mime.XopDocument.LoadFromXopPackage(String<br>&gt;
contentType, Stream stream)<br>&gt; at<br>&gt;

Microsoft.Web.Services3.Xml.SoapEnvelopeReaderWrapper..ctor
(SoapClientMessage<br>&gt; message, String messageContentType)<br>&gt;
at<br>&gt;
Microsoft.Web.Services3.WebServicesClientProtocol.GetReaderForMessage(SoapClientMessage<br>&gt; message, Int32 bufferSize)<br>&gt;


at<br>&gt;
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage<br>&gt; message, WebResponse response,<br>&gt;
Stream responseStream, Boolean asyncCall)<br>&gt; at<br>&gt;


System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String<br>&gt;
methodName, Object[] parameters)<br>&gt;<br>&gt; I guess it's about some
configuration on client side or server side.<br>&gt; Can someone tell me


what the fix is?<br>&gt;<br>&gt; Thanks in advance,<br>&gt;<br>&gt;
vick<br>&gt;<br>&gt;<br>&gt; ________________________________<br>&gt;


Stay in the know. Pulse on the new Yahoo.com. Check it
out.<br>&gt;<br>&gt;<br><br><br>-- <br>David Illsley - IBM Web Services


Development<br><br>---------------------------------------------------------------------<br>To unsubscribe, e-mail:

[EMAIL PROTECTED]
<br>For additional commands, e-mail:
[EMAIL PROTECTED]<br><br></soapenv:Envelope></soap:Envelope></ [EMAIL PROTECTED]></blockquote><br><p>
<hr size=1>Get your email and more, right on the <a
href="" href="http://us.rd.yahoo.com/evt=42973/*http://www.yahoo.com/preview" target="_blank" > http://us.rd.yahoo.com/evt=42973/*http://www.yahoo.com/preview"> new
Yahoo.com</a>

--0-1468242578-1159300441=:31885--


Reply via email to