4 Replies Latest reply on Jun 14, 2018 3:54 PM by Ganesh Gore

    Web service consumption Error

    Amit Patwal

      Hi Experts,

       

      We are trying to consume a SAP web service via SOAP UI, it giving below error:

       

      “<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

      <html>

      <head>

        <title>Error Report</title>

        <style>

          td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;}

          A:link {color : #0059AA;}

          A:visited {color : #999999;}

          A:active {color : #999999;}

        </style>

      </head>

      <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0">

        <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75">

          <tr bgcolor="#FFFFFF">

            <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>  401   Unauthorized</b></font></td>

          </tr>

          <tr bgcolor="#3F73A3">

            <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td>

            <td height="23"><img width=1 height=1 border=0 alt=""></td>

            <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP NetWeaver Application Server </b></font></td>

          </tr>

          <tr bgcolor="#9DCDFD">

            <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td>

          </tr>

        </table>

        <br><br><br><br><br><br>

        <p><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>  Error: Unauthorized</b></font></p>

        <p><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><b>  <a href="https://wiki.sdn.sap.com/wiki/x/wIN3Cw">SAP Technology Troubleshooting Guide</a></b></font></p>

        <p><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><table>

          <tr>

            <td valign="top"><b> Details:</b></td>

            <td valign="top"><PRE>No details available.</PRE></td>

          </tr>

        </table></font></p>

      </body>

      </html>”

       

      Please suggest what could be possible cause of the issue?

       

      Regards,

      AP

        • 1. Re: Web service consumption Error
          Sergey Smirnov

          Can you post example webservice code from soap ui to check?

          • 2. Re: Web service consumption Error
            Amit Patwal

            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:hcl-in:IF159:MM:Remedy-SRMS:C_CANONIC">

               <soapenv:Header/>

               <soapenv:Body>

                  <urn:cGoodsIssueRequest>

                     <DATA>

                        <DocumentDate>?</DocumentDate>

                        <PostingDate>?</PostingDate>

                        <MaterialSlip>?</MaterialSlip>

                        <!--1 or more repetitions:-->

                        <MaterialLineItem>

                           <MaterialNumber>?</MaterialNumber>

                           <Quantity>?</Quantity>

                           <MovementType>?</MovementType>

                           <Plant>?</Plant>

                           <!--Optional:-->

                           <StorageLocation>?</StorageLocation>

                           <!--Optional:-->

                           <VendorEmployee>?</VendorEmployee>

                           <!--Optional:-->

                           <CostCenter>?</CostCenter>

                           <!--Optional:-->

                           <SerialNo>?</SerialNo>

                           <!--Optional:-->

                           <WBSElement>?</WBSElement>

                           <!--Optional:-->

                           <AssetNoAUC>?</AssetNoAUC>

                        </MaterialLineItem>

                     </DATA>

                  </urn:cGoodsIssueRequest>

               </soapenv:Body>

            </soapenv:Envelope>

            • 3. Re: Web service consumption Error
              Igor Svetek

              Based on the web service code that you are sending and from the error you get, I would say that you are missing Header part (either username and password or ID tag) to authenticate yourself.

              • 4. Re: Web service consumption Error
                Ganesh Gore

                looks like you need make changes in webservice design and reconfigure the webservice:

                References:

                Authorization error while consuming web service in SOAP UI

                HTTP 401 – Unauthorized | SAP Blogs

                 

                and exctract from SOAP/HTTP error while calling/consuming a web service in ABAP System?

                • The credentials/security method should be checked, which are maintained in the logical port via SOA Manager (transaction SOAManager ->Service Administration->Web Service Configuration)
                • Consumer Proxy option should be selected and the Consumer Proxy Name should be specified.
                • The relevant configuration should be selected in the consumer system (Logical Port) ->display->Transport settings).