Hi Deepal,
Thanks for your reply.
I print the responsed OMElement and found it is not empty, and all the 
respected element are there. But the reason why I did not get the element from 
the OMElement is because the OMElement is a bad one, it looks like this:

<ns:autoUpdateResponse xmlns:ns="http:///xsd";><return><ns:response 
xmlns:ns="urn://fakenamespace"><ns:newVersion>yes</ns:newVersion></return></ns:autoUpdateResponse>

It is because of the "return", so OMElement.getChildElements() cannot continute 
to fetch the other element. I have no idea why there is a "return".

Also for the namespace, it seems that I have to use " http:///xsd";. If I change 
it to anything else, I will get the error as " org.apache.axis2.AxisFault: 
namespace mismatch require http:///xsd found http://client/xsd";

I have no idea where the " http:///xsd " comes?

Thanks,

David

-----Original Message-----
From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 08, 2006 6:50 PM
To: axis-dev@ws.apache.org
Subject: Re: about the reveiver in the services.xml

Hi David;
I wrote my service impl class as shown blow;
public class MyService {

    public OMElement echo(String a, String b) throws MyException {
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs =
fac.createOMNamespace("http://ws.apache.org/axis2/xsd";, "ns1");
        OMElement method = fac.createOMElement("add", omNs);
        OMElement value = fac.createOMElement("a", omNs);
        OMElement value2 = fac.createOMElement("b", omNs);
        method.addChild(value);
        method.addChild(value2);
        value.setText(a);
        value2.setText(b);
        return method;
    }

}

and use RPC Message receiver as the message receiver , and I got the
expected response to the client side as well.

PS:- You can not use RawXMLINOutMessageReceiver unless , your method
take OMElement as the argument.

Thanks
Deepal

> Hello,
>
>  
>
> I meet a problem as the following:
>
>  
>
> In the server side, the public method is like OMElement
> autoupdate(String a, String b). so what should be the receiver in the
> service.xml file?
>
>  
>
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver (I got the
> org.apache.axis2.AxisFault: argument type mismatch exception)
>
>  
>
> or
>
>  
>
> org.apache.axis2.rpc.receivers.RPCMessageReceiver (there is nothing in
> the return message)
>
>  
>
> Does anyone meet this kind of problem? Please help me to solve the
> problem.
>
>  
>
> Thanks in advance.
>
>  
>
> David
>
>  
>


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


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

Reply via email to