You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Peter Danielsen <wi...@gmail.com> on 2007/05/26 19:03:03 UTC
Axis2 codegen handling of WSDL2 message labels
Hi,
I've been trying to create an Axis2 code generation template
that would use the value of a message's "messageLabel" attribute in
a WSDL2 document. Unfortunately, that value doesn't appear in the DOM
created by the AxisServiceBasedMultiLanguageEmitter. I looked into
this a bit and found that the actual value of the message label
is lost in sub-class implementations of the abstract AxisOperation method
addMessage(AxisMessage, String)
called by WSDL20ToAxisServiceBuilder.createAxisMessage().
It looks like there's an assumption that message label and
message direction are synonymous.
In TwoChannelAxisOperation.addMessage(AxisMessage, String), the
method checks the label against some pre-defined values and then
classifies the message as either an input, output, or fault message.
This doesn't seem correct. If I'm reading the WSDL2 spec right, the message
exchange pattern defines the label constraints for its messages.
So, it seems like the classification should be based on
AxisMessage.getDirection() and maybe a new method, like "isFault()".
While what's there now may work, it won't if a new MEP is defined.
I think getDirection() should work regardless.
WSDL20ToAxisServiceBuilder.populateOperations exhibits the
assumption in the for loop that iterates over the
InterfaceMessageReferences. There may be other places, too.
WSDL2's ability to accommodate new, 3rd party MEPs also calls into question
Axis2's practice of mapping MEP strings to constant integer values
throughout the code. Why not just stick with the MEP strings?
Please let me know if I should open a JIRA for this.
Peter Danielsen
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
RE: Axis2 codegen Unable to determine namespace of 'ax21:IOException' "
Posted by Sharon <sh...@hotmail.com>.
I removed the IOException and replaced it with Exception
Now i get the following error :
27/05/2007 08:27:16 org.apache.axis2.description.WSDL11ToAxisServiceBuilder
addQNameReference
SEVERE: There are no parts for fault message :
{http://mycompanyName.com/}Exception
27/05/2007 08:27:16 org.apache.axis2.description.WSDL11ToAxisServiceBuilder
populateService
SEVERE:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingExcept
ion: There are no parts for fault message :
{http://mycompanyName.com/}Exception
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngi
ne.java:137)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: org.apache.axis2.AxisFault: There are no parts for fault message
: {http://mycompanyName.com/}Exception
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL
11ToAxisServiceBuilder.java:298)
at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServi
ces(WSDL11ToAllAxisServicesBuilder.java:100)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngi
ne.java:131)
... 2 more
Caused by:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingExcept
ion: There are no parts for fault message :
{http://mycompanyName.com/}Exception
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameReference(WS
DL11ToAxisServiceBuilder.java:920)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSDL
11ToAxisServiceBuilder.java:533)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WSD
L11ToAxisServiceBuilder.java:374)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WS
DL11ToAxisServiceBuilder.java:334)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL
11ToAxisServiceBuilder.java:288)
... 4 more
Java Result: 1
-----Original Message-----
From: Davanum Srinivas [mailto:davanum@gmail.com]
Sent: Sunday, May 27, 2007 4:31 AM
To: axis-dev@ws.apache.org
Subject: Re: Axis2 codegen Unable to determine namespace of
'ax21:IOException' "
Sharon,
Please log a bug with your original sources used to run java2wsdl. you
are probably throwing a IOException in one of your service classes,
please remove that and try just to check if that is the cause of the
problem.
thanks,
dims
On 5/26/07, Sharon <sh...@hotmail.com> wrote:
> Hi
> I am trying to get the client java files using Wsdl2Java generator,
> I am geting the next exception :
>
> UNBOUND_PREFIX: Unable to determine namespace of 'ax21:IOException'
>
> The wsdl was created by Java2Wsdl.
>
> Can I skip WSDL validation in order to create the client sources?
>
> Thank you
> Sharon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Axis2 codegen Unable to determine namespace of 'ax21:IOException' "
Posted by Davanum Srinivas <da...@gmail.com>.
Sharon,
Please log a bug with your original sources used to run java2wsdl. you
are probably throwing a IOException in one of your service classes,
please remove that and try just to check if that is the cause of the
problem.
thanks,
dims
On 5/26/07, Sharon <sh...@hotmail.com> wrote:
> Hi
> I am trying to get the client java files using Wsdl2Java generator,
> I am geting the next exception :
>
> UNBOUND_PREFIX: Unable to determine namespace of 'ax21:IOException'
>
> The wsdl was created by Java2Wsdl.
>
> Can I skip WSDL validation in order to create the client sources?
>
> Thank you
> Sharon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org
Re: Axis2 codegen Unable to determine namespace of 'ax21:IOException' "
Posted by Amila Suriarachchi <am...@gmail.com>.
On 5/27/07, Sharon <sh...@hotmail.com> wrote:
>
> Hi
> I am trying to get the client java files using Wsdl2Java generator,
> I am geting the next exception :
>
> UNBOUND_PREFIX: Unable to determine namespace of 'ax21:IOException'
>
> The wsdl was created by Java2Wsdl.
>
> Can I skip WSDL validation in order to create the client sources?
no.
1. it is wrong.
2. there is no sure whether you will able to generate the classes or not.
I think in both cases the real problem is with the wsdl file. please upload
your source files and generated wsdl and log a jira.
Thank you
> Sharon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
--
Amila Suriarachchi,
WSO2 Inc.
Axis2 codegen Unable to determine namespace of 'ax21:IOException' "
Posted by Sharon <sh...@hotmail.com>.
Hi
I am trying to get the client java files using Wsdl2Java generator,
I am geting the next exception :
UNBOUND_PREFIX: Unable to determine namespace of 'ax21:IOException'
The wsdl was created by Java2Wsdl.
Can I skip WSDL validation in order to create the client sources?
Thank you
Sharon
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org