You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2013/08/01 01:24:33 UTC

Re: CXF client with JaxWsProxyFactoryBean without WSDL is throwing ServiceConstructionException

On Jul 29, 2013, at 1:48 PM, bhaskerhari <bh...@yahoo.com> wrote:

> Thanks for your reply. We foudn that the JAXBContext created by CXF 2.7.5 is
> having an issue. It is throwing IllegalAnnotationsException during the run
> time. The same set of binding classes when used with an older version of CXF
> (2.2.11) works fine. After debugging a bit, i found that new verison of CXF
> when constructs JaxWSProxyFactoryBean is taking more number of classes in
> JAXBContext. So I created the jaxbcontet manually and that seems to work
> fine.

When you run the wsdl2java, you may want to try passing the "-fe jaxws21" flags to see if that helps.   Maybe some of the classes are getting annotations that aren't compatible with the runtime (assuming you are using Java6 at runtime).

If that doesn't help, a test case would be useful.

> We wanted to eliminate giving wsdl while creating the client. But looks like
> we dont have another option than referencing the wsdl. So I guess we will
> have to identify why we are getting a sslhandshake exception?
> 
> Also, another thing i noticed today. The new version of CXF is not accepting
> "|" character anymore. It is throwing java.net.URISyntaxException: Illegal
> character in query at index 646 exception.
> 
> java.net.URI$Parser.fail(URI.java:2810)
> 	java.net.URI$Parser.checkChars(URI.java:2983)
> 	java.net.URI$Parser.parseHierarchical(URI.java:3073)
> 	java.net.URI$Parser.parse(URI.java:3015)
> 	java.net.URI.<init>(URI.java:577)
> 	java.net.URI.create(URI.java:839)
> 
> org.apache.cxf.javascript.JavascriptQueryHandler.isRecognizedQuery(JavascriptQueryHandler.java:86)
> 
> org.apache.cxf.javascript.JavascriptQueryHandler.isRecognizedQuery(JavascriptQueryHandler.java:168)
> 
> The same URL worked fine with old version of CXF. Any idea if the new
> version expects some extra configuration to accept such characters?

Can you log a bug for this?   The | character isn't allowed in URL's so behavior would be unpredictable.   I'd certainly encourage you to change your URL to not include it.  That said, the JavascriptQueryHandler.isRecognizedQuery method should be able to just return false for anything it DOESN'T recognize, including invalid URL's.


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: CXF client with JaxWsProxyFactoryBean without WSDL is throwing ServiceConstructionException

Posted by kalpabas <ka...@yahoo.com>.
Bhaskerhari,

I got something simile issue when I moved my client code from CXF-2.3.5 to
2.7.8. ( Described here
<http://cxf.547215.n5.nabble.com/CXF-2-7-8-Not-recognize-substitutionGroup-Elements-td5744532.html> 
)

I did all what you have described, but could not get it resolved. Finally I
found a way to disable validation:

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
Map<String, Object> props = factory.getProperties();
if(null == props)
{
	props = new HashMap<String, Object>();
}
props.put("soap.no.validate.parts", true);
factory.setProperties(props);

This resolved my issue. 

Thanks,
Kalpa



--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-client-with-JaxWsProxyFactoryBean-without-WSDL-is-throwing-ServiceConstructionException-tp5731490p5744544.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF client with JaxWsProxyFactoryBean without WSDL is throwing ServiceConstructionException

Posted by bhaskerhari <bh...@yahoo.com>.
We already supply this "-frontend jaxws21" while running wsdl2java. And we
are using Java6. So dont thik thats an issue. 

Without custom JAXBContext, I get the illegalannotationexception and after
providing custom JAXBContext, I get servicecreationexception as it is
expecting me to provide the wsdl. If i give wsdl url with custom
jaxbcontext, then it works fine. But we really want to avoid setting the
wsdl url, looks like there is no other option. For now, I am using the
property to set schema validation to false (schema-validation-enabled).





--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-client-with-JaxWsProxyFactoryBean-without-WSDL-is-throwing-ServiceConstructionException-tp5731490p5731878.html
Sent from the cxf-user mailing list archive at Nabble.com.