Hi,

I've found one of the causes of this problem. I think this is either a WSDL2Java bug or I'm misinterpreting the WSDL requirements. It seems that WSDL2Java (as part of Apache-WSRF) doesn't like empty message types.

The custom messages looked like this:
<message name="markMilestoneRequestMsg">
   <part element="types:markMilestoneRequest"
        name="markMilestoneRequestSoapMsg" />
</message>
<message name="markMilestoneResponseMsg" />
<message name="startRequestMsg" />
<message name="startResponseMsg" />
<message name="endRequestMsg" />
<message name="endResponseMsg" />



When I use messages that are not empty (for all of them, in particular all the requests), such as:

<message name="startRequestMsg">
   <part element="types:startRequest"
        name="startRequestSoapMsg" />
</message>

with corresponding empty elements in the schema for NS "types":
   <element name="startRequest" />

all the methods are generated more or less properly.
(There is another problem, but I think it's unrelated).



In effect, from the stub side (as generated by Axis's WSDL2Java and WSRF's WSDL2Java), if forces to have a parameter to methods that wouldn't take one otherwise (in my case, "start" and "end", for example: "start(null)" instead of "start()").


To this extent, I think this is a bug in WSRF's WSDL2Java. I couldn't find it in the JIRA database, though. It's definitely a minor bug, but it's annoying for interoperability with other implementation of the same services. Would it be possible to fix this?



Cheers,

Bruno.





Bruno Harbulot wrote:
I've attached the result of "ant generate -debug" to this message. (I'm not sure how to interpret it, as I don't see anything that stands out as a problem).

The generated TaskServicePortCustomOperationsPortType file contains this (which is incorrect):

public interface TaskServicePortCustomOperationsPortType
{
      public void end(  requestDoc ) ;
public void markMilestone( uk.ac.esnw.taskTypes.MarkMilestoneRequestDocument requestDoc ) ;
}


I should say that removing "requestDoc" manually (and correcting the void.Factory.newInstance() statements etc. that are generated in the TaskServicePortService class) is not too big a problem, but missing operations/methods is a bit more annoying.


Thanks,

Bruno.


Campana Jr., Salvatore J wrote:

Bruno,

Are you running the generation using the Ant script?

If so can you run with -debug ..

Try to get me all the output, I'd like to see what it says...

Thx!

-----Original Message-----
From: Bruno Harbulot [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 9:28 AM
To: wsrf-user@ws.apache.org
Subject: Possible bugs in WSDL2Java?

Hello,

I'm getting some strange behaviour when I use the WSRF WSDL2Java. I'm using WSDL files adapted from the template (one of them is attached to this message).
This file contains three custom operations:

<operation name="markMilestone">
    <input message="tns:markMilestoneRequestMsg" />
    <output message="tns:markMilestoneResponseMsg" />
</operation>
<operation name="start">
    <input message="tns:startRequestMsg" />
    <output message="tns:startResponseMsg" />
</operation>
<operation name="end">
    <input message="tns:endRequestMsg" />
    <output message="tns:endResponseMsg" />
</operation>


However, the Java file generated contains this:

public interface TaskServicePortCustomOperationsPortType
{
public void markMilestone( uk.ac.esnw.task.MarkMilestoneRequestDocument requestDoc ) ; public void markMilestone( uk.ac.esnw.task.MarkMilestoneRequestDocument requestDoc ) ;
}

I get twice the same operation but the other two have mysteriously disappeared.



Another problem I had was that I was using xmlns:types="http://www.esnw.ac.uk/TaskTypes"; and not xmlns:types="http://www.esnw.ac.uk/Task"; (similarly modified in the schemas so that it uses this:
<xsd:schema targetNamespace="http://www.esnw.ac.uk/TaskTypes";>
   <xsd:import namespace="http://www.esnw.ac.uk/PulsarGrid"; />
   <xsd:element name="markMilestoneRequest" type="pg:Milestone" />
</xsd:schema>

This seemed to be a valid WSDL file. In this case, I get this:
public interface TaskServicePortCustomOperationsPortType
{
   public void end(  requestDoc ) ;
public void markMilestone(uk.ac.esnw.taskTypes.MarkMilestoneRequestDocument requestDoc ) ;
}


I had noticed in other cases as well that when the input message doesn't

contain anything (e.g. <message name="startRequestMsg" />), there is still a parameter name without a type generated, where as "()" would be correct and appropriate.


I can't find what's wrong with my WSDL file. Any suggestions?


Regards,

Bruno.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to