cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with operation GetAllCars

Former Member
0 Kudos

Hello experts,

I have developed a operation which should return a table of cars.

Really simillar to the find all operation of the Businessobject "cars". (It´s a wrapper which calls the findall operation)

If I try to run the webservice in the WSNavigator there is following error message:

"com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException "-

I have implemented the Application Service as following code:

package gennari.mhp.modeled.appsrv.servicesfuhrpark;

import java.lang.Object;

import gennari.mhp.types.Cars;

import gennari.mhp.types.Ret_Cars;

import java.util.*;

import com.sap.caf.rt.exception.CAFFindException;

@com.sap.caf.dt.CAFWebService(name="ServicesFuhrpark")

@javax.jws.soap.SOAPBinding(style=javax.jws.soap.SOAPBinding.Style.RPC, use=javax.jws.soap.SOAPBinding.Use.LITERAL)

@javax.jws.WebService(name="ServicesFuhrpark", serviceName="GetallCarsAS", portName="GetallCarsASPort", targetNamespace="http://www.sap.com/caf/gennari/mhp/modeled", wsdlLocation="META-INF/wsdl/ServicesFuhrpark.wsdl")

@javax.ejb.Stateless(name = "gennari.mhp.modeled.appsrv.servicesfuhrpark.ServicesFuhrpark")

@javax.ejb.Local(value = { gennari.mhp.modeled.appsrv.servicesfuhrpark.ServicesFuhrparkServiceLocal.class })

@javax.ejb.Remote(value = { gennari.mhp.modeled.appsrv.servicesfuhrpark.ServicesFuhrparkServiceRemote.class })

@javax.interceptor.Interceptors(value = { com.sap.caf.rt.interceptors.LogInterceptor.class })

public class ServicesFuhrparkBeanImpl extends

gennari.mhp.modeled.appsrv.servicesfuhrpark.ServicesFuhrparkBean {

@com.sap.caf.dt.CAFOperation(name="GetAllCars")

public gennari.mhp.types.Ret_Cars GetAllCars() {

Ret_Cars ret_cars = new Ret_Cars();

try {

Collection docList = this.getcarsService().findAll();

ret_cars.setTest((List) docList);

} catch (CAFFindException fe) {

}

return ret_cars;

}

}:

It seems that everything is okay in the CE but I am not able to run this operation as Webservice.

I deployed and I exposed it as webservice. Is there anything else which I have to do??

XML Content:

Hope you experts can help me

Regards

Marco

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

I have a similar problem; how did you solve it?

The xml content is as follows

<?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>

<SOAP-ENV:Fault>

<faultcode>SOAP-ENV:Server</faultcode>

<faultstring>com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException</faultstring>

<detail>

<yq1:com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException xmlns:yq1="http://sap-j2ee-engine/client-runtime-error">

<!-- com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException -->

</yq1:com.sap.engine.services.webservices.espbase.server.additions.exceptions.ProcessException>

</detail>

</SOAP-ENV:Fault>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Thanks,

Daria

Former Member
0 Kudos

Hi Daria,

my problem was that I have tested the Application Service first in the Service Browser of the CAF. But this will not work. You have to test it in the WS navigator. The big problem is: If you have already tested it in the Service Browser the WS navigator will remember that something was wrong.

You should do following:

1. Deploy the AS

2. Test it in the WS navigator.(It is really important to do not run the AS in the CAF.

Hope that will help you.

Regards

Marco