Access Portal Services within Web Dynpro

Hi,
I created a portal service and would like that some values of the same have to be set by a Web Dynpro application, but i have a problem to access this
service. Always that a i try to get a reference of this service the object isn't instantiated and i get a null instantiated.
What i`m trying to do is the broadcast message described in [/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1 |/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1]with a variation that need of some
more Attributes and that the same will be pass by the Web Dynpro, like the broadcast message i`ll just use the alert concept and don't the publication.
Follow below the describe of executed actions.
1 - I did all the process as the [Weblog|/people/prakash.singh4/blog/2005/04/28/brodcast-messages-to-logged-on-users-in-portalpart1].
2 - I generated the Jar and insert the same in a DC.
3 - I generated the Web Dynpro application, in the used DCs and added the DC with the Jar, and i inserted the reference in a Sharing References. 
4 - Did the deploy and insert the Web Dynpro in a Portal Iview.
But always that i execute, i can't capture the reference of the service.
Note: The reference in Sharing References was executed for several diferents forms of test, like for exemple:
PORTAL:<vendor>/com.teste.broadcast
PORTAL:com.teste.broadcast
PORTAL:<vendor>/com.teste.broadcast.alertreceiver
PORTAL:com.teste.broadcast.alertreceiver
But always adding one at a time.
Until put the saller like sap.com i already try.
The creation of the service as described in the weblog can be accessed for a Web Dynpro? What the problem to access the Service??
The codes follow Bellow.
portalapp.xml
<?xml version="1.0" encoding="UTF-8"?>
<application>
  <application-config>
    <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.runtime.system.notification"/>
    <property name="ServicesReference" value="com.teste.broadcast"/>
  </application-config>
  <services>
    <service name="alertreceiver">
      <service-config>
        <property name="className" value="com.teste.broadcast.alertreceiver"/>
      </service-config>
    </service>
  </services>
</application>
     BroadcastAppView.java
import com.sap.security.api.IUser;
import com.sap.tc.webdynpro.clientserver.portal.WDPortalUtils;
import com.sap.tc.webdynpro.clientserver.portal.sf.WDPortalServiceType;
import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
import com.sapportals.portal.prt.service.notification.INotificationService;
import com.sapportals.portal.prt.service.notification.NotificationStringBufferPool;
import com.sapportals.portal.prt.service.notification.StreamData;
import com.sapportals.portal.prt.service.notification.TopicData;
import com.sapportals.portal.prt.service.notification.TopicDataContainer;
import com.teste.broadcast.Ialertreceiver;
public void onActionSendMessage(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionSendMessage(ServerEvent)
        IWDMessageManager msgManager = wdComponentAPI.getMessageManager();
        INotificationService notService = null;
        try {
                notService =    (INotificationService)
                        WDPortalUtils.getServiceReference("com.teste.broadcast");
                //notService =  (INotificationService)
                //      WDPortalUtils.getServiceReference("com.teste.broadcast.alertreceiver");
                //notService =  (INotificationService)
                //      WDPortalUtils.getServiceReference(IAlertreceiver.KEY);
        } catch (Exception ex) {
                msgManager.reportWarning("2-" + ex.getMessage());
        TopicDataContainer container = new TopicDataContainer(TOPIC_NAME);
        StreamData  messageStream = new StreamData(new ByteArrayInputStream(textMessage.getBytes()));
        TopicData durationdata =
                new TopicData(TopicDataContainer.STRING, "60");
        TopicData userdata =
                new TopicData(TopicDataContainer.STRING, user.getUniqueName());
        container.addTopicData("message", messageStream);
        container.addTopicData("duration", durationdata);
        container.addTopicData("user", userdata);
        container.addTopicData("group", "GROUP_ACCESS");
        //notService.publish(TOPIC_NAME, container);
        msgManager.reportWarning("-" + notService);
    //@@end
   * The following code section can be used for any Java code that is
   * not to be visible to other controllers/views or that contains constructs
   * currently not supported directly by Web Dynpro (such as inner classes or
   * member variables etc.). </p>
   * Note: The content of this section is in no way managed/controlled
   * by the Web Dynpro Designtime or the Web Dynpro Runtime.
  //@@begin others
  private final static String SERVICE_NOTIFICATION = "com.sap.portal.runtime.system.notification.notification";
  private final static String TOPIC_NAME = "USTBroadCastAlerts";
  //@@end
Thank.
Luciano Feletti Aponte

Hi Luciano,
Take a look at for your answer:
/thread/833576
Regards,
Rogério

Similar Messages

  • Accessing Portal Service from web dynpro : NoClassDefFoundError

    Hello Experts,
    I tried to develop a portal service (EquiService) and a web dynpro application (wdequset) which accesses the portal service. I put my web dynpro in an IView to show it in the portal. The service is running but when I try to open the IView I always get an error. I debugged my web dynpro application and found out that I didn’t get a reference to the service (portalEquiService is always null). See the following code and have a look to my comments.
    public void wdDoInit()
        //@@begin wdDoInit()
        String key = IEquiService.KEY;
         * Here I get the right key. That’s OK so far.
    //    IEquiService portalEquiService = (IEquiService)PortalRuntime.getRuntimeResources().getService(key);
         * When I use this line to get an instance of the service, I get the following error:
         * java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
         * The package "com.sapportals.portal.prt.runtime.*" is imported
         IEquiService portalEquiService = (IEquiService) WDPortalUtils.getServiceReference(key);
          * I found this in the "How to Access a Portal Service Within a WebDynpro Java Application" document.
          * When I use this line, I get the following error:
          * java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
          * The package "com.company.service.equi.IEquiService" is also imported.
        wdContext.currentContextElement().setEquinummer(portalEquiService.getEquiData().getEquiNr());
        //@@end
    When I have a look to the service in the portal I see that the service is running and the following additional lines under “Dependents”:
    service: psequinr|EquiService
    SAPJ2EE::company.com/wdequset
    So the service seems to know my web dynpro application (after debugging for the first time).
    Detailed error information 1 (when I try to get the reference by PortalRuntime.getRuntimeResources().getService(key) ):
    java.lang.NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
         at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:107)
         at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Detailed error information 2 (when I tryto get reference by WDPortalUtils.getServiceReference(key) ):
    java.lang.NoClassDefFoundError: com/company/service/equi/IEquiService
         at com.company.service.ServiceCust.wdDoInit(ServiceCust.java:123)
         at com.company.service.wdp.InternalServiceCust.wdDoInit(InternalServiceCust.java:112)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingCustomController.doInit(DelegatingCustomController.java:73)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:319)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:278)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:659)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:539)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:421)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:130)
         at com.sap.tc.webdynpro.progmodel.view.InterfaceView.initController(InterfaceView.java:41)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.displayToplevelComponent(ClientComponent.java:135)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:404)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:618)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Hope that anybody knows what could be wrong here.
    Thanks a lot.
    Rene

    The prtapi.jar is set in the classpath:
    <classpathentry kind="lib" path="C:/Programme/SAP/JDT/eclipse/plugins/com.sap.tc.ap/comp/SAP_JTECHS/DCs/sap.com/epbc.prtapi._api/_comp/gen/default/public/default/lib/java/prtapi.jar"/>
    and when I look in the portal (System Administration -> Support -> Portal Runtime -> Application Console), select my service and press the "show" Button, I see that the service has a dependency to my web dynpro application.
    service: psequinr|EquiService
    SAPJ2EE::company.com/wdequset
    So I think that the sharing reference of the web Dynpro should be ok. Or not?

  • Cannot access Portal Service from Web dynpro DC

    Hi all,
    I cannot access the portal service from my web dynpro dc.
    1. I created a Portal Service (say xxxservice) in a DC (say the DC name is testservice and the vendor is xx.com)
    2. Created a public part under the testservice DC and added my classes to it.
    3. Built and deployed the testservice DC.
    Now,
    4. I created a web dynpro DC.
    5. In the used DC section added the public part of the testservice DC and also the epbc.prtapi._api.jar for build time and runtime with strong qualifier.
    6. In the web dynpro "Sharing Reference", I added PORTAL:xx.com/testservice
    7. In the component controller, I am calling a method from the Portal Service.
    8. Built the web dynpro DC and deployed it.
    9. But at the run time it gives, NoClassDefFoundError on the xxxservice.
    I looked at many forum threads and tried everything. For eg: changed the Sharing Reference to PORTAL:sap.com/testservice but nothing works.
    Please do suggest me if I am missing something
    Thanks

    Hi Laxmi,
    I am sure something wrong at Portal Service DC creation. On webdynpro part you done fine .. by putting PORTAL:sap.com/testservice
    Check the below steps:
    1. Create DC Portal Applicaiton Stand alone (SDA)
    2. Add portal Service for the newly created portal service dc
    3. build and activate
    4. by default you should be get public part by name API which is compilation dependency
    5. here you dont need to do anything else
    6. on webdynpro just add the used dc to this API public part of portal service dc
    7. add PORTAL:sap.com/testservice  sharing reference
    If u go by this you shouldnt get any error..
    Now, u are saying something like ur own classes .. i think u are trying to put u r own classes to service.. but remeber portal service is to have only IYourService class and YourService class.. other classes should be made to be jar.. and add that jar to External library DC and create PPs compile & Assemble and add that DC to current service dc.
    Hope it is clear.. if not pls let me know..
    Thanks,
    Raags

  • Need info on Accessing portal services within a Web Dynpro application

    Hi,
    I need information on Accessing portal services within a Web Dynpro application.I want to explore this topic.Can anyone give useful links?
    Thanks in advance.
    Rajani N

    Hi
    how to reference  a portal service with web dyn pro ?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/how%20to/how%20to%20access%20a%20portal%20service%20within%20a%20web%20dynpro%20java%20application.pdf
    http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/portal/WDPortalUtils.html
    Best Regards
    Jakub Krecicki

  • Access Application Services from Web Dynpro DC

    Hi Experts,
    We created a CAF DC which has an application service called ClientAppService, with a method findClientsById. We also created another DC, a Web Dynpro DC, which makes use of the model generated by the CAF DC. We have programmatic access to the application service through
    ClientAppServiceProxy.findClientsById()
    , but when running the DC which makes this call we receive the following error:
    com.sap.caf.rt.exception.CAFBaseRuntimeException: Query with name findClientsById does not exist
    We've managed to call Application Services before, but that was when the Web Dynpro was in the same DC as the CAF services. Any ideas on how to fix this?
    Thanks,
    JP

    Hi Smith,
    One of the possible reasons of this error is may be your CAF project is not properly deployed in the Server in which you have deployed your WebDynpro project. So during the execution of the WebDynpro project while it tries to invoke this findby from the Application Service of your CAF project it fails to find a match. May be by mistake you have deployed your CAF Application Service first and added the findBy method later. So if your properly deploy your total CAF project in the same server in which you have deployed your WebDynpro project it may resolve your problem.
    Thanks and Regards
    Avijit

  • CAF DB Update for CAF Entity Service from Web Dynpro

    Hi all,
    I have created an entity service in CAF called “Contacts’ which contains the following attributes.
    phoneNo
    cellNo
    emailID.
    Another entity service called "Person" is created. This contains the following attributes.
    personId
    personName
    personAddr
    contactsRef. (Cardinality -> 0..n , Relational Type -> Composition)
    That means Contacts entity service is used within Person entity service. Now it is working fine within CAF service browser. Now the Web Dynpro DC of CAF application is used within another custom Web Dynpro DC project. I want to store data from Web Dynpro.
    Within the context of component controller of  Web Dynpro the structure is like
    APerson
         |_ personId
         |_ personName
         |_ personAddr
         |_ contactsRef       
                    |_ phoneNo (Under contactsRef)
                    |_ cellNo (Under contactsRef)
                    |_ emailID (Under contactsRef)
    So I have written the following code within web dynpro custom method.
    APerson person = PersonServiceProxy.create();
    java.util.List ls = new ArrayList();
    for(int i=0; i<4;i++)
    AContacts contact = ContactsServiceProxy.create();
    contact.setCellNo("9092130156");
    contact.setEmailID("[email protected]");
    contact.setPhoneNo("432258");
    contact.getAspect().sendChanges();
    ls.add(contact);
    person.setRelatedModelObjects("contactsRef",ls);
    person.setPersonID("9999");
    person.setPersonName("xyz");
    person.setPersonAddr("ABC, KOL");
    wdContext.nodeAPerson().bind(person);
    person.getAspect().sendChanges();
    CAFServiceFactory.getServiceFacade(idendityDefinition.class);
    After saving the data from Web Dynpro I am trying to test it from CAF service browser. But I am getting only the parent row. I mean only the value of personId, personName and personAddr fields which I have stored from Web Dynpro. But no value is coming within the table for Contacts entity service for composition relation.
    Could anybody help me how can I solve my problem?
    Thanks & Regards
    Chandan
    Message was edited by:
            Chandan Jash

    Hi Chandan,
    Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
      I am not sure the code is actually adding the contact model object to person.
    Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
    award points if  info is helpful
    Regards,
    Anish

  • Consume XI web service in web dynpro application

    HI All,
    I have scenario access web service in web dynpro java, which is created by XI ..Now I have WSDL file. Using that WSDL file I have imported web service model(Adaptive web service method)  in my web dynpro java.
    By following  the PDF document  = https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7 
    I have created a Model as mentioned in the PDF.
    Once model is created I have done the mapping from model to component controller, after that  I need to execute the Web service model .For the execution I need to write a code in component controller :- 
    model class name = XIModel
    XIModel obj = new XIModel();
    Once I am done with the above coding , and when I try to run the application I get the following error :-
    com.sap.engine.services.webservices.espbase.discovery.BaseIOException: Invalid Response Code 200 while accessing URL:http://atind037:50000/WSDL/GetPOPDF.wsdl. Response Message: OK. Content Type: content/unknown
    Could you please help me with this at the earliest , as it is a urgent issue.
    Regards,
    Boopathi M.

    Hi boopathi,
    It seems your wsdl url is not correct. Put the http://atind037:50000/WSDL/GetPOPDF.wsdl
    in your browser and check whether you are getting the WSDLDefinitions in xml format or not ?
    In wsdl url put ? instead of .
    URL : http://atind037:50000/WSDL/GetPOPDF?wsdl
    call adaptive web services mit Parameter
    Regards,
    Mithu

  • Error while calling a web service in web dynpro through XI

    Hello,
    I was following a blog for Invoking Webservices using SAP XI
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    I have done all the steps specified but when I import the wsdl file in web dynpro application and deploy the project I get the following error:
    <b>"Exception on execution of web service with WSDL URL 'bankws_OUT_MI.wsdl' with operation 'bankws_OUT_MI' in interface 'bankws_OUT_MI'"</b>
    where:
    bankws_OUT_MI -
    is the message interface name.
    I have defined a web service in the integration reopsitory as follows:
    <b>http://PEP:50000/XISOAPAdapter/MessageServlet?channel=:bankws:s_comm</b>
    where 
    bankws --- service name
    s_comm -
    sender communication channel
    selected 'bankws_OUT_MI' message interface from the given choices
    'bankws_IN_MI'  or 'bankws_OUT_MI'.
    interface name: bankws_OUT_MI -
    mesage interface name
    Can anyone guide me how to proceed further. Also if possible can anyone send me some helpful documentation regarding how to call a web service in web dynpro through XI.
    Thanks in advance.
    Regards,
    Imtool

    hello everyone,
    I made the whole scenario again and it is running succusfully in Xml spy. Now when i call the webservice in web dynpro...  I get the following error:
    <b>com.sap.engine.services.webservices.espbase.discovery.BaseIOException: Invalid Response Code 200 while accessing URL: http://PEP:50000/XISOAPAdapter/MessageServlet?channel=:OOMS_WS_OUT:CC_OOMS_WS_OUT. Response Message: OK. Content Type: text/html; charset=utf8. Body Content: <html> <head><title>MessageServlet</title></head> <body> <h3>Message Servlet is in Status OK</h3> <h3>Status information:</h3> Servlet com.sap.aii.af.mp.soap.web.MessageServlet (Version $Id: //tc/xi/645_VAL_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#7 $) bound to /MessageServlet <br/>Classname ModuleProcessor: null <br/>Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean <br/>Lookupname for remoteModuleProcessorLookupName: null <br/>ModuleProcessorClass not instantiated <br/>ModuleProcessorLocal is Instance of com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0 <br/>ModuleProcessorRemote not instantiated </body></html></b>
    I have also made the entry in the visual administrator for metadata_dest and execution_dest.
    Does anybody have an idea what mistake i am doing.
    Thanks,
    Imtool

  • Consuming External Web Services in Web Dynpro Java

    Hi All,
    I an trying to consume external web service in Web dynpro java using Adaptive Web Service Model.
    But getting below mentioned error while executing the web service
    Exception on execution of web service with WSDL URL 'D:\Web Service Project\CurrencyConvertor.asmx.xml' with operation 'ConversionRate' in interface 'CurrencyConvertorSoap'
    Steps i followed are as below:
    1. Created  Adaptive Web Service Model for this i select WSDL source as "Local File System or URL"
    In next step i select No logical destination radio button and click on next
    In next step, browse the WSDL file and successfully import the WSDL file.
    2. After successfully importing the WSDL file i wrote below code in Init method:
    WebModel modelweb = new WebModel();               
    Request_ConversionRate reqConversion = new Request_ConversionRate(modelweb);
    ConversionRate conversion= new ConversionRate(modelweb);
    reqConversion.setConversionRate(conversion);
    wdContext.nodeRequest_ConversionRate().bind(reqConversion);
    3.After that execute the model - code is given below :
        IWDMessageManager manager = wdComponentAPI.getMessageManager();
        try
          wdContext.currentRequest_ConversionRateElement().modelObject().execute();
          wdContext.nodeResponse().invalidate();
          wdContext.nodeConversionRateResponse().invalidate();
        catch(Exception e)
          manager.reportException(e.getMessage(), false);
    Please let me know how to resolve this.
    Thanks
    Sandy

    Hi,
    You need to use destinations for metadata and modeldata.
    Configure those destination in Visula admin.
    you can refer to following link.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7
    Regards,
    Shruti.

  • IWAB0014E Unexpected exception - Exposing Portal Services as Web Services

    Hi!
    I try to expose a Portal Service as a Web Service:
    [Exposing Portal Services as Web Services |http://help.sap.com/saphelp_nw72/helpdata/en/49/e44e702784751be10000000a42189b/frameset.htm]
    While using the wizard the following exception is rising:
    IWAB0014E Unexpected exception occurred.
          java.lang.IllegalArgumentException
          at org.eclipse.wst.server.core.internal.facets.FacetUtil.getRuntime(FacetUtil.java:89)
          at org.eclipse.jst.server.core.FacetUtil.getRuntime(FacetUtil.java:59)
          at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.setFacetRuntime(CreateFacetedProjectCommand.java:283)
          at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.getFacetsToAdd(CreateFacetedProjectCommand.java:219)
          at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.execute(CreateFacetedProjectCommand.java:115)
          at org.eclipse.jst.ws.internal.creation.ui.extension.PreServiceDevelopCommand.execute(PreServiceDevelopCommand.java:191)
          at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
          at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
          at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
          at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
          at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
          at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
          at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)
          at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
          at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
          at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:154)
          at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)
          at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:813)
          at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)
          at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
          at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
          at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
          at org.eclipse.jface.window.Window.open(Window.java:801)
          at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
          at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
          at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
          at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
          at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
          at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
          at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
          at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
          at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
          at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
          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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
          at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    Has anybody an idea, or can tell me another way to do for NW 7.2?
    Thanks Daniel

    Hi Ankur,
    Please go through the below link please. It may be helpful.
    Eclipse WTP Tutorials - Creating Bottom Up Web Service via Apache Axis2
    Thanks,
    Hamendra

  • Get date from portal in a web dynpro?

    hi all,
    how get date from portal in a web dynpro???
    thanks.

    new Date(System.getTimeInMillis());
    Good luck, Roelof

  • How to set a variable in portal session using web dynpro java.

    Hi,
    I have created a web dynpro application, which is running inside portal. I have created a role called "R1". Inside role R1, i have created 3 workset W1, W2 and W3. and inside each workset i have some pages and iviews.
    My requirement is when user logins to the portal , and when he clicks on role R1 for the first time, a login page should come (so that we can do revalidation), and when he enters his password again in that login page , then only workset W1, W2 and W3 should be visible/accessible to him and after successful revalidation, if he clicks again on role R1, in that particular portal session, than that login page should not come.
    for this, i thought i will set a variable in portal session, whenever user successfully revalidated himself, and if after successful revalidation he clicks again on role R1, i will check in doinit method of webdynpro whether variable is set or not (which i already set on successful revalidation), and if it is set then i will do Donavigation else i will present login page to the user.
    Can anyone tells me how to set a variable in portal session using web dynpro java.
    thanks
    Arush

    Hi,
    Try this:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE, key, value)
    WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE, key)
    Ex:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE,"Key1","Value1");
    String value1=WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE,"Key1").toString();
    /people/william.cui/blog/2007/02/12/sharing-session-context-between-parent-and-external-windows-running-on-same-host
    Regards,
    Charan

  • Can the role info be passed from portal to ABAP web dynpro application

    Hi,
    We have some roles in the portal. We call the ABAP web dynpro applications from the portal. Is it possible to pass on the role from the portal to the Web dynpro ABAP application so that we can use this role information in the application.
    Thanks,
    Pooja

    Hi,
    you can try to add the expression
      role=<IView.PCDUnit>
    as part of the Application Parameters in the iView. This will be the role in 99%. However not all iViews started in the Portal must belong to a role. You can start iViews using page navigation that are not part of a role. Therefore the PCD does not talk about roles but about "units" which is the superordinate term.
    the value will be the PCD path of the role - e.g:
      portal_content/myFolder/roles/myRole

  • Accessing ABAP Functions in Web Dynpro Java

    Hi,
    I am trynig to do "Accessing ABAP Functions in Web Dynpro Java" this application, (which is the example application which i got from www.sdn.sap.com) but everything is fine no error also while dyploying.
    But it is not dysplaying the first page after i run the application i am getting plain web page ,without any content.
    Can any body help me.
    Regards,
    H.V.Swathi

    k.. now iam getting some error on page.
    I have embeded the two view in to window.
    But now after running the application i am getting connection error
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connect_PM TYPE=B MSHOST=jktr3 GROUP=SPACE R3NAME=R32 MSSERV=sapmsR32 PCS=1 ERROR Group SPACE not found TIME Fri Sep 26 15:05:59 2008 RELEASE 700 COMPONENT LG VERSION 5 RC -6 MODULE lgxx.c LINE 4288 DETAIL LgIGroupX COUNTER 1
        at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:457)
        at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:989)
        at com.sap.mw.jco.JCO$Client.connect(JCO.java:3193)
        at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:90)
        at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:122)
        ... 61 more
    Rgards,
    H.V.Swathi

  • How to call web services in WEB DYNPRO ABAP

    Hi ABAPER'S,
    Please let me know how to call web services in web dynpro.
    Thanks,
    Sandy.

    Hi Sandy,
    Please check this blog..
    /people/riyaz.sayyad/blog/2006/05/08/consuming-xi-web-services-using-web-dynpro-150-part-ii
    also cehck this...
    call the webservices in webdynpro ABAP.
    calling webservice in webdynpro component
    Re: Web Services in WDA.
    Cheers,
    Kris.
    Edited by: kissnas on May 24, 2011 11:37 AM

Maybe you are looking for

  • How to reformat Ipod Nano 5th gen when not recognized by Windows or iTunes?

    I've done all the steps on the site to correct this problem up until the reformatiing part except I tried to update the driver software but Windows says that it encounters an error when trying to install the new software. So after going through the s

  • Data in the cube is showing multiple entries when compared with ODS

    Hello BW Gurus, We have a waste report in production planning on Cube and ODS separately. The same info package loads both targets (which means same infosource) but when we run a report on Cube, the records are showing multiple entries (i.e. Key Figu

  • Separate tracks from sountrack pro file in FCP ?

    Hi there, I have finally got a stereo recording with STP from a direct recording via "line in". Saved as STP file. Imported into FCP : I cannot find a way to separate the two tracks. I know how to hear only one, but I would like to import only one of

  • I recently purchased an ipod touch.

    The pc i was using has internet access, so i was able to d/l itunes. For the next 3 months (with my new pc) i cannot access the net. How can i get itunes onto my pc without internet access? The Apple call centre i contacted told me to burn a copy of

  • Issue in Invoice Output

    Hi All, I am in the process of preparing Functional Specs. Excise Invoice number should print in Invoice output. Kindly help me writing a logic. Regards, Raju