[
https://issues.apache.org/jira/browse/TUSCANY-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604079#action_12604079
]
Simon Nash commented on TUSCANY-2323:
-------------------------------------
This problem is caused by Tuscany not implementing the SCA Web Service binding
specification correctly. This spec calls for the generation of a new WSDL
document for an SCA service with a <binding.ws> element, even if this
<binding.ws> element specifies an existing WSDL document. Any WSDL portType or
binding specified in an existing WSDL document should be imported by the
generated WSDL document. The contents of the generated WSDL document are
entirely under Tuscany's control, and therefore Tuscany can ensure that it
includes all necessary prefixes.
> Error generating WSDL when the original wsdl file used to specify the service
> interface does not use soap namespaces
> --------------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-2323
> URL: https://issues.apache.org/jira/browse/TUSCANY-2323
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Axis Binding Extension
> Affects Versions: Java-SCA-1.2
> Reporter: Vamsavardhana Reddy
> Fix For: Java-SCA-Next
>
> Attachments: TUSCANY-2323-recreate.patch
>
>
> I am getting an error with generating wsdl using ?wsdl on the url for
> webservice when the original wsdl file used to specify the service interface
> does not use soap namespaces. The following is the wsdl file:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://helloworld"
> xmlns:tns="http://helloworld"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> name="helloworld">
> <wsdl:types>
> <schema elementFormDefault="qualified"
> targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
> <element name="getGreetings">
> <complexType>
> <sequence>
> <element name="name" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
> <element name="getGreetingsResponse">
> <complexType>
> <sequence>
> <element name="getGreetingsReturn" type="xsd:string"/>
> </sequence>
> </complexType>
> </element>
>
> </schema>
> </wsdl:types>
> <wsdl:message name="getGreetingsRequest">
> <wsdl:part element="tns:getGreetings" name="parameters"/>
> </wsdl:message>
> <wsdl:message name="getGreetingsResponse">
> <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
> </wsdl:message>
> <wsdl:portType name="HelloWorld">
> <wsdl:operation name="getGreetings">
> <wsdl:input message="tns:getGreetingsRequest"
> name="getGreetingsRequest"/>
> <wsdl:output message="tns:getGreetingsResponse"
> name="getGreetingsResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> </wsdl:definitions>
> The following is the composite:
> <?xml version="1.0" encoding="UTF-8"?>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> targetNamespace="http://helloworld"
> xmlns:hw="http://helloworld"
> name="helloworldws">
> <component name="HelloWorldServiceComponent">
> <implementation.java class="helloworld.HelloWorldImpl" />
> <service name="HelloWorldService">
> <interface.wsdl
> interface="http://helloworld#wsdl.interface(HelloWorld)" />
> <binding.ws uri="http://localhost:8085/HelloWorldService"/>
> </service>
> </component>
> </composite>
> The error I am seeing is given below:
> May 16, 2008 12:13:52 AM org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet /HelloWorldService threw exception
> org.apache.axis2.AxisFault: WSDLException: faultCode=OTHER_ERROR: Can't find
> prefix for 'http://schemas.xmlsoap.org/wsdl/soap/'. Namespace prefixes must
> be set on the Definition object using the addNamespace(...) method.
> at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
> at
> org.apache.axis2.description.AxisService.printUserWSDL(AxisService.java:936)
> at
> org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1056)
> at
> org.apache.tuscany.sca.binding.ws.axis2.TuscanyListingAgent.processListService(TuscanyListingAgent.java:142)
> at
> org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.doGet(Axis2ServiceServlet.java:257)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
> at org.apache.tuscany.sca.core.work.Jsr237Work.run(Jsr237Work.java:63)
> at
> org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$DecoratingWork.run(ThreadPoolWorkManager.java:221)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR:
> Can't find prefix for 'http://schemas.xmlsoap.org/wsdl/soap/'. Namespace
> prefixes must be set on the Definition object using the addNamespace(...)
> method.
> at com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown Source)
> at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unknown Source)
> at com.ibm.wsdl.extensions.soap.SOAPBindingSerializer.marshall(Unknown
> Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(Unknown
> Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printBindings(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
> at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
> at
> org.apache.axis2.description.AxisService.printDefinitionObject(AxisService.java:920)
> at
> org.apache.axis2.description.AxisService.printUserWSDL(AxisService.java:934)
> ... 21 more
> The problem goes away if I add the following to the wsdl file (Note that
> these namespaces are not used in the original wsdl.)
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.