on 07-15-2008 4:34 PM
Hi,
i'm currently developing an application using web dynpro JAVA and having some Problems with including a webservice. The Webservice takes a ID as argument and returns a detailed record with the Sales corresponding to this id. I'm using SAP NetWeaver 7.1 EhP 1 SP00 PAT0000.
I performed the following steps:
1. Imported the Model through a wsdl-File
2. Created a Logical Destination for this Webservice on my AS
3. I used the "Service Controller" - Template to generate the Context Bindings and the method for invoking the webservice.
4. I created a simple Form for entering the ID and a button whos actionmethod invokes the webservice.
5. Then when i'm deploying the project everything works fine until i click on the button and invoke the webservice. Following error is displayed.
Exception on execution of web service on destination SalesOrder_EXEC for operation SalesOrderByIDQueryResponseIn in interface {http://sap.com/xi/NWDemo}SalesOrderByIDQueryResponseIn
It would be really nice if someone has a solution or at least some ideas.
Greets
Carl Heckmann
Hi Carl,
After importing the model in Web Dynpro and generating the context binding with service controller you have to initialize the request part (request node and all subnodes in the request node) of the model in the wdDoinit method of the component controller. After this you can perform step 4 and deploy your application.
Please check the following links for detailed information.
Regards,
Yasar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, finally I figured out the problem. It laid inside the webservice or more precise in a difference between WSDL and webservice and a too strict interpretation from the web dynpro side.
The WSDL defined the length of an attribute inside the response to 3 characters, but the webservice only returns a value with one char. And now the web dynpro engine is complaining about that.
In my opinion this should be a warning but under no circumstances an exception.
Now I'm trying to solve the Problem through an "adapter" CAF-webservice. Hope it will work.
Greets,
Carl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using a destination SaleOrder_LOCAL for Execution as well as for MetaData.
The Destination is from type WSDL with the following url:
The timeout is the default 60sec value.
Additionally I have set the Authentication-Settings to HTTP and just entered the user data.
I also tested this destination with the wsnavigator and it worked.
Greets,
Carl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carl,
You are right, both request messages are same and should return the same response.
The only thing what I see is the logical destination configuration. Could you re-check this configuration?
Are you using Metadata and Execution destinations?
What is the URL for this Destinations?
Regards,
Yasar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, that hint was really good.
But I still haven't solved my problem.
This is the request from the webservicenavigator which works:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<yq1:SalesOrderByIDQuery xmlns:yq1="http://sap.com/xi/NWDemo">
<SalesOrderSelectionByID>
<ID xmlns:pns="http://sap.com/xi/BASIS/Global" schemeID="0" schemeAgencyID="0" schemeAgencySchemeAgencyID="0">50000000000</ID>
</SalesOrderSelectionByID>
</yq1:SalesOrderByIDQuery>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
and this is my applications request, which isn't even generating a response message.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<yq1:SalesOrderByIDQuery xmlns:yq1='http://sap.com/xi/NWDemo'>
<SalesOrderSeectionByID>
<ID schemeID='0' schemeAgencyID='0' schemeAgencySchemeAgencyID='0' xmlns:pns='http://sap.com/xi/BASIS/Global'>5000000000</ID>
</SalesOrderSelectionByID>
</yq1:SalesOrderByIDQuery>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Am I wrong or should these both requests normally result in the same response?
Greets,
Carl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carl,
The problem you have is not directly related with the web dynpro view. Its more about the service you are consuming.
It is possible to change the trace level of the log viewer. If you can do this, you are also able to see the request and response messages for the service. If you could do this, it will simplify your search for the reason.
Regards,
Yasar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as i can see there is no additional dynpro stacktrace. Indeed the webdynpro page displays correctly. The errormessage I posted in my first post is only shown by the web dynpro MessageManager.
What's also strange is, that i found out, that the exception only occurs if I enter an id for a Sale, which exists.
Greets,
Carl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Carl,
This is the general part of the exception.
Could you please post the specific part of the exception, related with your web dynpro application?
Regards,
Yasar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This should be the Exception:
java.lang.NullPointerException
at com.sap.esi.esp.service.server.SOATimeoutListenerImpl.process(SOATimeoutListenerImpl.java:187)
at com.sap.esi.esp.service.server.SOATimeoutListenerImpl.run(SOATimeoutListenerImpl.java:74)
at com.sap.esi.esp.service.server.SOATimeoutListenerImpl.timeout(SOATimeoutListenerImpl.java:55)
at com.sap.esi.esp.service.server.SOATimeoutListenerImpl.timeout(SOATimeoutListenerImpl.java:43)
at com.sap.engine.services.timeout.TimeoutNode.run(TimeoutNode.java:71)
at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:162)
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:260)
I hope you get more information out of it than me
Greets,
Carl.
Edited by: Carl Simon Heckmann on Jul 16, 2008 10:23 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carl,
If you trigger the error on the portal and check the Log Viewer on Netweaver Administrator, you can retrieve the exception in details.
Is it possible to put this exception here?
Regards,
Yasar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well there are a bunch of logfiles, i don't know which one would helpful for you and all of them would be definately too much too insert here. If you could tell me which one would help you I will post it in here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carl,
Could you please post the log of the error?
In the log you can find a detailed description of your problem.
Regards,
Yasar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First of all, thanks for your quick reply.
I already found and read the resources you gave me and I think you're missing something like that:
//$$begin Service Controller(-1574168931)
SaleByIdModel saleByIdModelModel = new SaleByIdModel();
request_SalesOrderByIDQueryResponseIn = new Request_SalesOrderByIDQueryResponseIn(saleByIdModelModel);
Response_SalesOrderByIDQueryResponseIn response = new Response_SalesOrderByIDQueryResponseIn(saleByIdModelModel);
request_SalesOrderByIDQueryResponseIn.setResponse(response);
SalesOrderByIDResponse salesOrderByIDResponse = new SalesOrderByIDResponse(saleByIdModelModel);
response.setSalesOrderByIDResponse(salesOrderByIDResponse);
SalesOrder salesOrder = new SalesOrder(saleByIdModelModel);
salesOrderByIDResponse.setSalesOrder(salesOrder);
SalesOrderByIDQuery salesOrderByIDQuery = new SalesOrderByIDQuery(saleByIdModelModel);
request_SalesOrderByIDQueryResponseIn.setSalesOrderByIDQuery(salesOrderByIDQuery);
SalesOrderSelectionByID salesOrderSelectionByID = new SalesOrderSelectionByID(saleByIdModelModel);
salesOrderByIDQuery.setSalesOrderSelectionByID(salesOrderSelectionByID);
BusinessTransactionDocumentID iD_1 = new BusinessTransactionDocumentID(saleByIdModelModel);
salesOrderSelectionByID.setID(iD_1);
wdContext.nodeRequest_SalesOrderByIDQueryResponseIn().bind(request_SalesOrderByIDQueryResponseIn);
//$$end
This was already generated through the Service Controller Template.
Another thing I should mention is the fact, that another webservice worked , when I included it exactly the same way like I did it here. But the webservice is correct, I can verify it by executing it through the webservice navigator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.