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

I use NetBeans to create the JAXR code to connect the Microsft UDDI.

I add jaxr-api.jar and jaxr-impl.jar but they are not enough.

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

This is the result :

init:

deps-jar:

compile:

run:

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(XMLQuery.java:59)

at XMLQuery.main(XMLQuery.java:46)

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

xmlQuery.inquire(queryString);

}

public void inquire(String queryString){

Connection con = null;

Properties prop = new Properties();

prop.setProperty("javax.xml.registry.queryManagerURL",

"http://uddi.microsoft.com/inquire");

prop.setProperty("javax.xml.registry.factoryClass",

"com.sun.xml.registry.uddi.ConnectionFactoryImpl");

try{

ConnectionFactory cf = ConnectionFactory.newInstance();

cf.setProperties(prop);

con = cf.createConnection();

RegistryService rs = con.getRegistryService();

BusinessQueryManager businessQueryManager = rs.getBusinessQueryManager();

Collection findQualifiers = new ArrayList();

findQualifiers.add(FindQualifier.CASE_SENSITIVE_MATCH);

Collection namePatterns = new ArrayList();

namePatterns.add(queryString);

BulkResponse bulkResponse = businessQueryManager.findOrganizations(

findQualifiers, namePatterns, null, null, null, null);

Iterator responseIterator = bulkResponse.getCollection().iterator();

while (responseIterator.hasNext()){

Organization org = (Organization)responseIterator.next();

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(

contactPerson.getType()).iterator();

while(contactNumbers.hasNext()){

TelephoneNumber tnumber = (TelephoneNumber)contactNumbers.next();

System.out.println("Telephone: "+tnumber.getNumber());

}

Iterator emails = contactPerson.getEmailAddresses().iterator();

while(emails.hasNext()){

System.out.println("Email: "+(EmailAddress)emails.next());

}

}

Iterator services = org.getServices().iterator();

while(services.hasNext()){

Service service = (Service)services.next();

System.out.println("Service: "+service.getName().getValue());

System.out.println("Service Description: "+

service.getDescription().getValue());

System.out.println("Service ID: "+service.getKey().getId());

Iterator serviceBindings = service.getServiceBindings().iterator();

while(serviceBindings.hasNext()){

ServiceBinding serviceBinding = (ServiceBinding)serviceBindings.next();

System.out.println("Binding: "+serviceBinding.getDescription());

System.out.println("URI: "+serviceBinding.getAccessURI());

}

}

}

}catch(Exception error){

System.out.println("Error: "+error.getMessage());

error.printStackTrace();

}finally{

if (con!=null){

try{

con.close();

}catch(JAXRException error){}//ignore

}

}

}

}

[5161 byte] By [Bonboya] at [2007-10-2 21:13:18]
# 1

hi,

You must have recoverd from the prob faced. Could you please help us out? we are facing the following error

Created connection to registry

[java] Got registry servicequery manager, and life cycle manager

[java] Feb 6, 2007 12:46:05 PM com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnection post

[java] SEVERE: SAAJ0009: Message send failed

[java] javax.xml.registry.JAXRException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed

rohumarua at 2007-7-13 23:59:42 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...