I was using http before but when tried to run client, I was getting
Exception
Exception in thread "main" org.apache.axis2.AxisFault: SOAP message MUST NOT
contain a Document Type Declaration(DTD)
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at pk.ingen.wstest.client.GreetingServiceStub.greeting(Unknown
Source)
at pk.ingen.wstest.client.GreetingServiceCGClient.main(Unknown
Source)
Caused by: org.apache.axiom.om.OMException: SOAP message MUST NOT contain a
Document Type Declaration(DTD)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createDTD(StAXSOAPModelBuilder.java:407)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:226)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105)
at
org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677)
at
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:182)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88)
... 6 more
So I tried to generate stub from https.
And stubs generated from http are giving this exception, coninuesly.
--RAFI
On Fri, Jun 20, 2008 at 5:21 PM, Charitha Kankanamge <[EMAIL PROTECTED]>
wrote:
> Hi Rafaqat,
> Try to generate the stub as follows. Please use http port instead of https
> one.
> $AXIS2_HOME//bin/wsdl2java.sh -uri
> http://localhost:8080/axis2/services/GreetingService?wsdl <
> https://localhost:8443/axis2/services/GreetingService?wsdl> -p
> test.wstest.client -uw -o
>
> regards
> Charitha
>
>
> Rafaqat Ali wrote:
>
> Hi,
>> I am trying to generate stub using $AXIS2_HOME/bin/bin/wsdl2java.sh from
>> https://localhost:8443/axis2/services/SomeService?wsdl
>> following instruction from
>> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/58499*
>> *
>> Now when I try to generate stub using command
>> $AXIS2_HOME//bin/wsdl2java.sh -uri
>> https://localhost:8443/axis2/services/GreetingService?wsdl -p
>> test.wstest.client -uw -o .
>> It throws Exception
>>
>> Exception in thread "main"
>> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>> at
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:156)
>> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR:
>> Unable to resolve imported document at '
>> https://localhost:8443/axis2/services/GreetingService?wsdl' <
>> https://localhost:8443/axis2/services/GreetingService?wsdl%27>.:
>> javax.net.ssl.SSLHandshakeException:
>> java.security.cert.CertificateException: No name matching localhost found
>>
>> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>> at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>> at
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:288)
>> at
>> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:111)
>> ... 2 more
>> Caused by: javax.net.ssl.SSLHandshakeException:
>> java.security.cert.CertificateException: No name matching localhost found
>> at
>> com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)
>> at
>> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187)
>> at
>> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181)
>> at
>> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975)
>> at
>> com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123)
>> at
>> com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
>> at
>> com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1123)
>> at
>> com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)
>> at
>> sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:405)
>> at
>> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
>> at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
>> at
>> sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
>> at java.net.URL.openStream(URL.java:1009)
>> at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
>> Source)
>> ... 6 more
>> Caused by: java.security.cert.CertificateException: No name matching
>> localhost found
>> at
>> sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:210)
>> at sun.security.util.HostnameChecker.match(HostnameChecker.java:77)
>> at
>> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:264)
>> at
>> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:250)
>> at
>> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:954)
>> ... 19 more
>>
>>
>> Can some one tell me how to resolve ?
>>
>> Thanks,
>> --RAFI
>>
>> ------------------------------------------------------------------------
>>
>> No virus found in this incoming message.
>> Checked by AVG. Version: 7.5.524 / Virus Database: 270.4.1/1510 - Release
>> Date: 6/19/2008 3:21 PM
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>