on 06-25-2012 3:42 PM
Hi,
I have created an "Adaptive Webservice Model" which is a WSDL file from PI server. This is the synchronous communication. I will set a parameter during the execution of the model and I will get a return value from the PI Interface.
This was working fine and I was able to receive the parameter. but suddenly (Without any changes to the code), the model execution is not happening. I have checked the user ID maintained in the "DynamicWebserviceProxy" and everything is fine with it. No changes was happened anywhere in the system both portal and PI. But the model exection was not working anymore.
coding has been done as follows.
1. Execution of model.
2. Get the parameter from PI interface.
3. set the parameter value to the local attribute in the context.
The execution of model is within TRY - CATCH block. If there is a problem with execution of model, I should get some exception in catch block.
But there is a "Nullpointerexception" during the 2nd step. i.e. Getting the parameter from the PI interface.
When I check the portal log there is no log for execution step using the "DynamicWebserviceProxy".
Also there is no log in PI logs & traces.
Pls throw me some light on how to locate where the issue is.. I didnt do any changes to the codings and suddenly it throws the exception.
Is there any way I can trace what is happening when i run the model.
give me some idea on this.
Thanks,
Mahendran B.
Hi Mahendran,
Sometimes some WebService calls may fail if you dont supply all fields i.e. if there is String field supposed to be left blank, fill it with a "" character. A Null Pointer exception means that some field has been read that holds a null and this field should be a class references type like String. I have mostly seen this kind of issues when you try to do manipulation a String reference while it is set to null.
Most likely your problem should be solved by trying the following steps -
1). mock call your web Service through a Web Service call simulation tool like Soap UI
2). try filling all your blank strings with "" character
3). make an instance of all necessary structures that are provided in the model.
4). double check if you are filling the right input in the right structures.
Regards,
-Amol Gupta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gupta,
As I said Earlier, The model was working fine and suddenly it throws error. Previously I was able to find the log for the DynamicWebserviceProxy for "Execution" got triggered. But now nothing is happening. I cant see anything in the log.
I have re imported and restarted the server. But still no improvement.
May be the server cache refers to the old metadata. but even after restarting the server also its not working fine.
Is there anyway we can check the cache or clear the cache specifically for Webservice call?
Thanks,
Mahe
Hi Mahendran,
For Clearing Portal Metadata Cache, restarting Portal Server should be more than enough. You may consider restarting the PI/XI Server to remove any caching on the PI/XI server side.
Simulate the Web Service call through some other Web Service Simulation tool like SOAP UI, you can get a free download to test the tool for some days. It is imperative that this simulation call from SOAP UI (or other equivalent tool) runs fine.
Thanks and Regards,
-Amol Gupta
When you run a web service call the call is triggered from the Portal Server and not the machine with the browser.
1). Ensure that there is connectivity between the Portal server and PI server.
2). a ping from portal server to PI server and vice versa should be successful with 0 loss.
3). ping PI hostname/ip that you used in the WSDL in the Portal Server CMD. Ensure hostname to IP resolutions are happening as expected
4). open the WSDL url on the browser from the Portal WAS Server
Pls note again that test everything from your Portal Server as Web Service Calls are triggered from the Portal Server and not any machine from where you access the application.
Regards,
-Amol Gupta
Hi Gupta,
Everything seems to be fine but even then the webservice call is not happening from portal. we dont get any clue why the connection to PI system is not working. For your understanding I have given some points below . Hope you can throw some light for this issue.
1. Webservice model has been imported and used in Webdynpro. The WSDL file is from PI server. I used the WSDL URL to import the model.
2. Created the Dynamic Webservice Proxy in Visual Admin to communicate with PI.
3. cross checked with the user details maintained in Dyunamicwebserviceproxy by logging into PI server. It is logging in perfectly.
The application was working and suddenly it stopped working. The clue is we did DB2 migration in PI server. During which all the communication channel were stopped and started again. Again we have restarted the portal server also. But still it is not working.
Is there any other settings or way to check from portal, why the webservice call is not happening?
Thanks,
Mahendran
Another, but laborious option would be to create a deployable proxy and consume it with Web Dynpro.
http://help.sap.com/saphelp_nw70/helpdata/en/c9/050340dcf41e07e10000000a1550b0/frameset.htm
http://help.sap.com/SAPHELP_NW04s/helpdata/EN/45/f957507cb343f78e818c50620ed5ca/frameset.htm
Mahendran,
Sorry for the confusion. What I meant to say is create a deployable web service proxy DC instead of consuming the web service with the adaptive web service model in Web Dynpro.
Here is a tutorial on creating the the deployable proxy
It should give you an idea of what needs to be done to consume it in Web Dynpro.
Hi Stefan,
This scenario is for non-SAP system and we are using the Webservice from the PI system. I want this to be solved. Is there any way where I can debug and find where exactly it goes wrong when calling the dynamicwebservice proxy. Because while running the application the DynamicWebservice proxy created is not getting triggered.
Thanks,
Mahendran B.
Hi Mahendran,
If it is running from SOAP UI, it should work fine from Web Dynpro as well.
Make another demo project, separate from the one you have been working on and check it by creatign a model, you can skip visual admin config for the demo project. If separate demo project works then you may have to delete your existing model and recreate model in the original DC/Project.
Also, double check if you are putting the right data in the right context.
Regards,
-Amol Gupta
your system version?
debug first
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My System version is as follows:
*************************************************
Portal : Version 7. SP 25
PI : Version : 7.1
NWDS : 7.0 SP 25
*************************************************
I have also maintained the debug trace. but I dont see any traces in Portal logs. I have added the debug code immedietly after the execution of model.
I commented all the code and I kept only the model execution part. now I am getting exception in executing the model with the message "The design time and runtime URL mignt not be the same". But I am sure that both are same. Also I have restarted the portal server to clear the cache. But still the same result.
Thanks,
Mahendran B.
Hi Jun Wu,
Thanks for your reply.
I have tried importing the model twice and restarted the portal server also. But no luck. Still the same.
I think there is some cache which still referes to the old metadata structure.
Is there any way by which I can clear cache for webservice consumption in specific location in server? Why because I have restarted server several times and still the same issue.
Thanks,
Mahendran B.
Hi,
I have already written the debug code. But it is not showing anything in the logs. This is the code I have written for debugging
********************************************************************************************************************************************************************
wdContext.currentRequest_USER_AUTHENTICATEElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
String reqlog = reqAuth.wdGetRequestLog().toString();
String reslog = reqAuth.wdGetResponseLog().toString();
}
catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(
"exception" + e,
true);
}
Request_USER_AUTHENTICATE ReqAuthMO = wdContext.currentRequest_USER_AUTHENTICATEElement().modelObject();
ReqAuthMO.wdSetInvocationLogEnabled(true);
logger.debugT(ReqAuthMO.wdGetRequestLog()); //request log (HTTP header + SOAP request)
logger.debugT(ReqAuthMO.wdGetResponseLog()); //response log (HTTP header + SOAP response)
logger.debugT(ReqAuthMO.associatedModelClassInfo().getModelInfo().toString()); //model metadata in XML format
logger.debugT(ReqAuthMO.toString()); //model object tree in XML format (= model context node content)
**********************************************************************************************************************************************************
Pls help me if you find any error in this.
Thanks,
Mahendran B.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
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.