Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84488members
353708posts

How to call web service api

APC UPS Data Center & Enterprise Solutions Forum

Schneider Electric support forum for our Data Center and Business Power UPS, UPS Accessories, Software, Services, and associated commercial products designed to share knowledge, installation, and configuration.

Solved
mark._apc
Crewman
Crewman
0 Likes
2
184

How to call web service api

This was originally posted on APC forums on 1/5/2010


I want to call APC web service via axis2 jars. but my system occur timeout error. I can access wsdl at IE(http://ip-port/cgi-bin/nbSensorWebServices.wsdl)
below is primary code:

EndpointReference targetEPR =
new EndpointReference("http://ip-port/cgi-bin/nbSensorWebServices");
try {
RPCServiceClient serviceClient = new RPCServiceClient();
serviceClient.setTargetEPR(targetEPR);
Options options = serviceClient.getOptions();
options.setTo(targetEPR);
options.setManageSession(true);
options.setAction("urn:getAllPodIDs");
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);


HttpTransportProperties.Authenticator
basicAuthentication = new HttpTransportProperties.Authenticator();

basicAuthentication.setUsername(username);
basicAuthentication.setPassword(password);
options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
basicAuthentication);
QName opAddEntry = new QName("http://www.netbotz.com/BotzWare", "getAllPodIDs");
Object[] opAddEntryArgs = new Object[] {};
Class[] returnTypes = new Class[] {String[].class };
Object[] response = serviceClient.invokeBlocking(opAddEntry,
opAddEntryArgs, returnTypes);

Tags (2)

Accepted Solutions
mark._apc
Crewman
Crewman
0 Likes
0
184

How to call web service api

This was originally posted on APC forums on 1/6/2010


I want to call APC web service via axis2 jars. but my system occur timeout error. I can access wsdl at IE(http://ip-port/cgi-bin/nbSensorWebServices.wsdl)
below is primary code:

EndpointReference targetEPR =
new EndpointReference("http://ip-port/cgi-bin/nbSensorWebServices");
try {
RPCServiceClient serviceClient = new RPCServiceClient();
serviceClient.setTargetEPR(targetEPR);
Options options = serviceClient.getOptions();
options.setTo(targetEPR);
options.setManageSession(true);
options.setAction("urn:getAllPodIDs");
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);


HttpTransportProperties.Authenticator
basicAuthentication = new HttpTransportProperties.Authenticator();

basicAuthentication.setUsername(username);
basicAuthentication.setPassword(password);
options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
basicAuthentication);
QName opAddEntry = new QName("http://www.netbotz.com/BotzWare", "getAllPodIDs");
Object[] opAddEntryArgs = new Object[] {};
Class[] returnTypes = new Class[] {String[].class };
Object[] response = serviceClient.invokeBlocking(opAddEntry,
opAddEntryArgs, returnTypes);

See Answer In Context

2 Replies 2
mark._apc
Crewman
Crewman
0 Likes
0
184

Re: How to call web service api

This was originally posted on APC forums on 1/8/2010


Thanks for your answeer.

mark._apc
Crewman
Crewman
0 Likes
0
185

How to call web service api

This was originally posted on APC forums on 1/6/2010


I want to call APC web service via axis2 jars. but my system occur timeout error. I can access wsdl at IE(http://ip-port/cgi-bin/nbSensorWebServices.wsdl)
below is primary code:

EndpointReference targetEPR =
new EndpointReference("http://ip-port/cgi-bin/nbSensorWebServices");
try {
RPCServiceClient serviceClient = new RPCServiceClient();
serviceClient.setTargetEPR(targetEPR);
Options options = serviceClient.getOptions();
options.setTo(targetEPR);
options.setManageSession(true);
options.setAction("urn:getAllPodIDs");
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);


HttpTransportProperties.Authenticator
basicAuthentication = new HttpTransportProperties.Authenticator();

basicAuthentication.setUsername(username);
basicAuthentication.setPassword(password);
options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
basicAuthentication);
QName opAddEntry = new QName("http://www.netbotz.com/BotzWare", "getAllPodIDs");
Object[] opAddEntryArgs = new Object[] {};
Class[] returnTypes = new Class[] {String[].class };
Object[] response = serviceClient.invokeBlocking(opAddEntry,
opAddEntryArgs, returnTypes);