Loading ...
Sorry, an error occurred while loading the content.

JAX-RPC and SOAP::Lite interoperability

Expand Messages
  • esc_in_wa
    We are using the Java Web Services Developer s Pack 1.3 to develop a web service. We are trying to use SOAP::Lite 0.55 to make calls to the Java web service.
    Message 1 of 1 , Oct 27, 2003
    • 0 Attachment
      We are using the Java Web Services Developer's Pack 1.3 to develop a
      web service. We are trying to use SOAP::Lite 0.55 to make calls to
      the Java web service.

      For simple argument types like strings, everything works as
      expected. However, when we try to pass an array of strings from Perl
      to JAX-RPC, we start to see problems. Calling the same service from
      Java with an array of strings works fine.

      The Java service is declared like this:

      ---

      <code>
      public interface FooIF extends Remote {

      public long theMethod(
      String param1,
      String param2,
      ArrayList arrayOfParams) throws RemoteException;

      }
      </code>

      The Perl code which calls this interface looks like this:

      <code>
      my $svc = SOAP::Lite->service('http://...?WSDL');
      my @items = ('param 1', 'param 2');
      my $retval = $svc->theMethod('foo', 'bar', \@items);
      print "retval was = ", $retval, "\n";
      </code>

      ---

      We see the following errors in the Tomcat log:

      SEVERE: unexpected array element type: expected=
      {http://www.w3.org/2001/XMLSchema}anyType, actual=
      {http://www.w3.org/1999/XMLSchema}string
      unexpected array element type: expected=
      {http://www.w3.org/2001/XMLSchema}anyType, actual=
      {http://www.w3.org/1999/XMLSchema}string

      After much Googling, I found a suggestion to add a call to xmlschema,
      like so:

      my $svc = SOAP::Lite->service('http://...')->xmlschema(2001);

      However, we still see errors:

      SEVERE: unexpected element type: expected={http://java.sun.com/jax-
      rpc-ri/internal}arrayList, actual=arrayList
      unexpected element type: expected={http://java.sun.com/jax-rpc-
      ri/internal}arrayList, actual=arrayList

      Any ideas on how to make JAX-RPC and SOAP::Lite communicate nicely?

      Thanks,
      --Eric
    Your message has been successfully submitted and would be delivered to recipients shortly.