cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Adaptive Webservice model Execution

0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

amolgupta
Active Contributor
0 Kudos

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

0 Kudos

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

amolgupta
Active Contributor
0 Kudos

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

0 Kudos

Hi Gupta,

I have checked the same in Soap UI also. It gives the perfect response. But from portal, it is not triggered.

Thansk,

mahendran B.

amolgupta
Active Contributor
0 Kudos

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

0 Kudos

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

Stefan-EA
Contributor
0 Kudos

Hi Stefan,

As I mentioned, I have created the dynamicwebservice proxy in visual admin and I dodnt do any java coding for the webservice proxy. i cannot relate the link what you have given with my issue.

Thanks,

Mahendran B.

Stefan-EA
Contributor
0 Kudos

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

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70281e23-437d-2e10-f8b8-9c5fb19e5...

It should give you an idea of what needs to be done to consume it in Web Dynpro.

0 Kudos

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.

Stefan-EA
Contributor
0 Kudos

Mahendran Balasubramani wrote:

This scenario is for non-SAP system and we are using the Webservice from the PI system.

That scenario will work with any valid web service.

amolgupta
Active Contributor
0 Kudos

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

junwu
Active Contributor
0 Kudos

your system version?

debug first

0 Kudos

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.

junwu
Active Contributor
0 Kudos

can you try re-import the model?

0 Kudos

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.

udaykumar_kanike
Active Contributor
0 Kudos

Hi Mahendran,

                    There might be changes done to the backend table structure such as addition of fields or removal of fields. Check once.

regards

uday

junwu
Active Contributor
0 Kudos

how about the PI? any change there?

can you run the ws form wsnavigator?

0 Kudos

Hi uday,

I have checked everything. no changes in the PI interface. Even if it has been changed, it should have worked when I reimported the model and restarted the server. But it wasn't.

Thanks,
mahe.

0 Kudos

Hi Jun Wu,

I have checked in wsNavigator of PI also. When I give the URL which I have used to import the model, it works fine in PI.

No where I find the mistakes.

Thanks,

mahendran B.

junwu
Active Contributor
0 Kudos

debug your code,

don't know how to debug?

0 Kudos

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.

junwu
Active Contributor
0 Kudos

this is debug?

0 Kudos

Hi,

Pls let me know what you are trying to ask or what is the mistake in this?

Thanks,

mahe