Skip to Content
Former Member
Mar 26, 2009 at 08:14 PM

How to consume web service in NWDS CE 7.1?


Hi all,

I have a web service defined in XI/PI (process integration), and want to consume it in NWDS CE 7.1. I did some research and there is a sap help regarding this. However this just does not apply to my case, the corresponding classes referred to in the help just does not exist in my case.

What I did:

1) Import the wsdl into my java project

2) Generate ws client based on the wsdl (Java standalone, not java proxy as EJB)

3) After the client generation, I have four java classes:

a) public interface SI_CounterReading_Out_A extends java.rmi.Remote

b) public class SI_CounterReading_Out_ABindingStub extends org.apache.axis.client.Stub implements SI_CounterReading_Out_A

c) public interface XI_6F873345De7D38C48610E2F078F60406_Service extends javax.xml.rpc.Service

d) public class XI_6F873345De7D38C48610E2F078F60406_ServiceLocator extends org.apache.axis.client.Service implements XI_6F873345De7D38C48610E2F078F60406_Service

4) I crated a java class to call the ws client by using the four classes. However I couldn't get it work.

The code I have:

String endPoint = "http://myendpoint";

SI_CounterReading_Out_ABindingStub stub = new SI_CounterReading_Out_ABindingStub();


stub._setProperty(stub.PASSWORD_PROPERTY, "mypassword");

stub._setProperty(stub.ENDPOINT_ADDRESS_PROPERTY, endPoint);


I ran the program, no exception, but apparently the ws was not called.

I also tried the code;

SI_CounterReading_Out_A port = service.getHTTP_Port(); bp = (;

Map<String,Object> context = bp.getRequestContext();

context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endPoint);




I got exception taht the class cast bp = (;does not work.

Can somebody tell me how to consume the ws in NWDS CE 7.1É