You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Niels Boldt <nb...@binaryconstructors.dk> on 2013/08/13 17:22:10 UTC

drop endpoint validation

Hello,

I'm trying to generate a client for the wsdl at
https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?wsdl

Problem is that this wsdl is really huge. My first try was using the
example at https://github.com/e-conomic/eco-api-ex/tree/master/examples/javawhere
java code is generated using a maven plugin. This works, but when
compiling the generated code  I get an error saying

[ERROR] COMPILATION ERROR :
[INFO] ------------------------------
-------------------------------
[ERROR]
\temp\eco-api-ex\examples\java\target\generated\src\main\java\com\e_cono
mic\EconomicWebServiceSoap_EconomicWebServiceSoap12_Client.java:[35,23]
error: code too large
[INFO] 1 error
[INFO]

which probably means that a generated method was to large.

My next try was to generate a wsdl manually, where I only grabbed the
methods I needed. This works and I get a client generated but when calling
the service I get an error like

"The Endpoint validation failed to validate due to the following errors: ::
Invalid Endpoint Interface :: :: The operation names in the WSDL portType
do not match the method names in the SEI or Web service implementation
class. wsdl operations = " because the wsdl probably is different from the
one at the server.

Is there a way I can tell apache cxf to ignore validation errors at the
endpoint or can I generate the code based on the original wsdl in such a
way that I avoid "error: code too large"

Best Regards
Niels



-- 
Niels Boldt
BinaryConstructors ApS
email: nb@binaryconstructors.dk
phone: +4529722259

Re: drop endpoint validation

Posted by Niels Boldt <nb...@binaryconstructors.dk>.
Hi Danel

Thanks for your answers - they were spot on :-)


> [ERROR] COMPILATION ERROR :

> > [INFO] ------------------------------
> > -------------------------------
> > [ERROR]
> > \temp\eco-api-ex\examples\java\target\generated\src\main\java\com\e_cono
> > mic\EconomicWebServiceSoap_EconomicWebServiceSoap12_Client.java:[35,23]
> > error: code too large
> > [INFO] 1 error
> > [INFO]
> >
> > which probably means that a generated method was to large.
>
> This is just the _Client which you don't need.  It's just a sample on how
> to use the Service and SEI.  If you delete it, does the code compile?
>

Yes, without any problems

>
> "The Endpoint validation failed to validate due to the following errors:
::
> Invalid Endpoint Interface :: :: The operation names in the WSDL portType
> do not match the method names in the SEI or Web service implementation
> class. wsdl operations = " because the wsdl probably is different from the
> one at the server.

This error isn't from CXF.   Is there a stack trace?  This sounds like it's
> from the JAX-WS RI built into the JDK.
>

Also spot on. I accidentially had some axis jar floating around on my
classpath which was loaded. When removing these it worked out of the box


Thanks
Niels

Re: drop endpoint validation

Posted by Daniel Kulp <dk...@apache.org>.
On Aug 13, 2013, at 11:22 AM, Niels Boldt <nb...@binaryconstructors.dk> wrote:

> Hello,
> 
> I'm trying to generate a client for the wsdl at
> https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?wsdl
> 
> Problem is that this wsdl is really huge. My first try was using the
> example at https://github.com/e-conomic/eco-api-ex/tree/master/examples/javawhere
> java code is generated using a maven plugin. This works, but when
> compiling the generated code  I get an error saying
> 
> [ERROR] COMPILATION ERROR :
> [INFO] ------------------------------
> -------------------------------
> [ERROR]
> \temp\eco-api-ex\examples\java\target\generated\src\main\java\com\e_cono
> mic\EconomicWebServiceSoap_EconomicWebServiceSoap12_Client.java:[35,23]
> error: code too large
> [INFO] 1 error
> [INFO]
> 
> which probably means that a generated method was to large.

This is just the _Client which you don't need.  It's just a sample on how to use the Service and SEI.  If you delete it, does the code compile?


> My next try was to generate a wsdl manually, where I only grabbed the
> methods I needed. This works and I get a client generated but when calling
> the service I get an error like
> 
> "The Endpoint validation failed to validate due to the following errors: ::
> Invalid Endpoint Interface :: :: The operation names in the WSDL portType
> do not match the method names in the SEI or Web service implementation
> class. wsdl operations = " because the wsdl probably is different from the
> one at the server.

This error isn't from CXF.   Is there a stack trace?  This sounds like it's from the JAX-WS RI built into the JDK.

Dan


> 
> Is there a way I can tell apache cxf to ignore validation errors at the
> endpoint or can I generate the code based on the original wsdl in such a
> way that I avoid "error: code too large"
> 
> Best Regards
> Niels
> 
> 
> 
> -- 
> Niels Boldt
> BinaryConstructors ApS
> email: nb@binaryconstructors.dk
> phone: +4529722259

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