You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by h1d3m3 <h1...@yahoo.com> on 2011/09/22 00:13:29 UTC

Just Getting things going

I feel like I'm close on this, I can generate java files from maven using
wsdl2java, get a request to and response from the server (I can see these
SOAP messages in a http proxy debugger), but for some reason the reply
cannot be constructed properly by the client. I am getting this error:

[17:54:16,235 WARN  PhaseInterceptorChain]: Interceptor for
{https://printon.fx.com}Fx_0020Office_0020Print_0020Web_0020ServiceService#{https://printon.fx.com}sendMessage
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unable to create an
instance of https.printonline_fx.CountryContext 
	at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:791)

[snip]

Caused by: javax.xml.bind.UnmarshalException: Unable to create an instance
of https.prinon_fx.CountryContext
 - with linked exception:
[java.lang.InstantiationException]
	... 31 more
Caused by: java.lang.InstantiationException
	at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)


I'm not exactly sure where to check next. That class is in my classpath...it
is generated off the wsdl, but its an abstract class (i.e., public abstract
class CountryContext {}).

Any pointers appreciated, thanks. (just getting started learning/using SOAP)

--
View this message in context: http://cxf.547215.n5.nabble.com/Just-Getting-things-going-tp4828088p4828088.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Just Getting things going

Posted by Daniel Kulp <dk...@apache.org>.
Chatted a bit on IRC about this but I got pulled off on other things and 
forgot to follow up.   Sorry about that...  :-(

Basically, if the wsdl doesn't have any concrete implementations/subclasses of 
CountryContext, you have an issue.   There will be nothing for JAXB to 
"create".   Thus, you need to solve that problem.   If the server side part is 
a java-first scenario, you would need to make sure you add a @XmlSeeAlso 
annotation to the service that would point to all the concrete subclasses.   
That way, jaxb will know about them and add them to the generated schemas.    

In anycase, the root of this client problem is missing information 
(subclasses) in the WSDL.   The cause of that needs to be tracked down and 
fixed.

Dan




On Wednesday, September 21, 2011 3:13:29 PM h1d3m3 wrote:
> I feel like I'm close on this, I can generate java files from maven using
> wsdl2java, get a request to and response from the server (I can see these
> SOAP messages in a http proxy debugger), but for some reason the reply
> cannot be constructed properly by the client. I am getting this error:
> 
> [17:54:16,235 WARN  PhaseInterceptorChain]: Interceptor for
> {https://printon.fx.com}Fx_0020Office_0020Print_0020Web_0020ServiceService#{
> https://printon.fx.com}sendMessage has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: Unable to create an
> instance of https.printonline_fx.CountryContext
> 	at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:79
> 1)
> 
> [snip]
> 
> Caused by: javax.xml.bind.UnmarshalException: Unable to create an instance
> of https.prinon_fx.CountryContext
>  - with linked exception:
> [java.lang.InstantiationException]
> 	... 31 more
> Caused by: java.lang.InstantiationException
> 	at
> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Instan
> tiationExceptionConstructorAccessorImpl.java:30)
> 
> 
> I'm not exactly sure where to check next. That class is in my classpath...it
> is generated off the wsdl, but its an abstract class (i.e., public abstract
> class CountryContext {}).
> 
> Any pointers appreciated, thanks. (just getting started learning/using SOAP)
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Just-Getting-things-going-tp4828088p4828088
> .html Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com