What is my next step with Bronto WSDL?
What is my next step with Bronto WSDL?
(OP)
I need to connect with Bronto (http://api.bronto.com/)
1. I installed Ant and Axis2 from Apache.
2. RanThis is create me a sources and build.xml
3. Ran ant in com.bronto directory. It is created build directory with some classes.
What I should do next?. I need to run this simple code from Bronto:
1. I installed Ant and Axis2 from Apache.
2. Ran
CODE
wsdl2java.bat -o c:\com.bronto -uri https://api.bronto.com/v4?wsdl
3. Ran ant in com.bronto directory. It is created build directory with some classes.
What I should do next?. I need to run this simple code from Bronto:
CODE
package com.bronto;
import org.apache.axis.client.Stub;
import com.bronto.api.objects.BrontoSoapApi;
import com.bronto.api.objects.BrontoSoapApiImplService;
import com.bronto.api.objects.BrontoSoapApiImplServiceLocator;
import com.bronto.api.objects.StringValue;
public class TestLoginBronto {
private static final String API_TOKEN = "ADD YOUR API TOKEN HERE";
public static void main(String args[]) throws Exception {
BrontoSoapApiImplService locator = new BrontoSoapApiImplServiceLocator();
BrontoSoapApi api = locator.getBrontoSoapApiImplPort();
// Login
String sessionId = api.login(API_TOKEN);
if (sessionId == null) {
System.out.println("Login failed.");
return;
}
((Stub)api).setHeader(locator.getServiceName().getNamespaceURI(), "sessionId", sessionId);
System.out.println("Login was successful.");
}
}
import org.apache.axis.client.Stub;
import com.bronto.api.objects.BrontoSoapApi;
import com.bronto.api.objects.BrontoSoapApiImplService;
import com.bronto.api.objects.BrontoSoapApiImplServiceLocator;
import com.bronto.api.objects.StringValue;
public class TestLoginBronto {
private static final String API_TOKEN = "ADD YOUR API TOKEN HERE";
public static void main(String args[]) throws Exception {
BrontoSoapApiImplService locator = new BrontoSoapApiImplServiceLocator();
BrontoSoapApi api = locator.getBrontoSoapApiImplPort();
// Login
String sessionId = api.login(API_TOKEN);
if (sessionId == null) {
System.out.println("Login failed.");
return;
}
((Stub)api).setHeader(locator.getServiceName().getNamespaceURI(), "sessionId", sessionId);
System.out.println("Login was successful.");
}
}
RE: What is my next step with Bronto WSDL?
If that's the case, you will need to compile the classes.
Take a look at this
Cheers,
Dian
RE: What is my next step with Bronto WSDL?
That is my question, what else I should do to get those classes?