You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ganesh <so...@gmail.com> on 2012/07/16 12:49:23 UTC

WSDLException : faultCode=PARSER_ERROR - Connection reset

Hi All,

When we try create a stub classes from WSDL getting below errors,

*C:\apache-cxf-2.6.1\bin>wsdl2java -frontend jaxws21 -client -d Client2_1
TestLib.wsdl*

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create
wsdl definition from : file:/C:/apache-cxf-2.6.1/bin/TestLib.wsdl
Caused by : WSDLException (at
/wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR:
Problem parsing 'http://schemas.xmlsoap.org/soap/envelope/'.:
java.net.SocketException: Connection reset

Is any one faced the same issue? Or do we need to configure proxy in CXF?

Please help us to resolve this issue.

Regards,
Ganesh.

--
View this message in context: http://cxf.547215.n5.nabble.com/WSDLException-faultCode-PARSER-ERROR-Connection-reset-tp5711085.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WSDLException : faultCode=PARSER_ERROR - Connection reset

Posted by Ganesh <so...@gmail.com>.
Thanks Mark..
It's working now.. Some of the Schema/XSD are missed in local.

Regards,
Ganesh

--
View this message in context: http://cxf.547215.n5.nabble.com/WSDLException-faultCode-PARSER-ERROR-Connection-reset-tp5711085p5711241.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WSDLException : faultCode=PARSER_ERROR - Connection reset

Posted by Mark Streit <mc...@gmail.com>.
Any chance you can save the WSDL/XSDs to your local machine and point to
those during the *wsdl2Java *invocation.  Typically, we place those into
the /META-INF/wsdl folder of the project FIRST, and then generate from
there using the *wsdlLocation *attribute during the generation:

For Ant scripting (there are also equivalents in Maven as well but we are
not fully "Mavenized" yet).   The ${ws.endpointName} below is only relevant
for our build because we are looping through a series of WSDL files but you
can simply replace this with a value that points to your actual filename.

    <!-- JAX-WS task definitions for CXF -->
    <target name="cxfWSDLToJava" depends="init, copy-wsdl-local">
        <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava"
fork="true">
            <arg value="-wsdlLocation" />
            <arg value="/META-INF/wsdl/${ws.endpointName}.wsdl" />
            <arg value="-d" />
            <arg value="${src}" />
            <arg value="-client" />
            <arg value="-verbose" />
            <arg value="${src}/META-INF/wsdl/${ws.endpointName}.wsdl" />
            <classpath>
                <path refid="cxf.classpath" />
                <path refid="project.classpath" />
            </classpath>
        </java>
    </target>


You also need to make sure that IF you use a local copy of the WSDL, you
will have to insure that *if there are imported XSDs specified in the WSD*L,
that you make sure that the URLs are changed such that they are ALSO
referenced from the location where the WSDL is:

/META-INF/wsdl/   should contain the WSDL and the XSDs and the imports if
there are any might look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="BookOrderManagerService"
    targetNamespace="http://webservices.book.acme.com/" xmlns:ns1="
http://util.book.acme.com/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="
http://webservices.book.acme.com/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/">
    <wsdl:types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema">
            <import namespace="http://webservices.book.acme.com/"
                schemaLocation="BookOrderManagerService_schema1.xsd" />
            <import namespace="http://util.book.acme.com/"
schemaLocation="BookOrderManagerService_schema2.xsd" />
            <import namespace="http://dvo.services.book.acme.com/"
                schemaLocation="BookOrderManagerService_schema3.xsd" />
        </schema>
    </wsdl:types>
...
....
.....




On Mon, Jul 16, 2012 at 10:19 AM, Ganesh <so...@gmail.com> wrote:

> Hi Mark,
>
> Thanks for Reply..
>
> It's exactly similar to localizing WSDL/XSD. We have a third party WSDL/XSD
> and we need to develop Mock service for our development testing.
>
> I understood the packaging WSDL locally from your above link. But while
> generating artifacts itself we are getting the error. So not able to
> proceed
> further.
>
> Regards,
> Ganesh.
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/WSDLException-faultCode-PARSER-ERROR-Connection-reset-tp5711085p5711108.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



*HTH

Mark
*

Re: WSDLException : faultCode=PARSER_ERROR - Connection reset

Posted by Ganesh <so...@gmail.com>.
Hi Mark,

Thanks for Reply..

It's exactly similar to localizing WSDL/XSD. We have a third party WSDL/XSD
and we need to develop Mock service for our development testing. 

I understood the packaging WSDL locally from your above link. But while
generating artifacts itself we are getting the error. So not able to proceed
further.

Regards,
Ganesh.

--
View this message in context: http://cxf.547215.n5.nabble.com/WSDLException-faultCode-PARSER-ERROR-Connection-reset-tp5711085p5711108.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: WSDLException : faultCode=PARSER_ERROR - Connection reset

Posted by Mark Streit <mc...@gmail.com>.
Are you localizing the WSDL/XSD files with the generated artifacts?  If I
understand correctly, you might look at this thread:

http://www.java.net/forum/topic/glassfish/metro-and-jaxb/jax-ws-clients#comment-824522

The principles apply whether you are using CXF or Metro tools.

Mark
 On Jul 16, 2012 8:42 AM, "Ganesh" <so...@gmail.com> wrote:

> Hi All,
>
> When we try create a stub classes from WSDL getting below errors,
>
> *C:\apache-cxf-2.6.1\bin>wsdl2java -frontend jaxws21 -client -d Client2_1
> TestLib.wsdl*
>
> WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to
> create
> wsdl definition from : file:/C:/apache-cxf-2.6.1/bin/TestLib.wsdl
> Caused by : WSDLException (at
> /wsdl:definitions/wsdl:types/xs:schema/xs:schema): faultCode=PARSER_ERROR:
> Problem parsing 'http://schemas.xmlsoap.org/soap/envelope/'.:
> java.net.SocketException: Connection reset
>
> Is any one faced the same issue? Or do we need to configure proxy in CXF?
>
> Please help us to resolve this issue.
>
> Regards,
> Ganesh.
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/WSDLException-faultCode-PARSER-ERROR-Connection-reset-tp5711085.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>