on 09-12-2008 1:11 PM
Hello,
I have created a WebDynpro project with a webservise model.
After the deploy, when I run it, the system returns the following error:
Processing HTTP request to servlet [dispatcher] finished with error.
The error is: java.lang.NoSuchMethodError: com.sap.engine.services.webservices.jaxrpc.wsdl2java.BaseGeneratedStub._initParameter(Lcom/sap/engine/services/webservices/jaxrpc/wsdl2java/ServiceParam;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Class;)V
Exception id: [000F202B654C006D000001580000161B000456B0AEB73C43]
________________________________________________________________
The error encurred into the View's doInit method, at the following point showed between the "Error point" bold comment:
public void wdDoInit()
{
//@@begin wdDoInit()
InitialContext ctx ;
Object obj;
DestinationService dstService;
Destination destination;
HTTPDestination httpDestination ;
HttpURLConnection httpurlconnection = null;
Properties destprop = null;
String serverName = "";
// Give your web service name
String serviceURL = "/WS_ExampleStockQuote/Config1?style=document";
String prefixURL = "http://";
try
{
ctx = new InitialContext();
obj = ctx.lookup(DestinationService.JNDI_KEY);
dstService = (DestinationService) obj;
// ApplicationServer is HTTP destination name which i added through visual Admin
destination = dstService.getDestination("HTTP","WS_ExampleStockQuote");
destprop = destination.getDestinationProperties();
httpDestination = (HTTPDestination) destination;
serverName = httpDestination.getUrl();
prefixURL = prefixURL + serverName;
}
catch(Exception ex)
{
manager.reportException(ex.getMessage(), false);
}
serviceURL = prefixURL + serviceURL;
// $$begin Service Controller(831926490)
// Error point - Begin
Request_WS_ExampleStockQuoteViDocument_getLista addRequest= new Request_WS_ExampleStockQuoteViDocument_getLista();
// Error point - End
addRequest._setEndPoint(serviceURL);
wdContext.nodeRequest_WS_ExampleStockQuoteViDocument_getLista().bind(addRequest);
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try{
wdContext.currentRequest_WS_ExampleStockQuoteViDocument_getListaElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
Vector v1 = wdContext.nodeResponse().currentResponseElement().getResult();
wdContext.currentContextElement().setS(v1.get(0).toString());
} catch(Exception ce) {
manager.reportException(ce.getMessage(), false);
}
wdContext.currentContextElement().setS(serviceURL);
//@@end
}
________________________________________________________________________
Does anyone know the matter?
Thanks and best regards,
Matteo
Hi Matteo,
Instead the way we do that in all another kind of enterprise java application, webservices aren't able to uderstand java.util.Vector, java.util.Array, Collections, etc... they only recognize Complex and Simple Types in WSDL, it means simple objects or simple arrays of objects.
Check too the parameters at your method signature, they should be the same at the server side.
Try to verify if at the WebDynPro side the objects that you're manipulating from the server side has the same version (some kind of reflection problem).
Your application problably is crashing up at this point.
Vector v1 = wdContext.nodeResponse().currentResponseElement().getResult();
exactly when you're trying to get back a vector from your WebService Model.
Even if you test it at your WebServices Navigator, it shows that you have there a fulfiled java.util.Vector object...but to be able to recover data at WebDynPro side, try to make a java.lang.Array of the VO or Object that you're trying to recover.
It must be something like
MyOwnVO[] vo = wdContext.nodeResponse().currentResponseElement().getResult();
At this point your application must not throw an exception about compilation of your WebDynPro application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I have tested the webservice in the NWDI Web service perspective and it works fine.
When I run the WebDynpro application, the system returns the error I have explaned in the previous post.
The point of error is exactly between the "Error point" bold comment.
Thanks,
best regards.
Matteo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo,
First check whether ur webservice is working or not.U can check it by going to the index page of the portal and clicking the link webservices navigator if it is a "Webservice that is written by u and deployed on the J2EE Engine",
If it is an "External Webservice " u can check it in the Portal perspective ->Window -> open view -> Enterprise poratl webservice checker . A view will be opened at the bottom of the screen.In that give the specified URl for the webservice and u can check it there.
If the final result is that "Web Service is Working" u can concentrate on ur settings and programming logic.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo,
Instead the way we do that in all another kind of enterprise java application, webservices aren't able to uderstand java.util.Vector, java.util.Array, Collections, etc... they only recognize Complex and Simple Types in WSDL, it means simple objects or simple arrays of objects.
Check too the parameters at your method signature, they should be the same at the server side.
Try to verify if at the WebDynPro side the objects that you're manipulating from the server side has the same version (some kind of reflection problem).
Your application problably is crashing up at this point.
Vector v1 = wdContext.nodeResponse().currentResponseElement().getResult();
exactly when you're trying to get back a vector from your WebService Model.
Even if you test it at your WebServices Navigator, it shows that you have there a fulfiled java.util.Vector object...but to be able to recover data at WebDynPro side, try to make a java.lang.Array of the VO or Object that you're trying to recover.
It must be something like
MyOwnVO[] vo = wdContext.nodeResponse().currentResponseElement().getResult();
At this point your application must not throw an exception about compilation of your WebDynPro application.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matteo,
First, can you check whether you able to access your web service url in browser?
or
you can test your webservice from the NWDI Web service perspective, here you can test your web service is correctly functioning or not before using in your Web Dynpro application.
This document clearly explains How to test the web service url and what is the correct procedure to consume the web service in SAP portal.
http://help.sap.com/saphelp_nw70/helpdata/en/f4/1a1041a0f6f16fe10000000a1550b0/content.htm
Thanks
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check if the Web service has been deployed propoerly. You may check out the working of the Webservice in wsnavigator.
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.