cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive Web Service Model in SP 17

Former Member
0 Kudos

Hello everyone,

We are using a Portal Web Service together with Web Dynpro application which is consuming this Web Service using Destinations service. This worked fine prior to SP17 which seems to have deprecated the Web Service Model in favor of the Adaptive Web Service Model. However now we have a problem getting our application to work again in SP17.

1. I have tried to import the adaptive web service wsdl directly from the server, however the import wizard failed with following error:

Exception: com.sap.tc.webdynpro.model.weservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WSDL URL

Class: com.sap.ide.webdynpro.modeleditor.wizards.model.creation.PageRenameWS

Method: loadNameSpacesAndModelClasses

Message: Cannot load NameSpaces and ModelClasses

2. Import was succesful when I used the same Wsdl from a file. Destination has been set up in Visual Admin, but Web Dynpro application gives following error when being run:

com.sap.engine.services.webservices.jaxrpc.exceptions.XmlUnmarshalException: XML Deserialization Error. Node [http://schemas.xmlsoap.org/wsdl/][message] not described in Schema.

at com.sap.engine.services.webservices.jaxrpc.encoding.GeneratedComplexType.deserialize(GeneratedComplexType.java:1726)

at com.sap.engine.services.webservices.jaxrpc.encoding.XMLMarshaller.unmarshal(XMLMarshaller.java:406)

at com.sap.engine.services.webservices.wsil.WSILParser.load(WSILParser.java:65)

at com.sap.engine.services.webservices.wsil.WSILParser.loadInspection(WSILParser.java:86)

at com.sap.engine.services.webservices.espbase.query.WSQueryImpl.initialize(WSQueryImpl.java:197)

... 47 more

com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata destination 'MyWebService' and WS interface 'MyService'. One possible reason is that the metadata destination 'MyWebService' has not been properly configured; check configuration.

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:439)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.readOperationsFromWSDL(WSModelInfo.java:371)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadataInternal(WSModelInfo.java:341)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.importMetadata(WSModelInfo.java:325)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo$Cache.getModelInfo(WSModelInfo.java:198)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getModelInfoFromCacheOrCreate(WSModelInfo.java:1029)

at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getModelInfoFromCacheOrCreate(WSModelInfo.java:247)

at com.sap.tc.webdynpro.model.webservice.gci.WSTypedModel.<init>(WSTypedModel.java:41)

at ws.model.MyWebService.<init>(MyWebService.java:41)

at ws.WdpView.wdDoInit(WdpView.java:102)

Has anyone made Web Dynpro import an Adaptive Web Service Model using destinations in Sp17 ? If so I would be glad to hear how this has to be done.

Thanks in advance for any suggestions

Accepted Solutions (0)

Answers (3)

Answers (3)

nitin_mahajan2
Contributor
0 Kudos

Exact Same error with my webservices hosted on PI7.1 SP6 ESR and i am trying to invoke them on NWDS 7.0 SP8.

I have tried all the options available on NWDS, it gives the same error as written in your mail on all the instances except one when i use the URL on Adaptive webservice model without destinations where it won't even let me create the model.

Any generic solution to it?

Former Member
0 Kudos

Check the weblog

/people/anilkumar.vippagunta2/blog/2006/12/13/secured-webservices-ii

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil,

U mean to say that, it is mandatory to configure a destination in Visual Admin for accessing it from Webdynpro?

Regards

Raj

Former Member
0 Kudos

Hi Raj,

If you are using destinations then you should configure the desstinations in VisualAdmin otherwise No need.

Regards, Anilkumar

Former Member
0 Kudos

Hi,

I have downloaded WSDL from a 3rd party application. (i just have hte WSDL with me). I am now trying to create an adaptive WS model using the WSDL.

now, should i create a Destination in Visual admin or not.

Currently i did not create a destination for the same and am getting the error :<i>Cannot load NameSpaces and ModelClasses:</i> mentioned in the SDN thread..

Regards,

Raj

Former Member
0 Kudos

Hello Michal,

I don't have a solution for your problem, but am trying to use your approach on using a destination service for accessing a web service from a web dynpro application.

Can you please help me in answering these questions that I have from my understanding from your post?

1. I am assuming you are using a destination service instead of "Import a web service model" so that you can configure your web service (deployed via deployable proxy) (as to where it points to) after deployment to qa/prod. Am I right ?

2. Can you do data binding if Destination service is used? I know data binding is easy if "Import a web service Model" is used. But not sure of Destination service.

3. If you have a piece of code showing how to use a Destination service to access a web service, that'll be helpful.

Thanks a lot,

Kiran

Former Member
0 Kudos

Hello Kiran,

We have a perfectly working web service - web dynpro solution on our production system which still runs on pre-SP 17 version of Netweaver, so I can describe you that.

We used "Import web service model" just as you wrote, gave a specific Wsdl to create a model. Then however, you don't have to use the Logical port that still points to your original Wsdl source address, instead you set Destination name directly when executing a function. See the following code except:

private void executeRequest_deleteItem(long item_id)

{

try{

wdContext.currentRequest_DeleteItemElement().setDeleteItem_1_Param(item_id);

Request_DeleteItem modelObject = wdContext.currentRequest_DeleteItemElement().modelObject();

modelObject._setHTTPDestinationName("MyService");

modelObject.execute();

}catch(Exception e){

}

}

by calling _setHTTPDestination("MyService") the Destination named "MyService" will be used.

However, in SP 17 the "Import web service model" is deprecated and "Import adaptive web service model" should be used, without success in our case.

Hope it helps,

Michal

Former Member
0 Kudos

Thank you for answering my questions. Do let us know if you were able to solve the "Import adaptive web service model" problem that you were experiencing.

Thanks again,

Kiran

Former Member
0 Kudos

Michal,

I tried what you said. I created an HTTP destination with "MyService" as name and added the code you suggested. My web dynpro application works fine, but when I change the URL in Visual Administrator->Destinations->HttpDestinations to point to another server (qa), my web dynpro applications behaves as though it still points to the dev system (which was what initially). Its as though the following line of code has no effect.

modelObject._setHTTPDestinationName("MyService");

Is there anything I am missing?

Thanks,

Kiran

Former Member
0 Kudos

Long since last post.

Has anybody been able to create and use an Adaptive Web Service Model in SP17 ? I keep on with a trial-error process but not got anywhere so far other than ending up with an XML Deserialize Error durin import of wsdl at run time.

Where can I find documentation about this new way to embed/call web services from WebDynpro?

Thanks in advance

Vitaliano

Former Member
0 Kudos

I figured out how this works. I was pointing the Adaptive Web Service Destination in visual administrator to the wrong URL... I should have pointed it to where wy WSIL is located and not to the WSDL anymore. i.e. http://mysapserver:50000/inspection.wsil instead of http://somewhere:5000/MyWebService/Config1.

this probably is where others got stuck as it was not really clear in SAP's PDF "Using Adaptive Web Service Model for Java Web Dynpro"

Regards,

Vitaliano

Former Member
0 Kudos

Hi,

I am also getting teh same problem. how can we resolve this error.?

Regards,

Raj