in reply to Re^2: SOAP::Lite headers
in thread SOAP::Lite headers

Hello again,

To update the module through CPAN is just cpan <module name>. It doesn't mean that this will solve your problem. There is a possibility that SOAP has been updated and requires a few new parameters and the current module that you are running has not been updated and not going to be. I. This case you need to search for a new more fresh module.

Hope this helps to guide you to the correct direction.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re^4: SOAP::Lite headers
by eukiph (Novice) on Jun 02, 2017 at 20:19 UTC
    Hi,
    so I have updated SOAP::Lite to current version (1.20) and, suprise suprise, no miracles happened :).
    I am not sure its gonna help, but here is a part of the code I think is relevant.
    I think that I need to redefine some headers in the SOAP::Transport class?
    our $customer_wsdl = "http://172.26.9.168:18120/OELAdapterWebService"; our $customer_endpoint = "http://172.26.9.168:18120/OELAdapterWebS +ervice"; our $customer_soapenv = "http://schemas.xmlsoap.org/soap/envelope/" +; our $customer_oel = "http://xxx.com/OELAdapter"; our $customer_soapAction = "\"/OELAdapter/ProcessDefinitions/Productio +n/Services/OELAdapter/SoapOverHttp/OELAdapter.serviceagent//ProcessOr +derAsync\""; our $customer_soap = SOAP::Lite ->proxy($customer_wsdl) ->uri($customer_endpoint) ->readable(1) ->autotype(0) ->on_action(sub{$customer_soapAction;}); $customer_soap->serializer->register_ns($customer_soapenv, 'soapenv'); $customer_soap->serializer->register_ns($customer_oel, 'oel'); our $customer_result = $customer_soap->call( SOAP::Data->name('oel:ProcessOrderAsyncRequest') => ( SOAP::Data->name('oel:ExternalId' => '1234'), SOAP::Data->name('oel:IncomingOrderSource' => 'Selfcare'), SOAP::Data->name('oel:IncomingOrderDescription' => 'abcd'), SOAP::Data->name('oel:RequiredNotification' => 'false'), SOAP::Data->name('oel:IncomingOrder' => $order) ) );

      Googling the error message this seems that what your Java server decodes is some kind of object while you should send something that it decodes to a plain string.

      Maybe you can fix that by making your data types explicit with SOAP::Lite. Maybe the following is enough?

      SOAP::Data->name('oel:ProcessOrderAsyncRequest') => ( SOAP::Data->name('oel:ExternalId')->type('int', '1234'), SOAP::Data->name('oel:IncomingOrderSource')->type('string', 'S +elfcare'), SOAP::Data->name('oel:IncomingOrderDescription')->type('string +', 'abcd'), SOAP::Data->name('oel:RequiredNotification')->type('string', ' +false'), SOAP::Data->name('oel:IncomingOrder' => $order) )