question

InactiveAutoUser avatar image
1 Like"
InactiveAutoUser asked ·

Missing or invalid security header

Hi, I'm getting the above issue, where the SOAP request fails and informs me that my security header is missing or invalid. I just wanted to figure out if the XML I was pushing to the server was valid, then I can check for other issues.

 

This is my request;

 


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ebay:apis:eBLBaseComponents" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns1:RequestorCredentials xsi:type="ns1:CustomSecurityHeaderType">
<ns1:Credentials>
<ns1:AppId>...</ns1:AppId>
<ns1:DevId>...</ns1:DevId>
<ns1:AuthCert>...</ns1:AuthCert>
</ns1:Credentials>
</ns1:RequestorCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:GetSessionIDRequest>
<ns1:Version>783</ns1:Version>
<ns1:RuName>...</ns1:RuName>
</ns1:GetSessionIDRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

So, basically, does that look reasonable? I also wanted to ask, does the SOAP server still need the X-EBAY... HTTP headers that you would normally send with the XML request?

 

Thanks very much

 

Ian.

soap-xml
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
jourbandts avatar image
0 Likes"
jourbandts answered ·

Hi,

 

Yes you need to ensure you have added the necessary headers, http://developer.ebay.com/DevZone/XML/docs/WebHelp/wwhelp/wwhimpl/common....

 

To make the Trading API calls through SOAP, you want to ensure you have the necessary headers.  You also need an endpoint that looks something like this,

 

https://api.ebay.com/wsapi?callname=GetSessionID

 

You need to ensure you add the callname.  Below is a generic sample of the GetSessionID.

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ebay:apis:eBLBaseComponents">
   <soapenv:Header>
      <urn:RequesterCredentials>
         <!--Optional:-->
         <urn:eBayAuthToken>?</urn:eBayAuthToken>
         <!--Optional:-->
         <urn:HardExpirationWarning>?</urn:HardExpirationWarning>
         <!--Optional:-->
         <urn:Credentials>
            <!--Optional:-->
            <urn:AppId>?</urn:AppId>
            <!--Optional:-->
            <urn:DevId>?</urn:DevId>
            <!--Optional:-->
            <urn:AuthCert>?</urn:AuthCert>
            <!--Optional:-->
            <urn:Username>?</urn:Username>
            <!--Optional:-->
            <urn:Password>?</urn:Password>
            <!--You may enter ANY elements at this point-->
         </urn:Credentials>
         <!--Optional:-->
         <urn:NotificationSignature>?</urn:NotificationSignature>
         <!--You may enter ANY elements at this point-->
      </urn:RequesterCredentials>
   </soapenv:Header>
   <soapenv:Body>
      <urn:GetSessionIDRequest>
         <!--Zero or more repetitions:-->
         <urn:DetailLevel>?</urn:DetailLevel>
         <!--Optional:-->
         <urn:ErrorLanguage>?</urn:ErrorLanguage>
         <!--Optional:-->
         <urn:MessageID>?</urn:MessageID>
         <!--Optional:-->
         <urn:Version>?</urn:Version>
         <!--Optional:-->
         <urn:EndUserIP>?</urn:EndUserIP>
         <!--Optional:-->
         <urn:ErrorHandling>?</urn:ErrorHandling>
         <!--Optional:-->
         <urn:InvocationID>?</urn:InvocationID>
         <!--Zero or more repetitions:-->
         <urn:OutputSelector>?</urn:OutputSelector>
         <!--Optional:-->
         <urn:WarningLevel>?</urn:WarningLevel>
         <!--Optional:-->
         <urn:BotBlock>
            <!--Optional:-->
            <urn:BotBlockToken>?</urn:BotBlockToken>
            <!--Optional:-->
            <urn:BotBlockUserInput>?</urn:BotBlockUserInput>
            <!--You may enter ANY elements at this point-->
         </urn:BotBlock>
         <!--You may enter ANY elements at this point-->
         <!--Optional:-->
         <urn:RuName>?</urn:RuName>
      </urn:GetSessionIDRequest>
   </soapenv:Body>
</soapenv:Envelope>

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.