nsForum logo

Welcome Guest ( Log In )

 
Reply to this topicStart new topic
> Help Authenticating
KyleRMagee
post Sep 4 2009, 05:27 PM
Post #1





Group: Verified NS Member
Posts: 11
Joined: 13-October 08
Member No.: 2,755



I'm having some trouble making sense of the very vague access protocol from the "full documentation" provided for download after signing up for my API key. I have my web application set to go but I'm wondering what the heck is the URL I need to point it towards to initiate this whole process? I'm assuming it is relative toward my registered domain? ANY clue would be appreciated thanks.
Go to the top of the page
 
+Quote Post
ddavisNS
post Sep 4 2009, 08:32 PM
Post #2


QA


Group: Administrators
Posts: 1,864
Joined: 10-August 07
Member No.: 6



Basically, these are the steps for the first time:

1. Issue a GetUserKeyRequest, this returns a LoginUrl in the response
2. Go to the LoginUrl, fill out the site information and submit to authorize the API for that site
3. Issue a GetUserTokenRequest, and add the returned token into the SecurityCredentials of subsequent requests

Once you have done that, you should be able to proceed

As far as the Url to access, I'm not sure if you meant the soap endpoint or the login url, but the soap endpoint is http://ecomapi.networksolutions.com/soapservice.asmx?wsdl, and the login url varies and is returned in the GetUserKeyResponse.
Go to the top of the page
 
+Quote Post
KyleRMagee
post Sep 22 2009, 01:45 PM
Post #3





Group: Verified NS Member
Posts: 11
Joined: 13-October 08
Member No.: 2,755



QUOTE
Basically, these are the steps for the first time:

1. Issue a GetUserKeyRequest, this returns a LoginUrl in the response
2. Go to the LoginUrl, fill out the site information and submit to authorize the API for that site
3. Issue a GetUserTokenRequest, and add the returned token into the SecurityCredentials of subsequent requests


I can't get past the first step... I just get the following error:

QUOTE
<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:Client</faultcode>
<faultstring>Server was unable to read request. ---> There is an error in XML document (17, 46). ---> Input string was not in a correct format.</faultstring>
<detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>


here is the request I'm sending:

QUOTE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:networksolutions:apis">
<soapenv:Header>
<urn:SecurityCredential>
<!--Optional:-->
<urn:Application>No Boundaries Inc. Ecom API</urn:Application>
<!--Optional:-->
<urn:Certificate>XXXXXXXXXXXXXXXXXXX</urn:Certificate>
<!--Optional:-->
<urn:UserToken></urn:UserToken>
</urn:SecurityCredential>
</soapenv:Header>
<soapenv:Body>
<urn:GetUserKeyRequest>
<!--Optional:-->
<urn:RequestId></urn:RequestId>
<!--Optional:-->
<urn:Version></urn:Version>
<!--Optional:-->
<urn:UserKey>
<!--Optional:-->
<urn:LoginUrl></urn:LoginUrl>
<!--Optional:-->
<urn:UserKey></urn:UserKey>
<!--Optional:-->
<urn:SuccessUrl></urn:SuccessUrl>
<!--Optional:-->
<urn:FailureUrl></urn:FailureUrl>
</urn:UserKey>
</urn:GetUserKeyRequest>
</soapenv:Body>
</soapenv:Envelope>


The XXXXXXXX are where I'm inputing the Certificate number I received after registering for the API. I know I'm doing some stuff wrong but for the life of me can't troubleshoot it.
Go to the top of the page
 
+Quote Post
ddavisNS
post Sep 22 2009, 04:28 PM
Post #4


QA


Group: Administrators
Posts: 1,864
Joined: 10-August 07
Member No.: 6



QUOTE (KyleRMagee @ Sep 22 2009, 01:53 PM) *
I can't get past the first step... I just get the following error:

here is the request I'm sending:

The XXXXXXXX are where I'm inputing the Certificate number I received after registering for the API. I know I'm doing some stuff wrong but for the life of me can't troubleshoot it.


The type of data for the version element is "decimal", so it needs to be non-empty and a decimal. Optionally you can also just not include the version if you aren't specifying one. So change your request to one of the following, which both work:
CODE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:networksolutions:apis">
<soapenv:Header>
<urn:SecurityCredential>
<urn:Application>No Boundaries Inc. Ecom API</urn:Application>
<urn:Certificate>XXXXXXXXXXXXXXXXXXX</urn:Certificate>
<urn:UserToken></urn:UserToken>
</urn:SecurityCredential>
</soapenv:Header>
<soapenv:Body>
<urn:GetUserKeyRequest>
<urn:RequestId></urn:RequestId>
<urn:Version>1</urn:Version>
<urn:UserKey>
<urn:LoginUrl></urn:LoginUrl>
<urn:UserKey></urn:UserKey>
<urn:SuccessUrl></urn:SuccessUrl>
<urn:FailureUrl></urn:FailureUrl>
</urn:UserKey>
</urn:GetUserKeyRequest>
</soapenv:Body>
</soapenv:Envelope>

CODE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:networksolutions:apis">
<soapenv:Header>
<urn:SecurityCredential>
<urn:Application>No Boundaries Inc. Ecom API</urn:Application>
<urn:Certificate>XXXXXXXXXXXXXXXXXXX</urn:Certificate>
<urn:UserToken></urn:UserToken>
</urn:SecurityCredential>
</soapenv:Header>
<soapenv:Body>
<urn:GetUserKeyRequest>
<urn:RequestId></urn:RequestId>
<urn:UserKey>
<urn:LoginUrl></urn:LoginUrl>
<urn:UserKey></urn:UserKey>
<urn:SuccessUrl></urn:SuccessUrl>
<urn:FailureUrl></urn:FailureUrl>
</urn:UserKey>
</urn:GetUserKeyRequest>
</soapenv:Body>
</soapenv:Envelope>



I took out all the soapui optional commenting to save space, but you can leave it in it doesn't matter. In your soapui preferences you might want to enable the setting "Type comment" under WSDL settings, it will show you the data type the element needs to be in the request comments. I'd also recommend turning on the setting "Abort invalid requests" under Editor Settings. With that turned on, this message would have been displayed when you attempted to submit the request: "line 17: Invalid decimal value: expected at least one digit", line 17 being the version element. These messages can be pretty helpful. I'm assuming you are using soapUI because the commenting looks like it, you can ignore that if you aren't.
Go to the top of the page
 
+Quote Post
KyleRMagee
post Sep 22 2009, 05:34 PM
Post #5





Group: Verified NS Member
Posts: 11
Joined: 13-October 08
Member No.: 2,755



wow thanks a BUNCH!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version    Network Solutions © 2010 Time is now: 20th March 2010 - 01:32 PM
Domain Names | Web Hosting | Web Design | Shopping Cart Software | Online Marketing | SSL Certificates