Help with Java web-service via Perl

Discussion in 'Perl' started by scjp, Feb 28, 2004.

  1. scjp

    scjp Guest

    Hey all,

    I recently wrote a few Java web-services. The first requires no parameters
    and works fine when I call it with SOAP::Lite.

    The second requires two Java String parameters. When I call it I get a
    [java.lang.NumberFormatException] error.

    Any ideas?

    Code follows:

    my $soap = SOAP::Lite
    -> uri('blah1')
    -> proxy('blah2');

    $barcode = '008660100207';
    $dept = '10';
    my $result = $soap->interactiveExample($barcode, $dept);

    unless ($result->fault)
    {
    print $result->result();
    } else
    {
    print "\n\nError\n";
    print join ', ',
    $result->faultcode,
    $result->faultstring,
    $result->faultdetail;
    }
    scjp, Feb 28, 2004
    #1
    1. Advertising

  2. scjp

    scjp Guest

    Apparently I needed to do this:

    $barcode = SOAP::Data->type( string => '008660100207' );
    $dept = SOAP::Data->type( string => '10' );

    "scjp" <> wrote in message
    news:sX80c.38099$n17.27275@clgrps13...
    > Hey all,
    >
    > I recently wrote a few Java web-services. The first requires no

    parameters
    > and works fine when I call it with SOAP::Lite.
    >
    > The second requires two Java String parameters. When I call it I get a
    > [java.lang.NumberFormatException] error.
    >
    > Any ideas?
    >
    > Code follows:
    >
    > my $soap = SOAP::Lite
    > -> uri('blah1')
    > -> proxy('blah2');
    >
    > $barcode = '008660100207';
    > $dept = '10';
    > my $result = $soap->interactiveExample($barcode, $dept);
    >
    > unless ($result->fault)
    > {
    > print $result->result();
    > } else
    > {
    > print "\n\nError\n";
    > print join ', ',
    > $result->faultcode,
    > $result->faultstring,
    > $result->faultdetail;
    > }
    >
    >
    >
    scjp, Feb 29, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hocho888
    Replies:
    1
    Views:
    608
  2. Michael Averstegge
    Replies:
    0
    Views:
    4,200
    Michael Averstegge
    Jan 10, 2006
  3. Rob
    Replies:
    3
    Views:
    491
    Steven Cheng[MSFT]
    Feb 3, 2006
  4. Replies:
    1
    Views:
    138
    Van den Driessche Willy
    Sep 20, 2006
  5. Leo Violette
    Replies:
    0
    Views:
    1,000
    Leo Violette
    Apr 17, 2009
Loading...

Share This Page