You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Bharadwaj, Nandita (GE Healthcare)" <Na...@ge.com> on 2006/08/24 13:53:19 UTC

Trying to create an ebXML message

Am getting a ClassCastException  when am trying to get an instance of
ProviderMetaData, 

The code is something like this:
	    if (mf == null) {
			System.out.println("getting the instance of
ProviderMetaData");

	        ProviderMetaData metaData = pc.getMetaData();
	        String[] supportedProfiles =
metaData.getSupportedProfiles();
	        String profile = null;

	        for(int i=0; i < supportedProfiles.length; i++) {
	  	    if(supportedProfiles[i].equals("ebxml")) {
		        profile = supportedProfiles[i];
		    break;
		    }
	        }
                mf = pc.createMessageFactory(profile);
	    }

This code is actually in the JAXM sample. But still am getting this
excpetion.

java.lang.ClassCastException:
com.sun.xml.messaging.jaxm.ebxml.EbXMLMessageImpl
	at
org.apache.axis.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:93)
	at
com.sun.xml.messaging.jaxm.client.remote.ProviderConnectionImpl.initiali
ze(ProviderConnectionImpl.java:84)
	at
com.sun.xml.messaging.jaxm.client.remote.ProviderConnectionImpl.getMetaD
ata(ProviderConnectionImpl.java:102)
	at remote.sender.SendingServlet.doGet(SendingServlet.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
	at java.lang.Thread.run(Unknown Source)
- Error in constructing or sending message
com.sun.xml.messaging.jaxm.ebxml.EbXMLMessageImpl

IS this a VERSION problem with JAXM/AXIS/JDK or a bug?

Please suggest a solution as soon as possible. 

Thanks in advance,
Nandita

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org