Please read my in line comments.

Thanks,
Lasantha

Lin Sun wrote:
I have been giving some thoughts on this prob yesterday. By looking at the java comments for AxisService.createService, it seems this method is only for RPCMessageReceiver, but we are using JAXWSMessageReceiver here. Maybe dims or Lasantha can comment on this.
I don't think using JAXWSMessageReciever is a problem here (according to the way JAXWS samples works with Axis2). Do you have a better solution for it?

seems there are 2 scenarios:
1) no webservices.xml, no .wsdl, just java files with annotation:

One solution I can think of is to create a temp wsdl file when Axis2Builder is called based on the java files (seems this can be done either using the Java2WSDLCodegenEngine from Axis2 or using Sun's tools), and then set PortInfo properties there. When Axis2WebServiceContainer is called, we'll treat it as wsdl file already exists. Delete the temp wsdl file at the end.
Can't we directly let the Axis2 handle the problem rather than handling it from G side (do we need to do some processing in G side) ?

2) no webservices.xml, just .wsdl and java files with annotation.

In this case, since there is no webservices.xml, should we scan the module to see if .wsdl file is included in Axis2Builder? if so, set the wsdl-file property in PortInfo.

I haven't implemented anything yet as I think we should all agree to a solution first.

Lin

Jeff Genender wrote:
o.a.g.Axis2WebserviceContainer, line 99. A not-filled in PortInfo is
passed in since G is not processing a WebService annotation, and thus an
AxisService.create is called on line 104.

When Axis2WebserviceContainer.getWsdl() is ultimately called,
doService2() is called (line 212), then to processGetRequest (line 398),
leading us to line 435 where the PortInfo is checked as to whether a
wsdl file has been passed in or not.  If it has, it spits out the wsdl.
 If it has not, then the AxisService.printWsdl() is called and that call
spits out a generated wsdl.

The crux here is that the PortInfo object does not have all of the info
filled in such as seiClass, wsdl file, etc.  That stuff would have been
gotten from examining the WebService annotation.

The question is, where does that examination or, should that
examination, take place? Geronimo or Axis2?

Jeff

Lasantha Ranaweera wrote:
Jeff,

Sorry for a late reply due to my time stamp difference and don't know
exactly you have solved this problem right now or not. Anyway here is my
comment.

Since you haven't given me exact source code I won't be able to point
you in to the exact source code in the Axis2. May be remote debugging
...  ;-) .

Thanks,
Lasantha

Jeff Genender wrote:
Ok...

I am pretty certain at this stage that the WebService annotation is not
getting processed.  Can you point me to the code that handles this in
Axis2?

Thanks,

Jeff



Jeff Genender wrote:
Thanks...this is very helpful.

Then by this, looking at the PortInfo, it appears as though it is not
stuffing in the WSDL file, which tells me it's a G thang ;-)

Jeff

Lasantha Ranaweera wrote:
Hi Jeff,

To my understanding if we have given a WSDL in an archive it should get
the priority than the information in the annotations.

In Axis2 integration there are two parts of implementation with one for
with WSDL which is mainly handling by G side while with annotations
from
Axis2. For me it is something missing in G side.

Somebody in the list please correct me  if I am wrong here .

Thanks,
Lasantha
Jeff Genender wrote:
Hi,

I have noticed when I deploy a war file (with a WSDL), I have a
certain
target name specified both in the WSDL and in the code that uses a
WebService annotation.

However, when I go retrieve the WSDL, I notice the target name
seems to
be munged according to the package name (backwards) of the code that
contains the WebService annotation.

Example...

I have include a WSDL called Hello.wsdl that is in the war file in the
web-inf/wsdl directory and starts with:

<wsdl:definitions targetNamespace="http://example.com/hello/xsd";>
...

I have a HelloWorld.java that has this:

package test.mypackage;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(name="HelloWorld", targetNamespace =
"http://example.org/hello/xsd";)
public class HelloWorld {

    @WebMethod
    public String sayHello(String me){
        return "Hello "+me;
    }
}

However, when I request the wsdl...I get something like this:

<wsdl:definitions targetNamespace="http://mypackage.test/xsd";>
...

Notice the targetnamespace was munged and changed from it's originally declared namespace of "http://example.com/hello/xsd";. I want the one that is both declared in the included wsdl (or the one declared in the
annotation).

Is this a facet of Axis2 or is Geronimo not passing a proper PortInfo
object with the necessary stuff filled in?

Any light on this subject would be greatly appreciated ;-)

Thanks,

Jeff






Reply via email to