Developer Forum [ All Topics | New Topic ]

Thread: Having a problem with Authentication

Would appreciate someone with expertise in the Rapaport InventoryPlus to help debug why after successful login, requests fail even though authentication ticket is provided.

#1 Make a SOAP Request to Login. This works, and a Ticket is issued. 
SOAP request: https://technet.rapaport.com/WebServices/RetailFeed/RetailFeed.asmx
SOAPAction: "http://technet.rapaport.com/Login", Content-Type: text/xml;charset=UTF-8, Content-Length: 427
<?xml version="1.0" encoding="UTF-8"?>
  <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://technet.rapaport.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://technet.rapaport.com/">
    <env:Body>
      <ins0:Login>
        <ins0:Username>010101</ins0:Username>
        <ins0:Password>FizzBuzzster</ins0:Password>
      </ins0:Login>
    </env:Body>
  </env:Envelope>
HTTPI executes HTTP POST using the httpclient adapter
SOAP response (status 200):
<?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
      <AuthenticationTicketHeader xmlns="http://technet.rapaport.com/">
        <Ticket>192CF00F3485EAB52C9ABE131F25A7582CFDCAED5F5A150005F603286D80D62DDADF91DEE20C069922DB67AEAD46C221674CFFD7C02AEBEF58F25128F8E63821F341949025F8EA446E88C94402AF3D288EF00724F996831D01091B9F5A1EEB7E7723FD97C46D9B5FA0294E8EA3F26A5DD4D6FBA0215E727D5CDEA693EF625D1FDDCEA5CF0BBD3C28B373859A40E1B39AEFD0A64FCC07B52410E98F32BDE4CE67C4F2C032EC8C30BFF8A06E864FB7D48FE5184F1EA3BF758E4C95C7D8B141D656</Ticket>
      </AuthenticationTicketHeader>
    </soap:Header>
  <soap:Body>
    <LoginResponse xmlns="http://technet.rapaport.com/" />
  </soap:Body>
</soap:Envelope>
#2 Make a SOAP Request to GetDiamonds, this does not work, fails on Authentication even though Ticket is supplied in header

SOAP request: https://technet.rapaport.com/WebServices/RetailFeed/RetailFeed.asmx
SOAPAction: "http://technet.rapaport.com/GetDiamonds", Content-Type: text/xml;charset=UTF-8, Content-Length: 874
<?xml version="1.0" encoding="UTF-8"?>
  <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://technet.rapaport.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://technet.rapaport.com/">
    <env:Header>
      <AuthenticationTicketHeader>
        <Ticket>192CF00F3485EAB52C9ABE131F25A7582CFDCAED5F5A150005F603286D80D62DDADF91DEE20C069922DB67AEAD46C221674CFFD7C02AEBEF58F25128F8E63821F341949025F8EA446E88C94402AF3D288EF00724F996831D01091B9F5A1EEB7E7723FD97C46D9B5FA0294E8EA3F26A5DD4D6FBA0215E727D5CDEA693EF625D1FDDCEA5CF0BBD3C28B373859A40E1B39AEFD0A64FCC07B52410E98F32BDE4CE67C4F2C032EC8C30BFF8A06E864FB7D48FE5184F1EA3BF758E4C95C7D8B141D656</Ticket>
      </AuthenticationTicketHeader>
    </env:Header>
    <env:Body>
      <ins0:GetDiamonds>
        <tns:Shapes>ROUND</tns:Shapes>
      </ins0:GetDiamonds>
    </env:Body>
  </env:Envelope>
HTTPI executes HTTP POST using the httpclient adapter
SOAP response (status 500):
<?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
      <soap:Fault>
        <faultcode>soap:Server</faultcode>
        <faultstring>Server was unable to process request. ---&gt; You are not authenticated. Please run the Login function first.</faultstring>
        <detail />
      </soap:Fault>
    </soap:Body>
  </soap:Envelope>


>> add a comment
Dave
08/17/2012 12:39


16 Replies:

Hi

are you by any chance using PHP? There seems to be some kind of compatibility issue between the native PHP soap client and rapnet, see this thread for more info http://technet.rapaport.com/Forum/Developer.aspx?TopicID=2541

>> add a comment
Daniel
8/20/2012 8:03:00 AM
No, I am not using PHP. 

I posted what to me looks like the XML needed to execute an authenticated request for Diamonds. 

Would appreciate Rapaport to examine this and at least start a dialog on it. If my code authenticates fine (which is appears to as I receive a ticket as per the XML I posted, using that ticket should not pose a problem asking for inventory) why can I not make a second request.



>> add a comment
Dave
8/20/2012 10:14:00 AM
hi

it seems that you didn't sent all the required parameters to the web method.
see here http://technet.rapaport.com/WebServices/RetailFeed/RetailFeed.asmx?op=GetDiamonds


Ephraim



>> add a comment
Ephraim
8/27/2012 10:53:00 AM
Ok... so I changed the submission to include ALL the parameters, and filled in the placeholders with reasonable values, and still, the system rejects this call as an unauthenticated call, even though I clearly ask for a ticket first, get the ticket, and include the ticket in the GetDiamond call. 

Please explain to me why the authentication is failing on the second call. 

Thanks


<?xml version="1.0" encoding="UTF-8"?>
  <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://technet.rapaport.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://technet.rapaport.com/">
    <env:Header>
      <AuthenticationTicketHeader>
        <Ticket>59003892EFAB29E2280E4F60484E988EED49C6791725B0F558F67425880D37B106EF2E50B4652AD044F46E8FAA34132E24E2FC563D4F3A24F81B2A5665CF66AAC79325C814716C497AB5092E5D0FEC1DC9A2138F59FF955D1449C6893AA18E25BB018C2F3FEE3C3444D883EED56E140A1A118C88BCF0EACC7B70E96497988A7375612908D6E30DE7DE137BFFC447D3D3BAE0EA72B556790272B506D7695BE04C9F4D5DAE3493816511BB396D8A5AFF0B0D56EE18E015B45BC852F066AE98AF54</Ticket>
      </AuthenticationTicketHeader>
    </env:Header>
    <env:Body>
      <ins0:GetDiamonds>
        <ins0:Shape>ROUND</ins0:Shape>
        <ins0:SizeFrom>0.2</ins0:SizeFrom>
        <ins0:SizeTo>10.0</ins0:SizeTo>
        <ins0:ColorFrom>D</ins0:ColorFrom>
        <ins0:ColorTo>D</ins0:ColorTo>
        <ins0:ClarityFrom>IF</ins0:ClarityFrom>
        <ins0:ClarityTo>IF</ins0:ClarityTo>
        <ins0:CutFrom>VERY_GOOD</ins0:CutFrom>
        <ins0:CutTo>VERY_GOOD</ins0:CutTo>
        <ins0:PriceFrom>100.0</ins0:PriceFrom>
        <ins0:PriceTo>1000.0</ins0:PriceTo>
        <ins0:Page>100</ins0:Page>
        <ins0:PageSize>100</ins0:PageSize>
        <ins0:DiamondsFound>0</ins0:DiamondsFound>
      </ins0:GetDiamonds>
    </env:Body>
  </env:Envelope>

<?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
      <soap:Fault>
        <faultcode>soap:Server</faultcode>
        <faultstring>Server was unable to process request. ---&gt; You are not authenticated. Please run the Login function first.</faultstring>
        <detail />
      </soap:Fault>
    </soap:Body>
  </soap:Envelope>  


>> add a comment
Edit to the submission
8/27/2012 11:36:00 AM
So, no... that was not the issue. Again, sending XML to the service with Authentication ticket fails... for some reason... would appreciate the developers spending a few minutes on this to explain why. 

>> add a comment
Dave
8/27/2012 4:20:00 PM
you are not authorize to the YapLink Service. please call our cudstome service and ask for teh rapLink package

ephraim



>> add a comment
Ephraim
9/6/2012 11:10:00 AM
I own that account - It was on a trial & just expired.  It'll be turned back on shortly.

Is there anything wrong with the code?

>> add a comment
Johnny
9/6/2012 11:32:00 AM
It's back on.  So it should run fine, but it still doesn't. 

>> add a comment
Johnny
9/6/2012 11:55:00 AM
Trying this service again... Get my Authentication Ticket... Yes... Status 200 OK.. got a Ticket... Try and get Diamonds, sending all the parameters to the service, with the Ticket... Boom. 500 Error, not authenticated. 

Please elaborate on why the service is choking on this Soap Call please... 


<?xml version="1.0" encoding="UTF-8"?>
  <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://technet.rapaport.com/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://technet.rapaport.com/">
    <env:Header>
      <AuthenticationTicketHeader>
        <Ticket>4CACB38ADAB38F781C888EFE778CB092D00604189AA9479BB9D470602EB12B4A68ABD06EA61C8E7537A2F0A18B19B6E3BF4FEC8746FFF56DF56E1B2C7AE2EDE48136AE6A77F4D6C9E25C9BA84621695AC30A2E2A02404E7F475CA364ECBFBFEC8D6362CADFDBD5B0A7A698E06E5F59CF5AC7C2A7764D8871AE20C844E2384DC0D7BE1AB5458A1842D4A4EBA7D1CF6C4B7B1D85B13192DC64B4AEB277B243CA2F0834E9657A4A67227A50EDDABB14409F60745362CC34F7026B0918F36DB2FDEF</Ticket>
      </AuthenticationTicketHeader>
    </env:Header>
    <env:Body>
      <GetDiamonds>
        <Shape>ROUND</Shape>
        <SizeFrom>0.2</SizeFrom>
        <SizeTo>10.0</SizeTo>
        <ColorFrom>D</ColorFrom>
        <ColorTo>D</ColorTo>
        <ClarityFrom>IF</ClarityFrom>
        <ClarityTo>IF</ClarityTo>
        <CutFrom>VERY_GOOD</CutFrom>
        <CutTo>VERY_GOOD</CutTo>
        <PriceFrom>100.0</PriceFrom>
        <PriceTo>1000.0</PriceTo>
        <Page>100</Page>
        <PageSize>100</PageSize>
        <DiamondsFound>0</DiamondsFound>
      </GetDiamonds>
    </env:Body>
  </env:Envelope>


>> add a comment
Dave
9/7/2012 9:53:00 AM
as i wrote in my previous response, you have RapNet package but not RapLink package which required if you want to use that web service.


Ephraim



>> add a comment
Ephraim
9/9/2012 5:34:00 AM
We have it activated on the account as a trial for testing; everything should work.

>> add a comment
Johnny
9/9/2012 9:19:00 AM
Does this work now?


>> add a comment
Leo Muller
9/11/2012 3:51:00 AM
Hi Leo,

Actually. No. It still does not work. Soap call #1 for Authentication works fine and returns 200Ok status with a ticket. 

Second soap call with that ticket in the header asking for diamonds, does not work, system returns 500 and complains about Authentication. 

A 500 error means something was borked on the server. So, if an incomining Soap call is borking the server, please explain to me why, from examining the logs, where you surely know more than just 500 error. 

That way, I can adjust my 2nd Soap call to make your server actually work and process the request, returning 200OK and some data! Yay.. that would be nice.

Looking at the XML my Soap call sends, I see nothing scary wrong with it at all... seems to match your provided template fine. Hence my request for you to tell me the exact problem from your server logs. 

Thanks!

>> add a comment
Dave
9/12/2012 4:04:00 PM
Two months to troubleshoot a simple call.  This has gone beyond comical into moved into idiotic territory.

Meanwhile nothing is done and no progress is made.   New York blames it on Las Vegas, Las Vegas blames it on Israel, and Israel is apparently on a permanent vacation.


>> add a comment
Johnny
10/11/2012 4:39:00 PM
Hi


one of our representatives will contact you soon in order to sort it out

Regards
Ephraim


>> add a comment
Ephraim
10/16/2012 5:11:00 AM
Contact Dave - He's doing the implementation.  dlazar@resistorsoftware.com 


>> add a comment
Johnny
10/16/2012 9:41:00 AM