NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
sending php array to java axis webservice


Joined: 06 Mar 2009
Posts: 1
Reply with quote
Hi,

I am developing web service between php and Java. After researching on the net I have found some example.

passing php parameters via soap

Code:
$param = array(7,5);
$client = new nusoapclient('http://pc3:81/axis/services/ArrayTest?wsdl',true);
  $order_guid = $client->call('add',  $param);



In the Java side I found the following code

Code:
public int add(int i1, int i2)
    {
       MessageContext context = MessageContext.getCurrentContext();
        File file = new File("c:\\message.xml");
        try
        {
            FileOutputStream output = new FileOutputStream(file);
            context.getMessage().writeTo(output);
            output.close();
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
        return i1 + i2;
    }




My question is If my php code
Code:

$paramline = array ('line1' => array( 'id' => 10001, 'amt'=>200.22),
                               'line2'=> array('id' =>100002,'amt'=>300.22)
                         );




What would be the java function add parameter and how to implement that.

public int add(??????)

Thanks and Best regards.
View user's profileFind all posts by asifisyedSend private message
sending php array to java axis webservice
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic