You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Christian Nolte (JIRA)" <de...@tuscany.apache.org> on 2010/11/18 13:40:14 UTC
[jira] Created: (TUSCANY-3793) WSDL: Generated Namespace for Faults
are Wrong
WSDL: Generated Namespace for Faults are Wrong
----------------------------------------------
Key: TUSCANY-3793
URL: https://issues.apache.org/jira/browse/TUSCANY-3793
Project: Tuscany
Issue Type: Bug
Components: Java SCA Databinding-SDO
Affects Versions: Java-SCA-1.6
Environment: Linux, Fedora 10, 2.6.27.38-170.2.113.fc10.i686.PAE
Reporter: Christian Nolte
Refering to mailing list post:
http://osdir.com/ml/user-tuscany.apache.org/2010-10/msg00059.html
The namespaces for faults (Exceptions) are wrong. Consider this example (modified HelloWorldService):
helloWorldService.composite:
---
<?xml version="1.0" encoding="UTF-8"?>
<sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
name="helloWorldService"
targetNamespace="http://eclipse.org/HelloWorldService/src/resources/HelloWorldService">
<sca:component name="HelloWorldServiceComponent">
<sca:implementation.java class="implementations.HelloWorldServiceImpl"/>
<sca:service name="IHelloWorldService">
<sca:interface.java interface="service.IHelloWorldService"/>
<sca:binding.ws/>
</sca:service>
</sca:component>
</sca:composite>
---
IHelloWorldService.java:
---
package service;
import javax.jws.WebService;
@WebService
public interface IHelloWorldService {
public String sayHello() throws Exception;
}
---
HelloWorldServiceImpl.java:
---
package implementations;
import org.osoa.sca.annotations.Service;
import service.IHelloWorldService;
@Service(IHelloWorldService.class)
public class HelloWorldServiceImpl implements IHelloWorldService{
private String sayHello = "Hello remote SCA";
@Override
public String sayHello() throws Exception {
return this.sayHello;
}
}
---
Generated http://localhost:8080/HelloWorldServiceComponent?wsdl
---
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="IHelloWorldServiceService" targetNamespace="http://service/" xmlns="http://service/" xmlns:ns4="http://lang.java/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xs:schema targetNamespace="http://lang.java/" version="1.0" xmlns:tns="http://lang.java/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Exception" type="tns:Exception"/>
<xs:complexType name="Exception"><xs:sequence><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://service/" xmlns:tns="http://service/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="sayHelloResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="sayHello"><xs:complexType/></xs:element></xs:schema>
</wsdl:types>
<wsdl:message name="sayHelloResponse">
<wsdl:part name="sayHelloResponse" element="sayHelloResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="sayHello">
<wsdl:part name="sayHello" element="sayHello">
</wsdl:part>
</wsdl:message>
<wsdl:message name="Exception">
<wsdl:part name="Exception" element="ns4:Exception">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="IHelloWorldService">
<wsdl:operation name="sayHello">
<wsdl:input message="sayHello">
</wsdl:input>
<wsdl:output message="sayHelloResponse">
</wsdl:output>
<wsdl:fault name="Exception" message="ns4:Exception">
</wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="IHelloWorldServiceBinding" type="IHelloWorldService">
<SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHello">
<SOAP:operation/>
<wsdl:input>
<SOAP:body use="literal"/>
</wsdl:input>
<wsdl:output>
<SOAP:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<SOAP:fault name="Exception" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="IHelloWorldServiceService">
<wsdl:port name="IHelloWorldServicePort" binding="IHelloWorldServiceBinding">
<SOAP:address location="http://velian01:8080/HelloWorldServiceComponent"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---
The solution is to change the namespace
message="ns4:Exception"
to
message="tns:Exception"
These faults should always be placed into Namespace tns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TUSCANY-3793) WSDL: Generated Namespace for
Faults are Wrong
Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933487#action_12933487 ]
Simon Nash commented on TUSCANY-3793:
-------------------------------------
We are all racing to fix this first! I just committed a fix for TUSCANY-3778 which fixes this problem and the other problem with byte arrays.
> WSDL: Generated Namespace for Faults are Wrong
> ----------------------------------------------
>
> Key: TUSCANY-3793
> URL: https://issues.apache.org/jira/browse/TUSCANY-3793
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Databinding-SDO
> Affects Versions: Java-SCA-1.6
> Environment: Linux, Fedora 10, 2.6.27.38-170.2.113.fc10.i686.PAE
> Reporter: Christian Nolte
>
> Refering to mailing list post:
> http://osdir.com/ml/user-tuscany.apache.org/2010-10/msg00059.html
> The namespaces for faults (Exceptions) are wrong. Consider this example (modified HelloWorldService):
> helloWorldService.composite:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="helloWorldService"
> targetNamespace="http://eclipse.org/HelloWorldService/src/resources/HelloWorldService">
> <sca:component name="HelloWorldServiceComponent">
> <sca:implementation.java class="implementations.HelloWorldServiceImpl"/>
> <sca:service name="IHelloWorldService">
> <sca:interface.java interface="service.IHelloWorldService"/>
> <sca:binding.ws/>
> </sca:service>
> </sca:component>
> </sca:composite>
> ---
> IHelloWorldService.java:
> ---
> package service;
> import javax.jws.WebService;
> @WebService
> public interface IHelloWorldService {
> public String sayHello() throws Exception;
> }
> ---
> HelloWorldServiceImpl.java:
> ---
> package implementations;
> import org.osoa.sca.annotations.Service;
> import service.IHelloWorldService;
> @Service(IHelloWorldService.class)
> public class HelloWorldServiceImpl implements IHelloWorldService{
> private String sayHello = "Hello remote SCA";
>
> @Override
> public String sayHello() throws Exception {
> return this.sayHello;
> }
> }
> ---
> Generated http://localhost:8080/HelloWorldServiceComponent?wsdl
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="IHelloWorldServiceService" targetNamespace="http://service/" xmlns="http://service/" xmlns:ns4="http://lang.java/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xs:schema targetNamespace="http://lang.java/" version="1.0" xmlns:tns="http://lang.java/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Exception" type="tns:Exception"/>
> <xs:complexType name="Exception"><xs:sequence><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType>
> </xs:schema>
> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://service/" xmlns:tns="http://service/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="sayHelloResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="sayHello"><xs:complexType/></xs:element></xs:schema>
> </wsdl:types>
> <wsdl:message name="sayHelloResponse">
> <wsdl:part name="sayHelloResponse" element="sayHelloResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="sayHello">
> <wsdl:part name="sayHello" element="sayHello">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="Exception">
> <wsdl:part name="Exception" element="ns4:Exception">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="IHelloWorldService">
> <wsdl:operation name="sayHello">
> <wsdl:input message="sayHello">
> </wsdl:input>
> <wsdl:output message="sayHelloResponse">
> </wsdl:output>
> <wsdl:fault name="Exception" message="ns4:Exception">
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="IHelloWorldServiceBinding" type="IHelloWorldService">
> <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHello">
> <SOAP:operation/>
> <wsdl:input>
> <SOAP:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <SOAP:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="Exception">
> <SOAP:fault name="Exception" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="IHelloWorldServiceService">
> <wsdl:port name="IHelloWorldServicePort" binding="IHelloWorldServiceBinding">
> <SOAP:address location="http://velian01:8080/HelloWorldServiceComponent"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ---
> The solution is to change the namespace
> message="ns4:Exception"
> to
> message="tns:Exception"
> These faults should always be placed into Namespace tns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TUSCANY-3793) WSDL: Generated Namespace for
Faults are Wrong
Posted by "Scott Kurz (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933446#action_12933446 ]
Scott Kurz commented on TUSCANY-3793:
-------------------------------------
This looks like the same symptom as the second one mentioned in TUSCANY-3778, right?
> WSDL: Generated Namespace for Faults are Wrong
> ----------------------------------------------
>
> Key: TUSCANY-3793
> URL: https://issues.apache.org/jira/browse/TUSCANY-3793
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Databinding-SDO
> Affects Versions: Java-SCA-1.6
> Environment: Linux, Fedora 10, 2.6.27.38-170.2.113.fc10.i686.PAE
> Reporter: Christian Nolte
>
> Refering to mailing list post:
> http://osdir.com/ml/user-tuscany.apache.org/2010-10/msg00059.html
> The namespaces for faults (Exceptions) are wrong. Consider this example (modified HelloWorldService):
> helloWorldService.composite:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="helloWorldService"
> targetNamespace="http://eclipse.org/HelloWorldService/src/resources/HelloWorldService">
> <sca:component name="HelloWorldServiceComponent">
> <sca:implementation.java class="implementations.HelloWorldServiceImpl"/>
> <sca:service name="IHelloWorldService">
> <sca:interface.java interface="service.IHelloWorldService"/>
> <sca:binding.ws/>
> </sca:service>
> </sca:component>
> </sca:composite>
> ---
> IHelloWorldService.java:
> ---
> package service;
> import javax.jws.WebService;
> @WebService
> public interface IHelloWorldService {
> public String sayHello() throws Exception;
> }
> ---
> HelloWorldServiceImpl.java:
> ---
> package implementations;
> import org.osoa.sca.annotations.Service;
> import service.IHelloWorldService;
> @Service(IHelloWorldService.class)
> public class HelloWorldServiceImpl implements IHelloWorldService{
> private String sayHello = "Hello remote SCA";
>
> @Override
> public String sayHello() throws Exception {
> return this.sayHello;
> }
> }
> ---
> Generated http://localhost:8080/HelloWorldServiceComponent?wsdl
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="IHelloWorldServiceService" targetNamespace="http://service/" xmlns="http://service/" xmlns:ns4="http://lang.java/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xs:schema targetNamespace="http://lang.java/" version="1.0" xmlns:tns="http://lang.java/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Exception" type="tns:Exception"/>
> <xs:complexType name="Exception"><xs:sequence><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType>
> </xs:schema>
> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://service/" xmlns:tns="http://service/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="sayHelloResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="sayHello"><xs:complexType/></xs:element></xs:schema>
> </wsdl:types>
> <wsdl:message name="sayHelloResponse">
> <wsdl:part name="sayHelloResponse" element="sayHelloResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="sayHello">
> <wsdl:part name="sayHello" element="sayHello">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="Exception">
> <wsdl:part name="Exception" element="ns4:Exception">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="IHelloWorldService">
> <wsdl:operation name="sayHello">
> <wsdl:input message="sayHello">
> </wsdl:input>
> <wsdl:output message="sayHelloResponse">
> </wsdl:output>
> <wsdl:fault name="Exception" message="ns4:Exception">
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="IHelloWorldServiceBinding" type="IHelloWorldService">
> <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHello">
> <SOAP:operation/>
> <wsdl:input>
> <SOAP:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <SOAP:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="Exception">
> <SOAP:fault name="Exception" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="IHelloWorldServiceService">
> <wsdl:port name="IHelloWorldServicePort" binding="IHelloWorldServiceBinding">
> <SOAP:address location="http://velian01:8080/HelloWorldServiceComponent"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ---
> The solution is to change the namespace
> message="ns4:Exception"
> to
> message="tns:Exception"
> These faults should always be placed into Namespace tns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TUSCANY-3793) WSDL: Generated Namespace for
Faults are Wrong
Posted by "Christian Nolte (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933452#action_12933452 ]
Christian Nolte commented on TUSCANY-3793:
------------------------------------------
Sounds great. Is there a patch available which I can give a try?
> WSDL: Generated Namespace for Faults are Wrong
> ----------------------------------------------
>
> Key: TUSCANY-3793
> URL: https://issues.apache.org/jira/browse/TUSCANY-3793
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Databinding-SDO
> Affects Versions: Java-SCA-1.6
> Environment: Linux, Fedora 10, 2.6.27.38-170.2.113.fc10.i686.PAE
> Reporter: Christian Nolte
>
> Refering to mailing list post:
> http://osdir.com/ml/user-tuscany.apache.org/2010-10/msg00059.html
> The namespaces for faults (Exceptions) are wrong. Consider this example (modified HelloWorldService):
> helloWorldService.composite:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="helloWorldService"
> targetNamespace="http://eclipse.org/HelloWorldService/src/resources/HelloWorldService">
> <sca:component name="HelloWorldServiceComponent">
> <sca:implementation.java class="implementations.HelloWorldServiceImpl"/>
> <sca:service name="IHelloWorldService">
> <sca:interface.java interface="service.IHelloWorldService"/>
> <sca:binding.ws/>
> </sca:service>
> </sca:component>
> </sca:composite>
> ---
> IHelloWorldService.java:
> ---
> package service;
> import javax.jws.WebService;
> @WebService
> public interface IHelloWorldService {
> public String sayHello() throws Exception;
> }
> ---
> HelloWorldServiceImpl.java:
> ---
> package implementations;
> import org.osoa.sca.annotations.Service;
> import service.IHelloWorldService;
> @Service(IHelloWorldService.class)
> public class HelloWorldServiceImpl implements IHelloWorldService{
> private String sayHello = "Hello remote SCA";
>
> @Override
> public String sayHello() throws Exception {
> return this.sayHello;
> }
> }
> ---
> Generated http://localhost:8080/HelloWorldServiceComponent?wsdl
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="IHelloWorldServiceService" targetNamespace="http://service/" xmlns="http://service/" xmlns:ns4="http://lang.java/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xs:schema targetNamespace="http://lang.java/" version="1.0" xmlns:tns="http://lang.java/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Exception" type="tns:Exception"/>
> <xs:complexType name="Exception"><xs:sequence><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType>
> </xs:schema>
> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://service/" xmlns:tns="http://service/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="sayHelloResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="sayHello"><xs:complexType/></xs:element></xs:schema>
> </wsdl:types>
> <wsdl:message name="sayHelloResponse">
> <wsdl:part name="sayHelloResponse" element="sayHelloResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="sayHello">
> <wsdl:part name="sayHello" element="sayHello">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="Exception">
> <wsdl:part name="Exception" element="ns4:Exception">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="IHelloWorldService">
> <wsdl:operation name="sayHello">
> <wsdl:input message="sayHello">
> </wsdl:input>
> <wsdl:output message="sayHelloResponse">
> </wsdl:output>
> <wsdl:fault name="Exception" message="ns4:Exception">
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="IHelloWorldServiceBinding" type="IHelloWorldService">
> <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHello">
> <SOAP:operation/>
> <wsdl:input>
> <SOAP:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <SOAP:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="Exception">
> <SOAP:fault name="Exception" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="IHelloWorldServiceService">
> <wsdl:port name="IHelloWorldServicePort" binding="IHelloWorldServiceBinding">
> <SOAP:address location="http://velian01:8080/HelloWorldServiceComponent"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ---
> The solution is to change the namespace
> message="ns4:Exception"
> to
> message="tns:Exception"
> These faults should always be placed into Namespace tns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TUSCANY-3793) WSDL: Generated Namespace for
Faults are Wrong
Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933449#action_12933449 ]
Simon Laws commented on TUSCANY-3793:
-------------------------------------
You beat me to it Scott. I have a fix for 3778 which I think will fix this also.
> WSDL: Generated Namespace for Faults are Wrong
> ----------------------------------------------
>
> Key: TUSCANY-3793
> URL: https://issues.apache.org/jira/browse/TUSCANY-3793
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Databinding-SDO
> Affects Versions: Java-SCA-1.6
> Environment: Linux, Fedora 10, 2.6.27.38-170.2.113.fc10.i686.PAE
> Reporter: Christian Nolte
>
> Refering to mailing list post:
> http://osdir.com/ml/user-tuscany.apache.org/2010-10/msg00059.html
> The namespaces for faults (Exceptions) are wrong. Consider this example (modified HelloWorldService):
> helloWorldService.composite:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="helloWorldService"
> targetNamespace="http://eclipse.org/HelloWorldService/src/resources/HelloWorldService">
> <sca:component name="HelloWorldServiceComponent">
> <sca:implementation.java class="implementations.HelloWorldServiceImpl"/>
> <sca:service name="IHelloWorldService">
> <sca:interface.java interface="service.IHelloWorldService"/>
> <sca:binding.ws/>
> </sca:service>
> </sca:component>
> </sca:composite>
> ---
> IHelloWorldService.java:
> ---
> package service;
> import javax.jws.WebService;
> @WebService
> public interface IHelloWorldService {
> public String sayHello() throws Exception;
> }
> ---
> HelloWorldServiceImpl.java:
> ---
> package implementations;
> import org.osoa.sca.annotations.Service;
> import service.IHelloWorldService;
> @Service(IHelloWorldService.class)
> public class HelloWorldServiceImpl implements IHelloWorldService{
> private String sayHello = "Hello remote SCA";
>
> @Override
> public String sayHello() throws Exception {
> return this.sayHello;
> }
> }
> ---
> Generated http://localhost:8080/HelloWorldServiceComponent?wsdl
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="IHelloWorldServiceService" targetNamespace="http://service/" xmlns="http://service/" xmlns:ns4="http://lang.java/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xs:schema targetNamespace="http://lang.java/" version="1.0" xmlns:tns="http://lang.java/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Exception" type="tns:Exception"/>
> <xs:complexType name="Exception"><xs:sequence><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType>
> </xs:schema>
> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://service/" xmlns:tns="http://service/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="sayHelloResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="sayHello"><xs:complexType/></xs:element></xs:schema>
> </wsdl:types>
> <wsdl:message name="sayHelloResponse">
> <wsdl:part name="sayHelloResponse" element="sayHelloResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="sayHello">
> <wsdl:part name="sayHello" element="sayHello">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="Exception">
> <wsdl:part name="Exception" element="ns4:Exception">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="IHelloWorldService">
> <wsdl:operation name="sayHello">
> <wsdl:input message="sayHello">
> </wsdl:input>
> <wsdl:output message="sayHelloResponse">
> </wsdl:output>
> <wsdl:fault name="Exception" message="ns4:Exception">
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="IHelloWorldServiceBinding" type="IHelloWorldService">
> <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHello">
> <SOAP:operation/>
> <wsdl:input>
> <SOAP:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <SOAP:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="Exception">
> <SOAP:fault name="Exception" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="IHelloWorldServiceService">
> <wsdl:port name="IHelloWorldServicePort" binding="IHelloWorldServiceBinding">
> <SOAP:address location="http://velian01:8080/HelloWorldServiceComponent"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ---
> The solution is to change the namespace
> message="ns4:Exception"
> to
> message="tns:Exception"
> These faults should always be placed into Namespace tns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TUSCANY-3793) WSDL: Generated Namespace for
Faults are Wrong
Posted by "Christian Nolte (JIRA)" <de...@tuscany.apache.org>.
[ https://issues.apache.org/jira/browse/TUSCANY-3793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933409#action_12933409 ]
Christian Nolte commented on TUSCANY-3793:
------------------------------------------
This problem has been verified by using wsimport on the generated WSDL:
$ wsimport -verbose -keep http://velian01:8080/HelloWorldServiceComponent?wsdl
parsing WSDL...
[ERROR] wsdl:message "{http://lang.java/}Exception" not found in the wsdl: http://velian01:8080/HelloWorldServiceComponent?wsdl
> WSDL: Generated Namespace for Faults are Wrong
> ----------------------------------------------
>
> Key: TUSCANY-3793
> URL: https://issues.apache.org/jira/browse/TUSCANY-3793
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Databinding-SDO
> Affects Versions: Java-SCA-1.6
> Environment: Linux, Fedora 10, 2.6.27.38-170.2.113.fc10.i686.PAE
> Reporter: Christian Nolte
>
> Refering to mailing list post:
> http://osdir.com/ml/user-tuscany.apache.org/2010-10/msg00059.html
> The namespaces for faults (Exceptions) are wrong. Consider this example (modified HelloWorldService):
> helloWorldService.composite:
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="helloWorldService"
> targetNamespace="http://eclipse.org/HelloWorldService/src/resources/HelloWorldService">
> <sca:component name="HelloWorldServiceComponent">
> <sca:implementation.java class="implementations.HelloWorldServiceImpl"/>
> <sca:service name="IHelloWorldService">
> <sca:interface.java interface="service.IHelloWorldService"/>
> <sca:binding.ws/>
> </sca:service>
> </sca:component>
> </sca:composite>
> ---
> IHelloWorldService.java:
> ---
> package service;
> import javax.jws.WebService;
> @WebService
> public interface IHelloWorldService {
> public String sayHello() throws Exception;
> }
> ---
> HelloWorldServiceImpl.java:
> ---
> package implementations;
> import org.osoa.sca.annotations.Service;
> import service.IHelloWorldService;
> @Service(IHelloWorldService.class)
> public class HelloWorldServiceImpl implements IHelloWorldService{
> private String sayHello = "Hello remote SCA";
>
> @Override
> public String sayHello() throws Exception {
> return this.sayHello;
> }
> }
> ---
> Generated http://localhost:8080/HelloWorldServiceComponent?wsdl
> ---
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="IHelloWorldServiceService" targetNamespace="http://service/" xmlns="http://service/" xmlns:ns4="http://lang.java/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xs:schema targetNamespace="http://lang.java/" version="1.0" xmlns:tns="http://lang.java/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="Exception" type="tns:Exception"/>
> <xs:complexType name="Exception"><xs:sequence><xs:element minOccurs="0" name="message" type="xs:string"/></xs:sequence></xs:complexType>
> </xs:schema>
> <xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://service/" xmlns:tns="http://service/" xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="sayHelloResponse"><xs:complexType><xs:sequence><xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/></xs:sequence></xs:complexType></xs:element><xs:element name="sayHello"><xs:complexType/></xs:element></xs:schema>
> </wsdl:types>
> <wsdl:message name="sayHelloResponse">
> <wsdl:part name="sayHelloResponse" element="sayHelloResponse">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="sayHello">
> <wsdl:part name="sayHello" element="sayHello">
> </wsdl:part>
> </wsdl:message>
> <wsdl:message name="Exception">
> <wsdl:part name="Exception" element="ns4:Exception">
> </wsdl:part>
> </wsdl:message>
> <wsdl:portType name="IHelloWorldService">
> <wsdl:operation name="sayHello">
> <wsdl:input message="sayHello">
> </wsdl:input>
> <wsdl:output message="sayHelloResponse">
> </wsdl:output>
> <wsdl:fault name="Exception" message="ns4:Exception">
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="IHelloWorldServiceBinding" type="IHelloWorldService">
> <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="sayHello">
> <SOAP:operation/>
> <wsdl:input>
> <SOAP:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <SOAP:body use="literal"/>
> </wsdl:output>
> <wsdl:fault name="Exception">
> <SOAP:fault name="Exception" use="literal"/>
> </wsdl:fault>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="IHelloWorldServiceService">
> <wsdl:port name="IHelloWorldServicePort" binding="IHelloWorldServiceBinding">
> <SOAP:address location="http://velian01:8080/HelloWorldServiceComponent"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> ---
> The solution is to change the namespace
> message="ns4:Exception"
> to
> message="tns:Exception"
> These faults should always be placed into Namespace tns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.