| Author |
error related to provider, jaxm
|
Jesus Angeles
Ranch Hand
Joined: Feb 26, 2005
Posts: 1985
|
|
Hello, I am just building an empty SOAP message for a profile. The error is on the statement "ProviderMetaData metaData = connection.getMetaData();". I am getting this error ================================ C:\wd\book beginning jws\coding\CH8 5 PG 288>java TestJAXM2 Exception in thread "main" java.lang.ClassCastException at org.apache.axis.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:72) at com.sun.xml.messaging.jaxm.client.remote.ProviderConnectionImpl.initialize(ProviderConnectionImpl.java:84) at com.sun.xml.messaging.jaxm.client.remote.ProviderConnectionImpl.getMetaData(ProviderConnectionImpl.java:102) at TestJAXM2.main(TestJAXM2.java:14) C:\wd\book beginning jws\coding\CH8 5 PG 288>java TestJAXM2 ================================ My code is below: ================================ import javax.xml.messaging.*; import javax.xml.soap.*; import com.sun.xml.messaging.jaxm.soaprp.*; public class TestJAXM2 { public static void main(String args[]) throws Exception { ProviderConnectionFactory factory = ProviderConnectionFactory.newInstance(); ProviderConnection connection = factory.createConnection(); ProviderMetaData metaData = connection.getMetaData(); String[] supportedProfiles = metaData.getSupportedProfiles (); String profile = null; for(int i = 0; i < supportedProfiles.length; i++) { if(supportedProfiles[i].equals("soaprp")) { profile = supportedProfiles[i]; break; } } MessageFactory msgFactory = connection.createMessageFactory(profile); SOAPMessage message = msgFactory.createMessage(); message.writeTo(System.out); System.out.println("\n"); } } ================================ I have just installed JAXM and JAXP. Before this I still was able to build an empty non-Provider SOAP message. Any ideas?
|
 |
 |
|
|
subject: error related to provider, jaxm
|
|
|