1
votes

I have an esb app that exposes a SOAP web service (which uses CSIO schema). Following is the snippet from my wsdl:

<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.CSIO.org/standards/PC_Surety/CSIO4.3.0/xml/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="MyService" targetNamespace="http://www.CSIO.org/standards/PC_Surety/CSIO4.3.0/xml/" xmlns:ns0="http://www.ACORD.org/standards/PC_Surety/ACORD1.7.0/xml/">

I dont have any trouble during start up in my desktop where I use AnyPoint Studio. When I deploy in linux based stand alone servers, I ran into this issue.

The following start up log is from one of my lower environments. It appears mule is going to internet to validate namespace.

INFO [WrapperListener_start_runner] ? (:) - Initialising service: MyFlowWebservice.stage1 INFO [WrapperListener_start_runner] ? (:) - Creating Service {http://www.CSIO.org/standards/PC_Surety/CSIO4.3.0/xml/}MyService from WSDL: classpath:MyService.wsdl

When I go into higher environments where the server does not have access to internet, following is what I see

INFO [WrapperListener_start_runner] ? (:) - Initialising service: MyFlowWebservice.stage1 WARN [WrapperListener_start_runner] ? (:) - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyFlowWebservice': Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: SERVICE_CREATION_MSG at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514) ~[?:?] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521) ~[?:?]

.....

....

.....

....

Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema/xsd:schema/xsd:schema/xsd:schema): faultCode=PARSER_ERROR: Problem parsing 'file:/opt/mule/myesb/apps/myesb-1.0-SNAPSHOT/classes/schemas/xml-ns.xsd'.: java.net.ConnectException: Connection refused at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source) ~[?:?] at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) ~[?:?] at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) ~[?:?]

Opening access to internet is not an option at this point. I am not sure what to try as I have little knowledge on XML namespaces. Any suggestion on how to avoid this issue?

1
Does this file exist on the linux machine your deploying to 'file:/opt/mule/myesb/apps/myesb-1.0-SNAPSHOT/classes/schemas/xml-ns.xsd'ashosborne1
Yes, it does exist. The problem was with the dtd this file was referring to. I downloaded the file and made the xsd to use that file and that fixed it. I have given the answer below. ThanksJoe

1 Answers

1
votes

I have found the solution.

There is this line in one of the schema files - xml-ns.xsd:

<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">

I downloaded XMLSchema.dtd in to the same folder where other schema files are and replaced the line "http://www.w3.org/2001/XMLSchema.dtd" with just "XMLSchema.dtd"