in reply to SOAP Beginner ... I hate to impose

You can't pass the XML to the call like that you will need to build up your document using SOAP::Data and then use call you might have something rather like:

use strict; use SOAP::Lite +trace => 'all'; + my $ns = 'http://www.XXXXX.com/WebServices/HostService'; my $ep = 'http://localhost/'; + my $lite = SOAP::Lite->uri($ns)->proxy($ep)->on_action( sub { join "", + @_ } ); + $lite->autotype(0); $lite->soapversion('1.1'); + $lite->serializer()->namespaces({'http://schemas.xmlsoap.org/soap/enve +lope/' => 'soap'}); + + $lite->autotype(0); + + my $doc = SOAP::Data->name('doRateQuote')->uri($ns)->prefix('m'); + + my $value = SOAP::Data->value( SOAP::Data->name( WSRateQuoteHostRequest => \SOAP::Data->value(SOAP::Data->name( destZipCode => '038 +72' ), SOAP::Data->name( originZipCode => '30263' ), SOAP::Data->name( fmsLocationId => 'XXXXX' ) ))->type('ns100:WSRateQuoteHostRequest') ->attr({'xmlns:ns100' => "java:com.XXXXX.webservice"})); + + + + my $res = $lite->call($doc => $value); + print $res, "\n";
I have omitted most of the elements within WSRateQuoteHostRequest for clarity, but I guess you can work out where they have to go.

/J\

Replies are listed 'Best First'.
Re^2: SOAP Beginner ... I hate to impose
by hermonat (Initiate) on Feb 18, 2005 at 20:59 UTC
    Thank you so much for taking the time to look at this. I will look to try to apply your knowledge (I'm still digesting some of it) within the next 2 hours and I will report what I find back here.

    Hopefully I'll have some great news to share!

    From what I see, you've already filled in some of the many holes I have on this. Thanks again!

    Bill
      I'm still attempting to work through what you gave me, but I do have a question ... The variable $ep, for proxy ... what exactly is the job of the proxy link? I've tried to look it up, read about it, and apply to what I've been given. But so far it's just not coming across. Either that or I'm just being thick.

      With it being "localhost" as you suggested, it makes it my Apache server. Does that sound correct to you?

      Thanks again ... still plugging through!

      Bill
        Hmmm ... I may be stuck.

        I might be having some luck. It returned a lot of information, but these lines lead me to believe something came back:

        SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x8230390)
        SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Connection: close

        But what is confusing is that my Apache server default page is also being returned in this mixture, where I was expecting a relatively short response from their webservices server.

        And it actually doesn't make it through the call. It shows the Apache server default page, from my server I presume, and then it shows this error:

        at soap-try-3.pl line 51

        Not sure what this means. Line 51 is the call:

        my $res = $lite->call($doc => $value);

        Any clues?

        Thanks again,

        Bill

        No the proxy should be set to whatever your end point would be - as I didn't know what your setting of that should be and don't have a similar SOAP server - I just used 'localhost' as an example that the client could connect to (but obviously not work...)

        /J\