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

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) ) );

Replies are listed 'Best First'.
Re^5: SOAP::Lite headers
by Corion (Patriarch) on Jun 02, 2017 at 20:43 UTC

    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) )