in reply to SOAP::Lite problem

From the code above I am expecting that the XML layer of the http request would have the structure of @data as per my wsdl definition, but the output only show the following:

What would that look like? We can't guess what you want

wsdl

SOAP::Lite isn't great at WSDL, XML::Compile::SOAP is better at it

Replies are listed 'Best First'.
Re^2: SOAP::Lite problem
by doqb (Initiate) on Oct 19, 2015 at 21:57 UTC
    Thanks for your comments, if you see the code above, there is a @data array, that is the structure that it needs to be sent on the XML request, but as I showed the request does not contain those values for some reason. I tried to use XML::compile per your advise but I am getting stuck at the wsdl definition:
    use XML::Compile::WSDL11 (); my $wsdl = XML::Compile::WSDL11->new("http://10.230.0.22:7782/servi +ces/CBSInterfaceAccountMgrService?wsdl");
    When I execute the above I get the following error:
    error: file http://10.230.0.22:7782/services/CBSInterfaceAccountMgrSer +vice?wsdl does not exist
    Seems like the above declaration is expecting a local file? is there a way to define it as URL? -Thanks

      Thanks for your comments, if you see the code above, there is a @data array, that is the structure that it needs to be sent on the XML request, but as I showed the request does not contain those values for some reason.

      if the code you posted doesn't produce the xml you want, how will I guess what xml you want?

      I can't look at the code, it doesn't do what you want

      What can I look at to know what you want?

      You have to post the xml you want

      I tried to use XML::compile per your advise but I am getting stuck at the wsdl definition: Seems like the above declaration is expecting a local file? is there a way to define it as URL? -Thanks

      Give it a file :) it wants a file, give it a file -- the WSDL isn't supposed to change frequently, so getting a file from local disk is better

      But here is a hint from the docs

      So, on purpose you must explicitly load the files you need from local disk! (of course, it is simple to find one-liners as work-arounds, but I will not tell you how! See XML::Compile::SOAP::FAQ)
        Hello again :), here is the XML that the wsdl is expecting, I capture this from wireshark from another application:
        <?xml version="1 .0" encoding="UT F-8"?> <SOAP-ENV :Envelope xmlns: SOAP-ENV="http:/ /schemas.xmlsoap .org/soap/envelo pe/" xmlns:ns1=" http://www.huawei.com/bme/cbsint erface/common" xmlns:ns2="http:/ /www.huawei.com/bme/cbsinterface /cbs/accountmgr +" xmlns:ns3="http ://www.huawei.com/bme/cbsinterfa ce/cbs/accountmg +rmsg"> <SOAP-ENV: Body> <ns3:PaymentRequestMsg> <RequestHeader> <ns1: CommandId>Payment</ns1:CommandId> <ns1:Version>1< /ns1:Version> <ns1:TransactionId></ns1:TransactionId> <ns1:SequenceId>1</ns1:SequenceId> <ns1:RequestType>Event</ns1:RequestType> <ns1:SerialNo>eTopup_193</ns1:SerialNo> </RequestHeader> <PaymentRequest> <ns2:SubscriberNo>123</ns2:SubscriberNo> <ns2:PaymentAmt>100</ns2:PaymentAmt> <ns2:Pay mentMode>1001</ns2:PaymentMode> </PaymentRequest> </ns3:PaymentRequestMsg> </SOAP-ENV:Body> </SOAP-E NV:Envelope>