Skip to Content
author's profile photo Former Member
Former Member

[Error] - Service Layer access in WCF

Hi experts,

Just want to ask what is the error for this.

{ "error" : { "code" : -1001, "message" : { "lang" : "en-us", "value" : "Invalid session." } } }

Here's my Service Layer: https://192.168.0.30:50000/b1s/v1/$metadata

See image below:

Here's my setting in my ServiceLayer/conf "b1s.conf"

See image below:

I've already restarted my Service Layer. But still the same.

Capture.JPG (48.1 kB)
1.JPG (56.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jun 20, 2016 at 11:59 AM

    Hi Bryan,

    Long time ago, Trinidad pointed out that you must login a browser and then you can access the service discovery, and some options must be active.

    You can find more here: How to consume Service Layer oData services from .NET via WCF

    Good luck.


    Best regards,

    Pedro Magueija


    View Pedro Magueija's profile on LinkedIn

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 21, 2016 at 03:18 PM

    Any help with this @Maria Trinidad MARTINEZ GEA and @Yatsea Li

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2016 at 08:39 AM

    Hi,

    Although it is a relatively old thread and most likely Bryan found the answer since the time he posted this question, I think that it's worth to post my findings for anyone else who may encounter this type of error.

    1. Check this document by @Ralph Oliveirab1dev/BypassBroswerWarning.pdf at master · Ralphive/b1dev · GitHub
    2. Check this document about CORS by @Maria Trinidad MARTINEZ GEA

    B1 Service Layer: How to enable CORS

    Actually I decided to create my own self-signed certificate which required me to issue several commands on the HANA server. I used a guide available here:

    Creating a Self-Signed SSL Certificate | Heroku Dev Center

    When you decide to create a certificate by yourself you most likely would also like to adjust information about the server and its certificates in the Service Layer config files:

    "/usr/sap/SAPBusinessOne/ServiceLayer/conf/httpd-b1s-lb.conf"

    "/usr/sap/SAPBusinessOne/ServiceLayer/conf/httpd-b1s-lb-member-50001.conf"

    "/usr/sap/SAPBusinessOne/ServiceLayer/conf/httpd-b1s-lb-member-common.conf"

    Also increasing the log level might be helpful for tracking the error issue - in configs above.

    Check also settings in:

    "/usr/sap/SAPBusinessOne/ServiceLayer/lib/Conf/b1-local-machine.xml"

    For the CORS issue I decided to use most generic option: "*" for allowed hosts although I think that since SL uses port number 8000 it should be enough to allow only http://<hanaservername>:8000/

    In case there is a problem with your username and password I'd suggest using:

    "/usr/sap/SAPBusinessOne/ServiceLayer/bin/set-hana-credential"

    Good luck!

    Kind regards,

    Radek

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.