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

Re: [soaplite] accessing a jax-rpc web service with perl

Expand Messages
  • Eric Bridger
    You need to get familiar with the SOAP::Data object http://search.cpan.org/~byrne/SOAP-Lite/lib/SOAP/Data.pm#COMPLEX_TYPES which can be used to create an XML
    Message 1 of 2 , Sep 13 2:25 PM
    • 0 Attachment
      You need to get familiar with the SOAP::Data object

      http://search.cpan.org/~byrne/SOAP-Lite/lib/SOAP/Data.pm#COMPLEX_TYPES

      which can be used to create an XML version of a "Transaction" object,
      i.e. a complex type. You will need the XML of what the server expects a
      Transaction to look like.

      $transaction =
      SOAP::Data->name('foo' => \SOAP::Data->value(
      SOAP::Data->name('bar' => '123')));

      etc, etc. You can explicitly set the type of each element as well.

      Then $result = $client->executeWebService($transaction);

      On Wed, 2006-09-13 at 14:24, trracz wrote:
      > I'm trying to write a perl client to access to a web service written
      > in java and using JAX-RPC. My perl client is connecting to the web
      > service, but I can't get the complex types created properly. I am
      > getting the following error from the service:
      >
      > FAULT: JAXRPCTIE01: caught exception while handling request:
      > deserialization error: unexpected XML reader state. expected: END
      > but found: START: {urn:ws}accountName.
      >
      > I see this error in the logs generated by Tomcat as well, so it
      > seems that the perl client is actually connected to the service, but
      > just isn't passing the correct objects to the service.
      >
      > The remote method has the following signature:
      >
      > TransactionResponse executeWebService(Transaction transaction);
      >
      > Transaction has several objects in it, and each of those objects may
      > have other objects. They are all defined in the WSDL. I have a
      > java client that can access this web service in which I used
      > wscompile to produce classes from the wsdl. This is where I think
      > my problem is in perl. I don't know how to create perl objects that
      > SOAP can handle correctly. I tried using stubmaker.pl, but I don't
      > really understand how to use the module that it generates. I've
      > also read that stubmaker doesn't handle complex types well.
      >
      > Any help would be greatly appreciated.
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.