Hi Colm
Thanks for your response, below is the full stack trace.
I tried to download the wsdl then parse it from a file which gave a slightly
different error in that certain imports were not good.
I'm a bit lost as I can access all the links via a browser but not using the
code :-(
Any hints on how to narrow down further would be appreciated
16:07:02.199 [main] WARN o.a.cxf.phase.PhaseInterceptorChain - Interceptor for
{http://schemas.microsoft.com/xrm/2011/Contracts}OrganizationService#{http://schemas.microsoft.com/xrm/2011/Contracts/Services}RetrieveMultiple
has thrown exception, unwinding now
org.apache.cxf.service.factory.ServiceConstructionException: Failed to create
service.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:87)
~[cxf-rt-wsdl-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.trust.AbstractSTSClient.createClient(AbstractSTSClient.java:631)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:713)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:62)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:56)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:52)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.getTokenFromSTS(IssuedTokenInterceptorProvider.java:394)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:530)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:162)
~[cxf-rt-ws-security-3.0.2.jar:3.0.2]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
~[cxf-core-3.0.2.jar:3.0.2]
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
[cxf-core-3.0.2.jar:3.0.2]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
[cxf-core-3.0.2.jar:3.0.2]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
[cxf-core-3.0.2.jar:3.0.2]
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
[cxf-core-3.0.2.jar:3.0.2]
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
[cxf-rt-frontend-simple-3.0.2.jar:3.0.2]
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:138)
[cxf-rt-frontend-jaxws-3.0.2.jar:3.0.2]
at com.sun.proxy.$Proxy55.retrieveMultiple(Unknown Source) [na:na]
at com.simplexit.dynamics.TestWeb.main(TestWeb.java:75) [classes/:na]
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
Problem parsing 'https://sts1.it-ernity.nl/adfs/services/trust/mex'.:
java.net.SocketException: Connection reset
at
com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198)
~[wsdl4j-1.6.3.jar:1.6.3]
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
~[wsdl4j-1.6.3.jar:1.6.3]
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422)
~[wsdl4j-1.6.3.jar:1.6.3]
at
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:231)
~[cxf-rt-wsdl-3.0.2.jar:3.0.2]
at
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:163)
~[cxf-rt-wsdl-3.0.2.jar:3.0.2]
at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85)
~[cxf-rt-wsdl-3.0.2.jar:3.0.2]
... 17 common frames omitted
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source) ~[na:1.8.0_25]
at java.net.SocketInputStream.read(Unknown Source) ~[na:1.8.0_25]
at sun.security.ssl.InputRecord.readFully(Unknown Source) ~[na:1.8.0_25]
at sun.security.ssl.InputRecord.read(Unknown Source) ~[na:1.8.0_25]
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
~[na:1.8.0_25]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source) ~[na:1.8.0_25]
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
~[na:1.8.0_25]
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
~[na:1.8.0_25]
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
~[na:1.8.0_25]
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
Source) ~[na:1.8.0_25]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown
Source) ~[na:1.8.0_25]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source) ~[na:1.8.0_25]
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown
Source) ~[na:1.8.0_25]
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source) ~[na:1.8.0_25]
at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
Source) ~[na:1.8.0_25]
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) ~[na:1.8.0_25]
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown
Source) ~[na:1.8.0_25]
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
Source) ~[na:1.8.0_25]
at
com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
~[wsdl4j-1.6.3.jar:1.6.3]
... 22 common frames omitted
javax.xml.ws.soap.SOAPFaultException: Failed to create service.
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:160)
at com.sun.proxy.$Proxy55.retrieveMultiple(Unknown Source)
at com.simplexit.dynamics.TestWeb.main(TestWeb.java:75)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed
to create service.
at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:87)
at
org.apache.cxf.ws.security.trust.AbstractSTSClient.createClient(AbstractSTSClient.java:631)
at
org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:713)
at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:62)
at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:56)
at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:52)
at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.getTokenFromSTS(IssuedTokenInterceptorProvider.java:394)
at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:530)
at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:162)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:138)
... 2 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
Problem parsing 'https://sts1.it-ernity.nl/adfs/services/trust/mex'.:
java.net.SocketException: Connection reset
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422)
at
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:231)
at
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:163)
at
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:85)
... 17 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188)
... 22 more
-----Original Message-----
From: Colm O hEigeartaigh [mailto:[email protected]]
Sent: 10 July 2015 12:09
To: [email protected]
Subject: Re: PARSER_ERROR
What's the full stack trace? If it's just a problem in parsing the WSDL you
could write a unit test to try grabbing the WSDL with CXF to narrow the problem
down a bit.
Colm.
On Fri, Jul 10, 2015 at 7:28 AM, Colin Chalmers < [email protected]>
wrote:
> Hi all,
>
>
>
> I am trying to integrate a Microsoft Dynamics CRM server using the CXF
> framework and based on this tutorial
>
>
>
>
> http://www.jhkuperus.nl/articles/java/using-apache-cxf-to-connect-to-m
> icroso
> ft-dynamics/
>
>
>
> I have seen this working in the past but the client seems to have
> upgraded their version of dynamics and now I get a the following parse
> error which I don't understand why :(
>
>
>
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR:
> Problem parsing 'https://sts1.it-ernity.nl/adfs/services/trust/mex'.:
> java.net.SocketException: Connection reset
>
>
>
> I can access the site using a browser no problem but not using CXF.
>
>
>
> I have seen other similar issues and have set the following on the jvm
> - but no solution
>
> -Dorg.apache.cxf.stax.allowInsecureParser=1
>
>
>
> I also read somewhere else perhaps a conflict between Soap1.2 expected
> by ADFS and Soap1.1 as default by CXF?
>
>
>
> I am using version 3.0.2 of CXF
>
>
>
> Has anyone else had this problem
>
>
>
> Rgds
>
>
>
> Colin
>
>
>
>
>
>
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com