cancel
Showing results for 
Search instead for 
Did you mean: 

Problem referencing a WebService from DynPro Application

Former Member
0 Kudos

Hello,

I am using Portal NW04.

I've deployed a WebService for one of SAP's tutorials with this portalapp.xml:

<?xml version="1.0" encoding="utf-8"?>

<application>

<application-config>

<property name="SharingReference" value="com.sap.portal.runtime.application.soap">

</property>

</application-config>

<components>

</components>

<services>

<service alias="TimeWebService" name="TimeWebService">

<service-config>

<property name="className" value="roy.test.ws.time.TimeWebService">

</property>

<property name="WebEnable" value="true">

</property>

<property name="WSDL_RPC_ENC" value="TimeWebService_RPC_ENC.wsdl">

</property>

<property name="WSDL_RPC_LIT" value="TimeWebService_RPC_LIT.wsdl">

</property>

<property name="WSDL_DOC_LIT" value="TimeWebService_DOC_LIT.wsdl">

</property>

<property name="startup" value="true"/>

</service-config>

<service-profile>

<property name="SystemAlias" value="Default_System_Alias">

</property>

</service-profile>

</service>

</services>

</application>

The web service is deployed succefully and is started at the Portal. I can see it's wdsl file when browsing to it.

I want to refer this WS from a DynPro application.

In order to do that I Set Sharing Referance: PORTAL:com.sap/WebServiceTutorial

I've imported WebServiceTutorialapi.jar from the PAR file in order to be able to work localy.

Then I write this code:

ITimeWebService portalService = (ITimeWebService) WDPortalUtils.getServiceReference("WebServiceTutorial.TimeWebService");

The problem is that I receive "java.lang.NoClassDefFoundError: roy/test/ws/time/ITimeWebService" When the

DynPro App is loading. What Am I doing here which is not OK?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

No one knows...?

Former Member
0 Kudos

Hi Roy,

You can try one more option. If you have the wsdl file of the web service, you can use the model import which gives you an option of selecting a wsdl file and also lists you with the available methods the file contains and then you can use them as a normal model class in webdynpro.

Hope this helps..

Regards

Prakash