axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sagi Mann <sagim...@gmail.com>
Subject Re: AxisFault when using jibx
Date Tue, 30 Sep 2008 10:00:21 GMT

Found a way to solve one part of the problem: explicitly set the namespace
for the return value:

    @WebMethod 
    @WebResult(targetNamespace="http://ws/")
    public String testOneArg(@WebParam(mode=Mode.IN, name="testOneArg0")
String name) { 
        return "Hello " + name; 
    } 

This added a 'qualified' keyword to the schema:

    <xs:complexType name="testOneArgResponse"> 
        <xs:sequence> 
            <xs:element name="return" type="xs:string" form="qualified"
minOccurs="0"></xs:element> 
        </xs:sequence> 
    </xs:complexType> 

Now, I don't get the exception any more, but the input parameter always
comes in as null. I know this by writing a debug message at the service
side. The client code is:

    public static void testOneArg(HelloServiceStub stub){
        try{
            ws.TestOneArg arg = new ws.TestOneArg();
            arg.setTestOneArg0("john"); 
            ws.TestOneArgResponse res = stub.testOneArg(arg);
// expected output is "Hello john" but I get "Hello null":
            System.out.println(res.getReturn());
        } catch(Exception e){
            e.printStackTrace();
            System.err.println("\n\n\n");
        }
    }

Any ideas? thanks...

-- 
View this message in context: http://www.nabble.com/AxisFault-when-using-jibx-tp19738701p19739246.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message