geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Genender <jgenen...@apache.org>
Subject Re: Questions for Axis2 folks re: JAXWS
Date Mon, 05 Mar 2007 15:37:22 GMT
Lin,

The problem here is that there is no webservices.xml and is solely
dependent upon the WebService annotation.

The question is...is Axis2 processing the WebService annotation? Upon
stepping through the code, I did not see that getting called anywhere.

One possible solution is that Geronimo processes the annotation and
passes the proper PortInfo object to Axis2.

I didn't want to do that if Axis2 was also processing the annotation.

Jeff



Lin Sun wrote:
> Hi Jeff,
> 
> Thanks for noticing this issue.  I just ran a bit test myself with a
> faily recent server built last Friday, and I got different result than
> you.  Here are mine:
> 
> 1) when targetNamespace are specified in both wsdl and annotation and in
> webservices.xml file, the wsdl-file is used like:
> 
> <wsdl-file>WEB-INF/wsdl/greeter_control.wsdl</wsdl-file>
> 
> I would get
> 
> targetNamespace="http://apache.org/greeter_control"
> 
> from a ?wsdl request.
> 
> This code should be fairly straight-forward, as we would just generate
> the WSDLDefition using AxisServiceGenerator().getWSDLDefition and write
> it out to the response.
> 
> So in summary, this is working correctly.  Seems your scenario is this
> case, so I would suggest making sure you have a reference to your
> wsdl-file in your webservices.xml file.
> 
> 2) When wsdl is not used, for example, I specify
> "<wsdl-file></wsdl-file>" in my webservices.xml file, then I would
> notice the prob you described.   In this case, we rely on Axis2 and call
> AxisService.printWSDL.
> 
> HTH, Lin
> 
> 
> 
> 
> 
> 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
>>>>>
>>>>>   
>>

Mime
View raw message