Getting Error
stattit Apr 10, 2007 12:40 PMWe want the web service to publish the user created WSDL instead of the JBOssWS generated WSDL. I followed the instructions as in this post viz.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031124#4031124
However, I am now getting the following error when I try to deploy the war.
12:19:13,139 ERROR [MainDeployer] Could not create deployment: file:/C:/sofadev/dev-env/jboss-4.0.5.GA/server/flagstar/deploy/fsb-MortgageService.war
org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nested throwable: (java.lang.IllegalArgumentException: Illegal schema location map)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:83)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy39.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.lang.IllegalArgumentException: Illegal schema location map
at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:155)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:278)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:165)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:131)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:313)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:139)
at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:49)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:68)
at org.jboss.ws.core.server.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:90)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.createServiceEndpoint(DeployerInterceptor.java:127)
at org.jboss.ws.integration.jboss42.DeployerInterceptorJSE.createServiceEndpoint(DeployerInterceptorJSE.java:132)
at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:78)
... 28 more
The WSDL file does some imports of external schemas which in turn can import other schemas. The .wsdl file has been placed in WEB-INF/wsdl and the schema files have been copied to the same spot too. The relevant section in the .wsdl file is
<types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema/"> <xsd:import namespace="http://com.fsb.sofa/samples/services/mortgageservice/BorrowerRequest/" schemaLocation="BorrowerRequest.xsd"> </xsd:import> <xsd:import namespace="http://com.fsb.sofa/samples/services/mortgageservice/MortgageResponse/" schemaLocation="MortgageResponse.xsd"> </xsd:import> <xsd:import namespace="http://com.fsb.sofa/samples/services/mortgageservice/InvalidBorrowerException/" schemaLocation="InvalidBorrowerException.xsd"> </xsd:import> </xsd:schema> </types>
My question is this: Is this the proper way to refer to external schemas when you want to publish your own WSDL or would you have to refer to them as
schemaLocation="WEB-INF/wsdl/MortgageResponse.xsd"
The example MortgageResponse.xsd file is (note the import)
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://com.fsb.sofa/samples/services/mortgageservice/MortgageResponse" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:Q1="http://www.example.org/Mortgage" xmlns:mortgage="http://com.fsb.sofa/samples/services/mortgageservice/Mortgage" xmlns:mr="http://com.fsb.sofa/samples/services/mortgageservice/MortgageResponse"> <import schemaLocation="Mortgage.xsd" namespace="http://com.fsb.sofa/samples/services/mortgageservice/Mortgage"></import> <complexType name="MortgageResponseType"> <sequence> <element name="mortgage" type="mortgage:MortgageType"></element> <element name="borrowerFirstName" type="string"></element> <element name="borrowerLastName" type="string"></element> </sequence> </complexType> <element name="MortgageResponse" type="mr:MortgageResponseType"></element> </schema>
Any help in this matter is appreciated. If you need any additional information, I will be glad to provide it.
JBossWS 1.2.0.SP1
JBoss 4.0.5.GA
Regards
Sandesh