WSProxy: nested fault error trying to call a SOAP service

113 Views Asked by At

I'm getting an error trying to call a SOAP service, the client provided a "sample" of the body content, however, with all the reshaping of that the best that I can get on an online XML validator is the following error:

WSProxy: nested fault: XML parse failed: libxml error: : level: 2, code: 201, file: none, line: 14, str1: "bo", str2: "concnt", str3: "", int1: 0, int2: 34, message: Namespace prefix bo on concnt is not defined

the request body is:


        <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:srt="http://external_svc.org/F6/wallet/bo">
           <soapenv:Header>
           <srtoken>B2B_#eyJ0eXAiOiJKV1QiLCKwCfciOiJSUzI1NiJ9.eyJpc3MiOiIxOEQzRUI4MDc3RDUzODY1MDY5QkU4NEVCNzI0QjEwNkFDOERFQkU2IiwianRpIjoiNWZmMTc3ODMtNjM4Zi00OTMyLTk2NDItYjZkOGU3YTMxZTAxIiwiaWF0IjoxNjI0MjY5MTkxLCJhYmkiOjMwNzUsIm1wbiI6IncxZDepIiwibXB2IjoxMDB9.P7k7kiDxmSw4Vo5lL6tYJur8sHLkdjiltVgUbB0sc3-CDDqKkFJC6CBu51K7qAvDs_blybTCq56Qs4fLlZLF2QN8CXrrBYHELwpkROPWmgi-GxZBxm-a2j9MFEpnd-bSJ6XF0fhl7LDv70zq8_ru9hoSzw271Ec77Xw57ZW5DJh-aWPdE2kceaR1uaT2zV79drdusAK4mVqxH2TstkMJ0qoWHJm0HDeqfeNRFTARBsawya_WQIlqNd8dvLPuZ6v1tiSznK9UG095xVFs33v9w8AAouT1G8PFECc_dkkJBw4-M1CDni0LlXEWXgezQJR9C6cVm9BgU86LwmN7ItN09dFgJE1z53g9PfTduJSxMZMKfVMK9EwDEn3kU8haZxhVvzvQBABWwLkDhBSBblBkvycqiMpGNLcbr5ydYp0nM8MVARTTOUCHT9193vzmM0UvUcpflOerKLmud2sz_XtjGQyS1q-ZjoUR5t6ttV9GN4MMUXUDCnc3bdplY3XgHumi-2pzEkbVerMOgUGsXBPPlDlFPVRPxWhQCteLGWyRxk4QF_fUOgEeWV4L-QAi4BZyG-r84LSIdRaawokCcHrPUEwomtq_ToRHC3q-3ysElwhJ5jdibz0YLgjDTzkJM3og5ZSnfPwi0vIq5GpXArVY3MN9MGCLg2LQkFqYWX4uLd4</srtoken>
           </soapenv:Header>
           <soapenv:Body>
              <bo:acquistoMerchant_xmlin>
                 <bo:w1eii pcFunz="CE" version="0100">
                   <bo:chiave />
                    <bo:attributi>
                       <bo:congr>99</bo:congr>
                       <bo:concat>983</bo:concat>
                       <bo:concnt>2</bo:concnt>
                       <!--Optional:-->
                       <bo:impeve>321</bo:impeve>
                       <bo:rifope>0999830000002_aa</bo:rifope>
                       <bo:idordine>IDSOUAP01_aa</bo:idordine>
                       <bo:cdgesec>927</bo:cdgesec>
                       <bo:opercorr>S</bo:opercorr>
                       <bo:ricarica>
                          <bo:catcpcl>330</bo:catcpcl>
                          <bo:cntcpcl>653426</bo:cntcpcl>
                          <bo:grpcpcl>850</bo:grpcpcl>
                          <bo:commisr>0</bo:commisr>
                          <bo:provever>CP</bo:provever>
                          <bo:destever>BE</bo:destever>
                       </bo:ricarica>
                       <bo:pagamento>
                          <bo:commisp>0</bo:commisp>
                          <bo:importp>321</bo:importp>
                          <bo:provevep>BE</bo:provevep>
                          <bo:destevep>ME</bo:destevep>
                          <bo:grpme>99</bo:grpme>
                          <bo:catme>983</bo:catme>
                          <bo:cntme>4</bo:cntme>
                          <bo:idpos>PV20210402143104982137</bo:idpos>
                       </bo:pagamento>
                    </bo:attributi>
                 </bo:w1eii>
              </bo:acquistoMerchant_xmlin>
           </soapenv:Body>
        </soapenv:Envelope>

anybody can see what's the error here?

1

There are 1 best solutions below

1
On

The namespace-prefix: bo has not been declared.

Depending on what the namespace-uri for bo should be, your soapenv:Envelope should look like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:bo="theUriForTheBoPrefix" xmlns:srt="http://external_svc.org/F6/wallet/bo"