Skip to Content
author's profile photo Former Member
Former Member

Problem in webservice consuming

Hello Everybody,

I am facing a problem. I have a xMII transaction and exposed as webservice. In java Web Dynpro I have consumed it in two ways.

1. Import Adaptive Web Service Model

2. Import Web Service Model - DEPRECATED

The model which I have created using 2nd one is working properly but the 1st one is not working.

One more query:

When I create the model using 2nd option then with the model it creates a Logical port but the other way it doesn't.

Please help me out.

Thanks and regards,

Pradip

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 05:20 AM

    Hi,

    I think this problem is due to accesssing the webservice in a lower version (2004) to the 2004s.so that it is properly working when you import it as depricated.To use it as a Adaptive webservice model you should give the user name and password.

    Use the following sample code in the method created in cusotm controller

    public void executeRequest_ConcatViDocument_concatmethod( )

    {

    //@@begin executeRequest_ConcatViDocument_concatmethod()

    //$$begin Relate Context Attributes(-1470403384)

    wdContext.currentRequest_ConcatViDocument_concatmethodElement().modelObject()._setUser("<username to access webserive in server>");

    wdContext.currentRequest_ConcatViDocument_concatmethodElement().modelObject()._setPassword("pwd");

    IPrivateConcustm.IConcatinElement concatinElement = wdContext.currentConcatinElement();

    IPrivateConcustm.IRequest_ConcatViDocument_concatmethodElement request_ConcatViDocument_concatmethodElement = wdContext.currentRequest_ConcatViDocument_concatmethodElement();

    // if ((concatinElement != null) && (request_ConcatViDocument_concatmethodElement != null)) {

    request_ConcatViDocument_concatmethodElement.setString1(wdContext.currentConcatinElement().getFststr());

    request_ConcatViDocument_concatmethodElement.setString2(wdContext.currentConcatinElement().getSndstr());

    // }

    //$$end

    //$$begin Service Controller(-667725164)

    IWDMessageManager manager = wdComponentAPI.getMessageManager();

    try

    {

    wdContext.currentRequest_ConcatViDocument_concatmethodElement().modelObject().execute();

    wdContext.nodeRequest_ConcatViDocument_concatmethod_Response().invalidate();

    }

    catch(Exception e)

    {

    manager.reportException(e.getMessage(), false);

    }

    //$$end

    //$$begin Relate Context Attributes(1565609543)

    IPrivateConcustm.IConcatoutElement concatoutElement = wdContext.currentConcatoutElement();

    IPrivateConcustm.IRequest_ConcatViDocument_concatmethod_ResponseElement request_ConcatViDocument_concatmethod_ResponseElement = wdContext.currentRequest_ConcatViDocument_concatmethod_ResponseElement();

    // if ((concatoutElement != null) && (request_ConcatViDocument_concatmethod_ResponseElement != null)) {

    // request_ConcatViDocument_concatmethod_ResponseElement.setResult(concatoutElement.getConstr());

    // }

    String ccnt=wdContext.currentRequest_ConcatViDocument_concatmethod_ResponseElement().getResult();

    wdContext.currentConcatoutElement().setConstr(ccnt);

    //$$end

    //@@end

    }

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Ramanan,

      There are no methods like _setUser(String), _setPassword(String) in the model object. I think that's specific to your web service. Do you have any generic solution ?

      Can anybody with xMII knowledge throw some light on this ?

      Regards,

      Pradip

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 05:32 AM

    This problem is resolved and you can get the detail

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40e92be5-5468-2b10-3f87-99ef5731272b

    Thanks to all of you.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 05:32 AM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.