This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes What more jar files do I use to run the JAXR code ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "What more jar files do I use to run the JAXR code ?" Watch "What more jar files do I use to run the JAXR code ?" New topic

What more jar files do I use to run the JAXR code ?

Chart Krobtragolchai

Joined: Apr 01, 2006
Posts: 17
What more jar files do I use to run the JAXR code below?

I use NetBeans to create below code.
I add jaxr-api.jar and jaxr-impl.jar but they are not enough.

This is the result :

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
at com.sun.xml.registry.uddi.UDDIMapper.<init>(Unknown Source)
at com.sun.xml.registry.uddi.RegistryServiceImpl.<init>(Unknown Source)
at com.sun.xml.registry.uddi.ConnectionImpl.<init>(Unknown Source)
at com.sun.xml.registry.uddi.ConnectionFactoryImpl.createConnection(Unknown Source)
at com.sun.xml.registry.common.ConnectionFactoryImpl.createConnection(Unknown Source)
at XMLQuery.inquire(
at XMLQuery.main(
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Properties;
import javax.xml.registry.BulkResponse;
import javax.xml.registry.BusinessQueryManager;
import javax.xml.registry.Connection;
import javax.xml.registry.ConnectionFactory;
import javax.xml.registry.FindQualifier;
import javax.xml.registry.JAXRException;
import javax.xml.registry.RegistryService;
import javax.xml.registry.infomodel.EmailAddress;
import javax.xml.registry.infomodel.Organization;
import javax.xml.registry.infomodel.PersonName;
import javax.xml.registry.infomodel.Service;
import javax.xml.registry.infomodel.ServiceBinding;
import javax.xml.registry.infomodel.TelephoneNumber;
import javax.xml.registry.infomodel.User;

* @author administratro
public class XMLQuery {

* @param args the command line arguments
public static void main(String[] args) {
// TODO code application logic here
String queryString = new String("%Microsoft%");
XMLQuery xmlQuery = new XMLQuery();

public void inquire(String queryString){
Connection con = null;
Properties prop = new Properties();
ConnectionFactory cf = ConnectionFactory.newInstance();
con = cf.createConnection();
RegistryService rs = con.getRegistryService();
BusinessQueryManager businessQueryManager = rs.getBusinessQueryManager();
Collection findQualifiers = new ArrayList();
Collection namePatterns = new ArrayList();
BulkResponse bulkResponse = businessQueryManager.findOrganizations(
findQualifiers, namePatterns, null, null, null, null);
Iterator responseIterator = bulkResponse.getCollection().iterator();
while (responseIterator.hasNext()){
Organization org = (Organization);
System.out.println("Name: "+org.getName().getValue());
System.out.println("Desc: "+org.getDescription().getValue());
System.out.println("ID: "+org.getKey().getId());
User contactPerson = org.getPrimaryContact();
if (contactPerson!=null){
PersonName name = contactPerson.getPersonName();
System.out.println("Contact Person Name: "+name.getFullName());
Iterator contactNumbers = contactPerson.getTelephoneNumbers(
TelephoneNumber tnumber = (TelephoneNumber);
System.out.println("Telephone: "+tnumber.getNumber());
Iterator emails = contactPerson.getEmailAddresses().iterator();
System.out.println("Email: "+(EmailAddress);
Iterator services = org.getServices().iterator();
Service service = (Service);
System.out.println("Service: "+service.getName().getValue());
System.out.println("Service Description: "+
System.out.println("Service ID: "+service.getKey().getId());
Iterator serviceBindings = service.getServiceBindings().iterator();
ServiceBinding serviceBinding = (ServiceBinding);
System.out.println("Binding: "+serviceBinding.getDescription());
System.out.println("URI: "+serviceBinding.getAccessURI());
}catch(Exception error){
System.out.println("Error: "+error.getMessage());
if (con!=null){
}catch(JAXRException error){}//ignore
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41173
That particular class is in saaj.jar. There are probably others that are needed as well. Just include all jar files that come with JWSDP, and you should be all set.

Ping & DNS - my free Android networking tools app
wood burning stoves
subject: What more jar files do I use to run the JAXR code ?
Similar Threads
What more jar files do I use to run the JAXR code ?
Unable to publish to IBM test UDDI registry server
problem in publishing web service
JAX-WS Service invocation fails after service discovery with JAXR
unable to run JAXR examples of JWSDP