Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is my next step with Bronto WSDL?

Status
Not open for further replies.

botatun

Programmer
Mar 7, 2006
40
US
I need to connect with Bronto (1. I installed Ant and Axis2 from Apache.
2. Ran
Code:
wsdl2java.bat -o c:\com.bronto -uri [URL unfurl="true"]https://api.bronto.com/v4?wsdl[/URL]
This 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:
Code:
package com.bronto;  
import org.apache.axis.client.Stub;  
import com.bronto.api.objects.[red]BrontoSoapApi;[/red]  
import com.bronto.api.objects.[red]BrontoSoapApiImplService;[/red] 
import com.bronto.api.objects.[red]BrontoSoapApiImplServiceLocator;[/red]  
import com.bronto.api.objects.[red]StringValue[/red];  

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.");  
 }  
}
 
I can't remember if wsdl2java produced .java files or .class files also. I think it just produces .java but I'm not sure.

If that's the case, you will need to compile the classes.

Take a look at this

Cheers,
Dian
 
I compile them by Ant. But there were not BrontoSoapApi, BrontoSoapApiImplService, BrontoSoapApiImplServiceLocator and StringValue classes.
That is my question, what else I should do to get those classes?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top