on 05-29-2015 11:31 AM
Hi ,
I'm very very new to using RestFul webservices SDK.
I'm trying very basic thing.
I'm trying to login to business objects environment using POSTMAN chrome extension.
when i use the command am getting below response in the postman but when im using the response and post with the parameters its not working
I used GET http://<server:port>/biprws/logon/long
i get the response below
<attrs xmlns="http://www.sap.com/rws/bip"> <attr name="userName" type="string">MTANVEER</attr> <attr name="password" type="string">NGodc@789</attr> <attr name="auth" type="string" possibilities="secEnterprise,secLDAP,secWinAD,secSAPR3">secEnterprise</attr>secSAPR3 </attrs>
when im copying this and pasteing the command and use the POST then i get nothing. I think im missing something very obvious. i basically cant understand where i have to specify username and Pwd. any response will be greatly received
Hi Tanveer,
your first request to get the body for logon is correct,
your second request is wrong. You should not paste the contents into the URL. Leave the URL as is, change the method to POST and then click on the "Raw" button. it will open an area where you can paste the request body. fill the user/password/authtype as necessary.
Also, in the header area, you will need to add headers for:
Content-Type application/xml
Accept application/xml.
click "Send" and you should receive a logon token in the response.
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its giving me error 404.
here's what i did
1. GET http://SERVER:6405/biprws/logon/long
2. Got the response and modified the raw code in POST and sent
3. I got some HTML response i dono where to use
i think im misisng smething obvious after getting logon token dono where and how to use.
so i just changed the URL to
http://SERVER:6405/biprws/documents
and it gave me 404 error
Could you please help me ?
Hi Tanveer,
your URL should be something like this:
http://SERVER:6405/biprws/raylight/v1/documents
Regards
Stephane
Hey Tanveer!
Welcome to the RESTful API community!
Did you have a look at the doc?
http://help.sap.com/saphelpiis_sbo41sp5wi-sdk/frameset.htm
Best regards,
Anthony
Hi Anthony,
Yes i'm still struggling to pass my logon token.
I passed the credentials fine then i got an XML response
i just pasted the string under logon token in the URL header X_SAP_LOGONTOKEN but it says invlaid logon token.
Could you please help me how to pass the logon token to login successfully ?
what headers i need to include and what info they should have for the
URL say http://SERVER:6405/biprws/raylight/v1/documents/limit=5?offset=5
Thanks,
Tanveer.
Hi Tanveer,
the X-SAP-LogonToken uses dashes in its name and not underscores.
When pasting the token in for the X-SAP-LogonToken header, you must place the token inside of double quotes.
In the url you posted above, the "?" for the url parameters should be right after "documents", not after "limit=5.
see the screenshot below:
Dan
Hi Tanveer,
Looking at the screenshot, I still don't see any quotes around the logontoken in the header. Apart from that, I can't see anything else that might be wrong.
You could also enable displaying the full error on the WACS server. In the CMC, bring up the properties for the Web Application Container Server (WACS) and select the checkbox: "Show Error Stack". Then restart the WACS. This should give more detailed errors in the REST client.
Dan
Hi Dan,
I have tried using quotes again to get the below error
I have then enabled the error stack. pleae find the below elaborated error message. I'm not able to understand need your help
<error>
<error_code>FWB 00003</error_code>
<message>Not a valid logon token. (FWB 00003)
</message>
<stack_trace>com.sap.bip.rs.exceptions.InvalidEntSessionException: com.crystaldecisions.sdk.exception.SDKServerException: Not a valid logon token. (FWB 00003)
cause:com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2
detail:Not a valid logon token. (FWB 00003)
The server supplied the following details: OCA_Abuse exception 10503 at [exceptionmapper.cpp : 67] 42010 {}
...Not a valid logon token. (FWB 00003) The required signature is missing or empty
at com.sap.bip.rs.exceptions.InvalidEntSessionException.LogonFailed(InvalidEntSessionException.java:72)
at com.sap.bip.rs.session.SessionFactory.getSession2(SessionFactory.java:73)
at com.sap.bip.rs.session.SessionInternal$1.compute(SessionInternal.java:43)
at com.sap.bip.rs.session.SessionInternal$1.compute(SessionInternal.java:38)
at com.sap.bip.rs.nmemo.NMemo$1.call(NMemo.java:67)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.sap.bip.rs.nmemo.impl.NMemoWrap.run(NMemoWrap.java:44)
at com.sap.bip.rs.nmemo.NMemo.memorizePreCalculated(NMemo.java:107)
at com.sap.bip.rs.nmemo.NMemo.memorize(NMemo.java:49)
at com.sap.bip.rs.session.SessionInternal.initThreadSession(SessionInternal.java:109)
at com.sap.bip.rs.server.servlet.BIPServletController.invoke(BIPServletController.java:81)
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.crystaldecisions.sdk.exception.SDKServerException: Not a valid logon token. (FWB 00003)
cause:com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2
detail:Not a valid logon token. (FWB 00003)
The server supplied the following details: OCA_Abuse exception 10503 at [exceptionmapper.cpp : 67] 42010 {}
...Not a valid logon token. (FWB 00003) The required signature is missing or empty
at com.crystaldecisions.sdk.exception.SDKServerException.map(SDKServerException.java:99)
at com.crystaldecisions.sdk.exception.SDKException.map(SDKException.java:122)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.logonWithTokenHelper(LogonService.java:505)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.logonWithToken(LogonService.java:338)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.logonWithToken(LogonService.java:147)
at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.logonWithToken2(SecurityMgr.java:254)
at com.crystaldecisions.sdk.framework.internal.SessionMgr2.logonWithToken(SessionMgr2.java:86)
at com.crystaldecisions.sdk.framework.internal.SessionMgr2.logonWithToken(SessionMgr2.java:80)
at com.sap.bip.rs.session.SessionFactory.getSession2(SessionFactory.java:68)
... 28 more
Caused by: com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuse: IDL:img.seagatesoftware.com/OCA/oca_abuse:3.2
at com.crystaldecisions.enterprise.ocaframework.idl.OCA.oca_abuseHelper.read(oca_abuseHelper.java:106)
at com.crystaldecisions.enterprise.ocaframework.idl.OCA.OCAs._LogonEx6Stub.SessionLogonWithToken(_LogonEx6Stub.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.crystaldecisions.enterprise.ocaframework.ManagedService.invoke(ManagedService.java:356)
at com.crystaldecisions.sdk.occa.security.internal._LogonEx6Proxy.SessionLogonWithToken(_LogonEx6Proxy.java:244)
at com.crystaldecisions.sdk.occa.security.internal.LogonService.logonWithTokenHelper(LogonService.java:402)
... 34 more
</stack_trace>
</error>
Thanks,
Tanveer.
Hi Tanveer,
the error is fairly straight forward. the problem may be the token you are copying and pasting in. Several weeks back, Postman updated their version and depending on where you copied the token from, some of the characters were encoded which made the token invalid. I can't tell from the screenshots if this is the case for you since most of the token is cut off.
Can you try downloading the Advanced Rest Client and try the same workflow to see if you are still running into the issue?
Dan
Hi Tanveer,
I cannot see the request URL that you used, but at least you are not getting the logon token error so it appears you have gotten past that problem.
Is it possible the request you used is for the ID of a scheduled instance? You will get the above error if that is the case. If you simply try to return a list of documents, does that work?
ie: GET ..../raylight/v1/documents
will return the first 10 webi documents that you have rights to access in alphabetical order. If that is not working, then maybe you can create an incident with SAP to dig further into what is going on.
Dan
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.