on 08-03-2011 8:52 AM
Hi Group,
Can any body help me with code to consume SAP PI webservice using standalone Java client using WSDL and URL.
Hi,
I know it is a bit general guide, but hopefully you'll find it useful:
http://help.sap.com/saphelp_nwce72/helpdata/en/46/935a636110581de10000000a1553f7/frameset.htm
Regards,
Ervin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can refer below article........
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In NWDS select "New->Other->Web Services->Standalone Proxy Project", give a name for a project. Select new project, right click, select "New->Clinet Proxy Definition", specify your WS properties. Create a c class with "main" method like:
public static void main(String[] args) throws Exception
{
//ShipmentAlert is the name of proxy in this case. replace it with the name you have
ShipmentAlert service = new ShipmentAlertImpl();
ShipmentAlertViDocument port = (ShipmentAlertViDocument) service.getLogicalPort();
port._setProperty("socketTimeout", "300000");
ShipmentAlertDO[] ShipmentAlertDOs = port.getAlertDOs();
...
}
Hi Makshim,
In NWDS I was not able to find "Standalone Proxy Project" ,the available options are webservice,webservice client,WSDL.
Group,
I was using using the below code
import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class TestClient {
public static void main(String [] args)
{
try{
String endpoint = "http://xxx:xxxx/dir/wsdl?p=1_fc5aa67c9f923ff090941f6f93fc08f1_portTypeBindingService";
Service service = new Service();
Call call = (Call)service.createCall();
call.setUsername("XXXXX");
call.setPassword("XXXXX");
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("SI_q1");
call.setOperationName( new QName("http://itest.com/jmswebservice", "SI_q1") );
String ret = (String) call.invoke( new Object[] {"adasd"});
System.out.print(ret);
}
catch(Exception e){
System.err.println(e.toString());
}
}
}
when I am executing I am getting the below error:
org.xml.sax.SAXException: Bad envelope tag: definitions
Can any body help.
Edited by: SATLPHO on Aug 4, 2011 10:41 AM
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.