[
https://issues.apache.org/jira/browse/TUSCANY-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Simon Laws closed TUSCANY-2042.
-------------------------------
Resolution: Cannot Reproduce
Fix Version/s: (was: Java-SCA-Next)
Java-SCA-1.2
I just tried this with the Auto generation part of itest/wsdl-multiple. I
stopped the Axis2ServiceBindingProvider in the debugger at the code where the
WSDL is generated...
if (contract == null) {
contract = service.getInterfaceContract().makeUnidirectional(false);
if ((contract instanceof JavaInterfaceContract)) {
contract =
Java2WSDLHelper.createWSDLInterfaceContract((JavaInterfaceContract)contract,
requiresSOAP12(wsBinding));
}
wsBinding.setBindingInterfaceContract(contract);
}
Look at the contract generated for the Java interface...
public interface HelloWorldService {
public void getGreetings(String name);
}
Both request and response messages are generated. I am on Axis2 1.3.
> Dynamically generated WSDL not generating output message for void types
> -------------------------------------------------------------------------
>
> Key: TUSCANY-2042
> URL: https://issues.apache.org/jira/browse/TUSCANY-2042
> Project: Tuscany
> Issue Type: Bug
> Reporter: Lou Amodeo
> Assignee: Simon Laws
> Fix For: Java-SCA-1.2
>
> Attachments: helloworld-ws-asynch.jar
>
>
> This problem is similar to Tuscany-1658 but it appears the fix is not working
> properly in all cases. I am finding that the
> namespace and element namespace values assigned durig the dynamic wsdl
> definition generation are causing the following code to not function because
> the if (element.getAttribute("targetNamespace").equals(namespaceURI)) {
> is returning false. This is because the target namespace is being generated
> as : targetNamespace=http://helloworld
> while the element namespace is : http://helloworld/xsd
> The method signature is : public void getGreetings(String name)
> class: Java2WSDLHelper.java
> private static void processNoArgAndVoidReturnMethods(Definition definition,
> Class javaInterface) {
> String namespaceURI = definition.getTargetNamespace();
> String prefix = definition.getPrefix(namespaceURI);
> String xsPrefix =
> definition.getPrefix("http://www.w3.org/2001/XMLSchema");
> PortType portType =
> (PortType)definition.getAllPortTypes().values().iterator().next();
> Element schema = null;
> Document document = null;
> Types types = definition.getTypes();
> if (types != null) {
> for (Object ext : types.getExtensibilityElements()) {
> if (ext instanceof Schema) {
> Element element = ((Schema)ext).getElement();
> if
> (element.getAttribute("targetNamespace").equals(namespaceURI)) {
> schema = element;
> document = schema.getOwnerDocument();
> break;
> }
> }
> }
> }
> if (document == null) {
> return;
> }
> Definition generated:
> Definition: name=null targetNamespace=http://helloworld
> Types:
> SchemaExtensibilityElement ({http://www.w3.org/2001/XMLSchema}schema):
> required=null
> element=[xs:schema: null]
> Message: name={http://helloworld}getGreetingsMessage
> Part: name=part1
> elementName={http://helloworld/xsd}getGreetings
> PortType: name={http://helloworld}HelloWorldServicePortType
> Operation: name=getGreetings
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://helloworld}getGreetingsMessage
> Part: name=part1
> elementName={http://helloworld/xsd}getGreetings
> Binding: name={http://helloworld}HelloWorldServiceSOAP12Binding
> PortType: name={http://helloworld}HelloWorldServicePortType
> Operation: name=getGreetings
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://helloworld}getGreetingsMessage
> Part: name=part1
> elementName={http://helloworld/xsd}getGreetings
> BindingOperation: name=getGreetings
> BindingInput: name=null
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap12/}body):
> required=null
> use=literal
> namespaceURI=http://helloworld
> SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap12/}operation):
> required=null
> soapActionURI=urn:getGreetings
> style=document
> SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap12/}binding):
> required=null
> transportURI=http://schemas.xmlsoap.org/soap/http
> style=document
> Binding: name={http://helloworld}HelloWorldServiceSOAP11Binding
> PortType: name={http://helloworld}HelloWorldServicePortType
> Operation: name=getGreetings
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://helloworld}getGreetingsMessage
> Part: name=part1
> elementName={http://helloworld/xsd}getGreetings
> BindingOperation: name=getGreetings
> BindingInput: name=null
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
> required=null
> use=literal
> namespaceURI=http://helloworld
> SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
> required=null
> soapActionURI=urn:getGreetings
> style=document
> SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
> required=null
> transportURI=http://schemas.xmlsoap.org/soap/http
> style=document
> Service: name={http://helloworld}HelloWorldService
> Port: name=HelloWorldServiceSOAP11port
> Binding: name={http://helloworld}HelloWorldServiceSOAP11Binding
> PortType: name={http://helloworld}HelloWorldServicePortType
> Operation: name=getGreetings
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://helloworld}getGreetingsMessage
> Part: name=part1
> elementName={http://helloworld/xsd}getGreetings
> BindingOperation: name=getGreetings
> BindingInput: name=null
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap/}body):
> required=null
> use=literal
> namespaceURI=http://helloworld
> SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap/}operation):
> required=null
> soapActionURI=urn:getGreetings
> style=document
> SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap/}binding):
> required=null
> transportURI=http://schemas.xmlsoap.org/soap/http
> style=document
> SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap/}address):
> required=null
> locationURI=http://localhost:8080/axis2/services/HelloWorldService
> Port: name=HelloWorldServiceSOAP12port
> Binding: name={http://helloworld}HelloWorldServiceSOAP12Binding
> PortType: name={http://helloworld}HelloWorldServicePortType
> Operation: name=getGreetings
> style=ONE_WAY,0
> Input: name=null
> Message: name={http://helloworld}getGreetingsMessage
> Part: name=part1
> elementName={http://helloworld/xsd}getGreetings
> BindingOperation: name=getGreetings
> BindingInput: name=null
> SOAPBody ({http://schemas.xmlsoap.org/wsdl/soap12/}body):
> required=null
> use=literal
> namespaceURI=http://helloworld
> SOAPOperation ({http://schemas.xmlsoap.org/wsdl/soap12/}operation):
> required=null
> soapActionURI=urn:getGreetings
> style=document
> SOAPBinding ({http://schemas.xmlsoap.org/wsdl/soap12/}binding):
> required=null
> transportURI=http://schemas.xmlsoap.org/soap/http
> style=document
> SOAPAddress ({http://schemas.xmlsoap.org/wsdl/soap12/}address):
> required=null
> locationURI=http://localhost:8080/axis2/services/HelloWorldService
>
> I have attached a jar containing the testcase.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]