[
https://issues.jboss.org/browse/LOGTOOL-76?page=com.atlassian.jira.plugin...
]
James Perkins commented on LOGTOOL-76:
--------------------------------------
Looking at the code this won't quite work. Mainly because of the way the exception
constructor signature is defined. The code generator assumes the first string type in the
constructor is the message. In the case of a {{WSDLException}} the first constructor
parameter seems to be the code. I'm not sure whether it's worth exploring the
ability to express more meta data about a constructor or now.
For now the only solution would be for the message to be returned as a string type then
create the exception manually.
{code:java}
/**
* couldNotFindServiceInTheWSDL method definition.
* @param portName the portName
* @param definitionDocumentBaseURI definitionDocumentBaseURI
* @return the error message
*/
@Message(id = 35436, value = "Could not find service %s in the WSDL %s")
String couldNotFindServiceInTheWSDL(String portName, String definitionDocumentBaseURI);
{code}
Then create the exception something like:
{code:java}
throw new WSDLException(faultCode, MESSAGES.couldNotFindServiceInTheWSDL(portName,
definitionDocumentBaseURI);
{code}
JBoss Logging Processor should support WSDLException
----------------------------------------------------
Key: LOGTOOL-76
URL:
https://issues.jboss.org/browse/LOGTOOL-76
Project: Log Tool
Issue Type: Bug
Security Level: Public(Everyone can see)
Reporter: Tom Cunningham
Assignee: David Lloyd
This is a jboss-logging-processor issue - javax.wsdl.WSDLException has constructors :
public WSDLException(java.lang.String faultCode,
java.lang.String msg,
java.lang.Throwable t)
public WSDLException(java.lang.String faultCode,
java.lang.String msg)
When I try to localize with this :
/**
* couldNotFindServiceInTheWSDL method definition.
* @param portName the portName
* @param definitionDocumentBaseURI definitionDocumentBaseURI
* @return WSDLException
*/
@Message(id = 35436, value = "Could not find service %s in the WSDL %s")
WSDLException couldNotFindServiceInTheWSDL(String portName, String
definitionDocumentBaseURI);
I see compilation errors because jboss-logging-processor doesn't know how to support
the WSDLException constructors. We should support them.
Failure:
[ERROR]
/Users/tcunning/src/switchyard/cunningt/components/soap/src/main/java/org/switchyard/component/soap/SOAPMessages.java:[189,18]
MessageMethod does not have an usable constructor for the return type
javax.wsdl.WSDLException.
[ERROR]
/Users/tcunning/src/switchyard/cunningt/components/soap/src/main/java/org/switchyard/component/soap/SOAPMessages.java:[197,18]
MessageMethod does not have an usable constructor for the return type
javax.wsdl.WSDLException.
[ERROR]
/Users/tcunning/src/switchyard/cunningt/components/soap/src/main/java/org/switchyard/component/soap/SOAPMessages.java:[206,18]
MessageMethod does not have an usable constructor for the return type
javax.wsdl.WSDLException.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira