DreamT has asked for the wisdom of the Perl Monks concerning the following question:

Hi! I have used the stubmaker.pl to generate a stub for connecting to a webservice. This have given me a method looking like this:
... CreateOrder => { endpoint => '...', soapaction => '...', namespace => '...', parameters => [ SOAP::Data->new(name => 'InputOrderItem', type => 'tns:Order', a +ttr => {}), ], # end parameters }, # end CreateOrder ...
As you can see, it wants one single argument, but it wants it as an "object" (which I guess is a nested xml structure) that consists of parameters of different kind.

Furthermore, one of the parameters itself is an object (an orderLine-object consisting of - you guessed it - orderlines)

I know that the stubmaker doesn't always give the "right answer" (depending on the wsdl), but it would be neat if I could use my generated code as a foundation for the rest of my app. Do you have any ideas on this?

Replies are listed 'Best First'.
Re: Passing an object to SOAP method
by Anonymous Monk on Aug 25, 2009 at 13:29 UTC
      Thank you, I can see how you can create a good structure for it. 2 questions though:
      1. How do I apply this to my method call? my @result = CreateOrder ( $InputOrderItem );
      2. Is the "dummy service" included just to be able to create the soap object, or is it something that should be replaced with something else?
Re: Passing an object to SOAP method
by DreamT (Pilgrim) on Aug 25, 2009 at 15:59 UTC
    Anyone?