I am creating a POJO web service. I have created a class with a few external
methods that are exposed to the Web Service.

I am using PHP to consume the web services.

My first version of the class worked fine on both Windows and Linux. I added
a couple of methods to the class and updated the services.xml file to
include the new operations and now the Linux version breaks while the
Windows version works.

I have discovered that in the Windows version, the parameters to the web
methods are named the same as what I use in my Java methods (ie. sThreadID),
however in the newer Linux version, they are named param0. This does seem to
cause an issue with the java as the old version on Linux named the
parameters sThreadID and it worked fine.

Here's the php code to get the structures: 

    $types = $client->__getTypes();
    print_r($types);

Here's a partial listing:

Array
(
    [0] => struct deleteThreadReference {
 string param0;
}
    [1] => struct deleteThreadReferenceResponse {
 boolean return;
}
    [2] => struct isMsgEmpty {
 string param0;
}
    [3] => struct isMsgEmptyResponse {
 boolean return;
}

Note the structs where the parameter is named 'param0'. On my windows box,
it is named 'sThreadID' as it is named in the java method. Now in previous
versions of my code, it was named correctly on both Linux and Windows.

The naming seems quasi-random to me, and I'm not sure why it's happening.
This is causing the Linux-side to throw UnsatisfiedLinkErrors . In the
previous version where Linux did not rename the parameters, all worked fine.

In my working services.xml I actually name each operation as in:

<service name="RTA">
    <description>
        My service
    </description>
    <parameter name="ServiceClass"
locked="false">com.am.c.rt.rta</parameter>
    <operation name="va">
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";
                        
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </operation>
    <operation name="gva">
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";
                        
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
....

I have tried the shortened version where you leave out the operation names
and just list the messageReceivers. That version always generates the
'param0' named parameters.

Any ideas on why the exact same code would behave differently on Linux vs.
Windows? And also, any ideas on creating a services.xml file that will
generate the correct interface?
-- 
View this message in context: 
http://www.nabble.com/Behavior-on-Windows-vs.-Linux-tf3234226.html#a8986930
Sent from the Axis - User mailing list archive at Nabble.com.


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

Reply via email to