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 Ruwan Linton <ru...@apache.org> on 2008/04/12 14:55:55 UTC

Behavior of WSDLToServiceBuilder

Hi axis2 folks,

We (Synapse) have been using the WSDLToAxisServiceBuilder (to be more
specific WSDL11ToAxisServiceBuilder) to generate proxy services inside
synapse by using a given WSDL document. This was working fine with the Axis2
1.3 version and now we have migrated to axis2 SNAPSHOT (targeting to use the
axis2 1.4 release for our next release).

Now, when we generate the services using the above specified class, if we
try to print the WSDL of that service, it prints the WSDL with the ports
which are originally on the WSDL (the behavior is exactly the same as if we
specify the "useOriginalwsdl" to true and "modifyUserWSDLPortAddress" to
false). When we were using the axis2 1.3 this was working fine and replaced
the bindings and wsdl ports as appropriated. This causes wrong endpoint
address to be displayed in the WSDL.

Then I even tried to set the AxisEndpoint's endpointURL to null so that
allowing the printWSDL to take those values from the transports. When I did
this it shows a different URL as follows, which I think is wrong (may be I
am wrong here).

<wsdl:port name="StockQuoteProxyHttpSoap12Endpoint"
binding="axis2:StockQuoteProxySoap12Binding">
<soap12:address location="
http://ruwan:8080/soap/StockQuoteProxy.StockQuoteProxyHttpSoap12Endpoint"/>
</wsdl:port>

I was expecting the address location to be something like "
http://ruwan:8080/soap/StockQuoteProxy" but there is some suffix to that.
Even with this approach the bindings has not been changed (which is OK for
the moment). Then I even tried to manually set the AxisEndpoints to the
populated service using the Utils.addEndpoints(AxisService,
AxisConfiguration) method, which resulted in the same format in the address
locations.

Could some one please help me on this?

Reference :-
[1] - https://issues.apache.org/jira/browse/SYNAPSE-267
[2] - http://www.nabble.com/WSDL-Generation-to16588436.html

Thanks,
Ruwan

-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: Behavior of WSDLToServiceBuilder

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Sanka,

This is what I was looking for and, I got it resolved.

Thanks,
Ruwan.

On Thu, Apr 17, 2008 at 11:19 AM, Sanka Samaranayake <ss...@gmail.com>
wrote:

> Hi,
>
> If you want to limit the endpoints (or ports) that are exposed and auto
> generate the endpoint addresses for those endpoints, remove the location
> info from those ports in the WSDL which you use to build the service.
>
> Or you can expose all the endpoints that are available for the services
> irrespective of the endpoints that are specified in the WSDL (from which you
> generated the service) as follows.
>
> axisService.getEndpoints().clear();
>
> HTH,
> --Sanka
>
>
> On Sat, Apr 12, 2008 at 6:25 PM, Ruwan Linton <ru...@apache.org> wrote:
>
> > Hi axis2 folks,
> >
> > We (Synapse) have been using the WSDLToAxisServiceBuilder (to be more
> > specific WSDL11ToAxisServiceBuilder) to generate proxy services inside
> > synapse by using a given WSDL document. This was working fine with the Axis2
> > 1.3 version and now we have migrated to axis2 SNAPSHOT (targeting to use the
> > axis2 1.4 release for our next release).
> >
> > Now, when we generate the services using the above specified class, if
> > we try to print the WSDL of that service, it prints the WSDL with the ports
> > which are originally on the WSDL (the behavior is exactly the same as if we
> > specify the "useOriginalwsdl" to true and "modifyUserWSDLPortAddress" to
> > false). When we were using the axis2 1.3 this was working fine and replaced
> > the bindings and wsdl ports as appropriated. This causes wrong endpoint
> > address to be displayed in the WSDL.
> >
> > Then I even tried to set the AxisEndpoint's endpointURL to null so that
> > allowing the printWSDL to take those values from the transports. When I did
> > this it shows a different URL as follows, which I think is wrong (may be I
> > am wrong here).
> >
> > <wsdl:port name="StockQuoteProxyHttpSoap12Endpoint"
> > binding="axis2:StockQuoteProxySoap12Binding">
> > <soap12:address location="
> > http://ruwan:8080/soap/StockQuoteProxy.StockQuoteProxyHttpSoap12Endpoint
> > "/>
> > </wsdl:port>
> >
> > I was expecting the address location to be something like "
> > http://ruwan:8080/soap/StockQuoteProxy" but there is some suffix to
> > that. Even with this approach the bindings has not been changed (which is OK
> > for the moment). Then I even tried to manually set the AxisEndpoints to the
> > populated service using the Utils.addEndpoints(AxisService,
> > AxisConfiguration) method, which resulted in the same format in the address
> > locations.
> >
> > Could some one please help me on this?
> >
> > Reference :-
> > [1] - https://issues.apache.org/jira/browse/SYNAPSE-267
> > [2] - http://www.nabble.com/WSDL-Generation-to16588436.html
> >
> > Thanks,
> > Ruwan
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
>
>
>
>
> --
> Sanka Samaranayake
> WSO2 Inc.
>
> http://sankas.blogspot.com/
> http://www.wso2.org/




-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: Behavior of WSDLToServiceBuilder

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Sanka,

This is what I was looking for and, I got it resolved.

Thanks,
Ruwan.

On Thu, Apr 17, 2008 at 11:19 AM, Sanka Samaranayake <ss...@gmail.com>
wrote:

> Hi,
>
> If you want to limit the endpoints (or ports) that are exposed and auto
> generate the endpoint addresses for those endpoints, remove the location
> info from those ports in the WSDL which you use to build the service.
>
> Or you can expose all the endpoints that are available for the services
> irrespective of the endpoints that are specified in the WSDL (from which you
> generated the service) as follows.
>
> axisService.getEndpoints().clear();
>
> HTH,
> --Sanka
>
>
> On Sat, Apr 12, 2008 at 6:25 PM, Ruwan Linton <ru...@apache.org> wrote:
>
> > Hi axis2 folks,
> >
> > We (Synapse) have been using the WSDLToAxisServiceBuilder (to be more
> > specific WSDL11ToAxisServiceBuilder) to generate proxy services inside
> > synapse by using a given WSDL document. This was working fine with the Axis2
> > 1.3 version and now we have migrated to axis2 SNAPSHOT (targeting to use the
> > axis2 1.4 release for our next release).
> >
> > Now, when we generate the services using the above specified class, if
> > we try to print the WSDL of that service, it prints the WSDL with the ports
> > which are originally on the WSDL (the behavior is exactly the same as if we
> > specify the "useOriginalwsdl" to true and "modifyUserWSDLPortAddress" to
> > false). When we were using the axis2 1.3 this was working fine and replaced
> > the bindings and wsdl ports as appropriated. This causes wrong endpoint
> > address to be displayed in the WSDL.
> >
> > Then I even tried to set the AxisEndpoint's endpointURL to null so that
> > allowing the printWSDL to take those values from the transports. When I did
> > this it shows a different URL as follows, which I think is wrong (may be I
> > am wrong here).
> >
> > <wsdl:port name="StockQuoteProxyHttpSoap12Endpoint"
> > binding="axis2:StockQuoteProxySoap12Binding">
> > <soap12:address location="
> > http://ruwan:8080/soap/StockQuoteProxy.StockQuoteProxyHttpSoap12Endpoint
> > "/>
> > </wsdl:port>
> >
> > I was expecting the address location to be something like "
> > http://ruwan:8080/soap/StockQuoteProxy" but there is some suffix to
> > that. Even with this approach the bindings has not been changed (which is OK
> > for the moment). Then I even tried to manually set the AxisEndpoints to the
> > populated service using the Utils.addEndpoints(AxisService,
> > AxisConfiguration) method, which resulted in the same format in the address
> > locations.
> >
> > Could some one please help me on this?
> >
> > Reference :-
> > [1] - https://issues.apache.org/jira/browse/SYNAPSE-267
> > [2] - http://www.nabble.com/WSDL-Generation-to16588436.html
> >
> > Thanks,
> > Ruwan
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
>
>
>
>
> --
> Sanka Samaranayake
> WSO2 Inc.
>
> http://sankas.blogspot.com/
> http://www.wso2.org/




-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: Behavior of WSDLToServiceBuilder

Posted by Sanka Samaranayake <ss...@gmail.com>.
Hi,

If you want to limit the endpoints (or ports) that are exposed and auto
generate the endpoint addresses for those endpoints, remove the location
info from those ports in the WSDL which you use to build the service.

Or you can expose all the endpoints that are available for the services
irrespective of the endpoints that are specified in the WSDL (from which you
generated the service) as follows.

axisService.getEndpoints().clear();

HTH,
--Sanka

On Sat, Apr 12, 2008 at 6:25 PM, Ruwan Linton <ru...@apache.org> wrote:

> Hi axis2 folks,
>
> We (Synapse) have been using the WSDLToAxisServiceBuilder (to be more
> specific WSDL11ToAxisServiceBuilder) to generate proxy services inside
> synapse by using a given WSDL document. This was working fine with the Axis2
> 1.3 version and now we have migrated to axis2 SNAPSHOT (targeting to use the
> axis2 1.4 release for our next release).
>
> Now, when we generate the services using the above specified class, if we
> try to print the WSDL of that service, it prints the WSDL with the ports
> which are originally on the WSDL (the behavior is exactly the same as if we
> specify the "useOriginalwsdl" to true and "modifyUserWSDLPortAddress" to
> false). When we were using the axis2 1.3 this was working fine and replaced
> the bindings and wsdl ports as appropriated. This causes wrong endpoint
> address to be displayed in the WSDL.
>
> Then I even tried to set the AxisEndpoint's endpointURL to null so that
> allowing the printWSDL to take those values from the transports. When I did
> this it shows a different URL as follows, which I think is wrong (may be I
> am wrong here).
>
> <wsdl:port name="StockQuoteProxyHttpSoap12Endpoint"
> binding="axis2:StockQuoteProxySoap12Binding">
> <soap12:address location="
> http://ruwan:8080/soap/StockQuoteProxy.StockQuoteProxyHttpSoap12Endpoint
> "/>
> </wsdl:port>
>
> I was expecting the address location to be something like "
> http://ruwan:8080/soap/StockQuoteProxy" but there is some suffix to that.
> Even with this approach the bindings has not been changed (which is OK for
> the moment). Then I even tried to manually set the AxisEndpoints to the
> populated service using the Utils.addEndpoints(AxisService,
> AxisConfiguration) method, which resulted in the same format in the address
> locations.
>
> Could some one please help me on this?
>
> Reference :-
> [1] - https://issues.apache.org/jira/browse/SYNAPSE-267
> [2] - http://www.nabble.com/WSDL-Generation-to16588436.html
>
> Thanks,
> Ruwan
>
> --
> Ruwan Linton
> http://www.wso2.org - "Oxygenating the Web Services Platform"




-- 
Sanka Samaranayake
WSO2 Inc.

http://sankas.blogspot.com/
http://www.wso2.org/