ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  A PHP Web Services Client
Subject:   Apache Axis
Date:   2003-09-12 11:37:46
From:   anonymous2
Adam, Using the guidelines in this article I am able to connect to web services running on Axis as long as they have simple parameters. My problems are in trying to consume services that take Arrays of Java Structures as parameters. For instance:
in java,
Magazine[] mags = new Magazine[2];
mags[0] = new Magazine("Harpers");
mags[1] = new Magazine("New Yorker");
buySubscriptions(2, mags);
in php,
$magOne = array(
'title' => 'Harpers',
);
$magTwo = array(
'title' => 'New Yorker',
);
$mags[0] = $magOne;
$mags[1] = $magTwo;
$params = array(
'count' => 2,
'mags' => $mags,
);
$response = $client->buySubscriptions($params);


This returns an org.xml.sax.SAXException: No deserializer defined for array type Struct


Any suggestions on how to get this working? Do I need to somehow map the magazine arrays' namespaces?


Thanks,
Ethan


1 to 1 of 1
  1. Adam Trachtenberg photo Apache Axis
    2003-09-22 07:58:15  Adam Trachtenberg | O'Reilly Author [View]

    • Apache Axis
      2003-11-04 05:58:45  anonymous2 [View]

    • Apache Axis
      2003-11-04 05:57:31  anonymous2 [View]

    • Apache Axis
      2003-11-04 05:57:00  anonymous2 [View]

    • Apache Axis
      2003-11-04 05:47:24  anonymous2 [View]

1 to 1 of 1