Welcome to the new Schneider Electric Community

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

Close
Important Announcement: WELCOME to the new Schneider Electric Community! Community is now no longer part of Exchange, and is now rebranded under se.com. If you have any bookmarks and links saved, we request you to update them to ensure that you continue accessing our community from this new location. For any issues that you might encounter as part of this change, please reach out to SchneiderCommunity.Support@se.com, and the team will help to get your issues resolved.
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
82247members
349809posts

How to call web service api

APC UPS Data Center Backup Solutions Forum

Schneider Electric support forum for Data Center UPS, software and services including our APC offers designed to share knowledge, installation, configuration, and general product use.

Solved
mark._apc
Crewman
Crewman
0 Likes
2
160

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
160

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
160

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
161

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);