cancel
Showing results for 
Search instead for 
Did you mean: 

Import Web Service Model

0 Kudos

Dear all:

I am new for the Web Dynpro - Java and try to create a sample program.

I create a BAPI at R/3 and imported through Intergration Builder.

After activate the BAPI and export WSDL, I try to import into my testing program.

At first I try to import as Adaptive web service model, but I got an error message:

"Error in loading the WSDL file. Check the error log for more details".

(I have a silly question, where can I view the log file?)

Then, I try to import as Web Service Modle - DEPRECATE.

No error duing import but the models is not shown in the Web Dynpro Explorer.

I use Package Explorer to check the src/packages, I can see the

"com.sap.testing.model.proxies.types".

However, thereare many error icon (mark X).

I try to deploy the package and got many error message:

"The import com.sap.engine.services cannot be resolved"

"The import com.sap.engine.lib cannot be resolved"

"SOAPDeserializationContext cannot be resolved (or is not a valid type) for the argument context of the method deserialize"

Is there any library file I missing?

Thank in advance for the help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

Hi Hung,

After creating BAPI Try to test your WSDL in your system, if it successful there

Then you try to import that BAIP to your application.

I believe your are missing servelet.jar file.

Thanks

0 Kudos

Thanks for the reply.

It seem I am lack of knowledge on both of XI and Web Dynpro.

After many tries, I am able to submit a test message through Runtime Workbench so the XI side should be okay.

I export the WSDL and import into Web Dynpro project.

Now I am trying to create a sample program to call the BAPI and display the result.

I import the model and link the "import parameter" to the inputfield in the "StartView",

and create a table link to the Resposne.result.

The column header is automatic generated in the view.

I add the following codes into the project:

public void TS_Execute( )

{

//@@begin TS_Execute()

IWDMessageManager manager = wdComponentAPI.getMessageManager();

try

{

wdContext.currentRequest_ZBAPI_TRADESHOW_SCHEDULE_MI_ZBAPI_TRADESHOW_SCHEDULE_MIElement().modelObject().execute();

wdContext.nodeResponse().invalidate();

wdContext.nodeResult().invalidate();

}

catch(Exception e)

{

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

}

//@@end

}

public void onActionToResult(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionToResult(ServerEvent)

wdThis.wdGetTrade_ShowController().TS_Execute();

wdThis.wdFirePlugToResult();

//@@end

}

After deply and run, the input field is not allow for any input.

Also, there is not data return from the BAPI, a red cross icon is show at the end of the empty table.

(The BAPI have default value which should always have return)

former_member192434
Active Contributor
0 Kudos

Hi Hung,

Your input field is disable you need to bind it by using following code in init() method

Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();

wdContext.nodeBapi_Flight_Getlist_Input().bind(input);

just check out you are invaliding your node on right palce.

Also check, if you are setting any input value to the BAPI wether it been set properly or not before excuting it

Thanks

Anup

Edited by: Anup Bharti on Oct 16, 2008 6:29 AM

Edited by: Anup Bharti on Oct 16, 2008 6:33 AM

Answers (2)

Answers (2)

0 Kudos

Dear Anup:

I fixed it by create a customer controller and able to solve the input field problem now.

However, I got an error which seem to be relate to the authorization.

Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://hkgas209:50100/XISOAPAdapter/MessageServlet?Channel=:EPT:SOAP_TS_CODE_Sender&version=3.0&Sender.Service=EPT&Interface=http%3A%2F%2Fpuma.com%2Fpo%5EZBAPI_TRADESHOW_SCHEDULE_MI"

I search the forum and try to pass the code as following:

Request_ZBAPI_TRADESHOW_SCHEDULE_MI_ZBAPI_TRADESHOW_SCHEDULE_MI model = new Request_ZBAPI_TRADESHOW_SCHEDULE_MI_ZBAPI_TRADESHOW_SCHEDULE_MI();

model._setUser("user");

model._setPassword("password");

wdContext.nodeRequest_ZBAPI_TRADESHOW_SCHEDULE_MI_ZBAPI_TRADESHOW_SCHEDULE_MI().bind(model);

However, I got another message "Server Error" after I do so

former_member192434
Active Contributor
0 Kudos

Hi Hung,

First you need to restart your server.

if problem still comes just Check out these forum links

Thanks

Former Member
0 Kudos

Hi

http://help.sap.com/saphelp_nw04/helpdata/en/f4/abe4107f46334bb8640a090e5806fc/frameset.htm

Please go through this link Hope you will fid your answer

Regards

Ruturaj