Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webservice Header Issue ( Authentication required )

Status
Not open for further replies.

WFadloun

Programmer
Aug 18, 2003
42
AE
Dears
I am developing client application to consume webservice, the webservice developer sent me the wsdl file and the sample SOAP request , all look fine for me

the issue that when I am trying to call the webservice it returns an error message ( Authentication Required ) but I am sending the user name and the password in the header as expected.

here is the Sample SOAP
XML:
<soapenv:Envelope xmlns:fax="[URL unfurl="true"]http://fax.po.ws.apps.oracle.xxdof/"[/URL] xmlns:soapenv="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/">[/URL]
   <soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"[/URL] xmlns:wsu="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken[/URL] wsu:Id="UsernameToken-5A2B82D9EE5888AE0414252886487322"><wsse:Username>username</wsse:Username><wsse:Password Type="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password><wsse:Nonce[/URL] EncodingType="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">jMqFQqEM30Yp+t3tP+8meg==</wsse:Nonce><wsu:Created>2015-03-02T09:30:48.732Z</wsu:Created></wsse:UsernameToken></wsse:Security></soapenv:Header>[/URL]
   <soapenv:Body>
      <fax:faxStatus>
         <!--Optional:-->
         <arg0>0</arg0>
         <!--Optional:-->
         <arg1>0</arg1>
         <!--Optional:-->
         <arg2>0</arg2>
         <!--Optional:-->
         <arg3>0</arg3>
         <!--Optional:-->
         <arg4>0</arg4>
         <!--Optional:-->
         <arg5>0</arg5>
      </fax:faxStatus>
   </soapenv:Body>
</soapenv:Envelope>

and below the request I am sending

XML:
<s:Envelope xmlns:s="[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/"[/URL] xmlns:u="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">[/URL]
  <s:Header>
    <o:Security s:mustUnderstand="1" xmlns:o="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">[/URL]
      <o:UsernameToken u:Id="uuid-90e0f212-3dc0-4913-96a8-175697d5240d-1" xmlns:u="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">[/URL]
        <o:Username>username</o:Username>
        <o:Password Type="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</o:Password>[/URL]
        <o:Nonce EncodingType="[URL unfurl="true"]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">JY+mppXhcmr+Rl/kzURVoYKFKa4=</o:Nonce>[/URL]
        <u:Created>2015-03-18T09:43:26.248Z</u:Created>
      </o:UsernameToken>
    </o:Security>
  </s:Header>
  <s:Body>
    <faxStatus xmlns="[URL unfurl="true"]http://fax.po.ws.apps.oracle.xxdof/"[/URL] xmlns:i="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
      <arg0 xmlns="">0</arg0>
      <arg1 xmlns="">1</arg1>
      <arg2 xmlns="">2</arg2>
      <arg3 xmlns="">3</arg3>
      <arg4 xmlns="">4</arg4>
      <arg5 xmlns="">5</arg5>
    </faxStatus>
  </s:Body>
</s:Envelope>

Can you please point me what I am missing here,I was not able to find any issue.

thanks

wasim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top