You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Norman Barker <no...@gmail.com> on 2008/03/10 20:26:16 UTC

multiple service endpoints

Hi,

I have used the wsdl2java tool to generate my service endpoints from
an existing wsdl, I noticed that I had to change the port name for one
of the endpoints in the generated java code.
The generated code is great, and the first tool that has successfully
handled complex xs:extensions :-)

I deployed the service to Tomcat, but the problem is with the multiple
endpoints, both of my service endpoints have the same name when I go
to test/services and I am concerned about routing incoming requests.
In addition only the first endpoint has the address changed at runtime
to reflect the deployment.

Is there a way to make CXF handle multiple endpoints, or a way to
override the service provider in the cxf-servlet.xml?  I am looking to
deploy this service as a war archive.

I am using a service declaration similar to

  <service name="MySOAPService">
    <port binding="bindings:Op1SOAPBinding" name="Op1Port">
      <soap:address location="http://localhost:8080/soap"/>
    </port>
    <port binding="bindings:Op2SOAPBinding" name="Op2SOAPBinding">
      <soap:address location="http://localhost:8080/soap"/>
    </port>
  </service>

thanks,

Norman

Re: multiple service endpoints

Posted by Norman Barker <no...@gmail.com>.
I used a nightly build (from SVN), and then I generated the war with
same structure as 'ant war' with the wsdl first sample in the
distribution.  It sounds like you are trying the to run the test
server jetty and tomcat together which won't work.  Copy the generated
war to tomcat\webapps.

I believe my original question is unrelated to your question, so I
will help you, but would like some guidance on how to deploy multiple
operations within one service from a war.

thanks,

Norman

On Tue, Mar 11, 2008 at 11:38 AM, Scott Anderson <sc...@gmail.com> wrote:
> In my application, I was not able to get CXF and Tomcat to share the (TCP)
>  port 8080. Is there some trick I'm missing, or is it actually impossible?
>  Also, how can two distinct services share the same endpoint URL?
>  Regards,
>  Scott
>
>  On Mon, Mar 10, 2008 at 3:26 PM, Norman Barker <no...@gmail.com>
>  wrote:
>
>
>
>  > Hi,
>  >
>  > I have used the wsdl2java tool to generate my service endpoints from
>  > an existing wsdl, I noticed that I had to change the port name for one
>  > of the endpoints in the generated java code.
>  > The generated code is great, and the first tool that has successfully
>  > handled complex xs:extensions :-)
>  >
>  > I deployed the service to Tomcat, but the problem is with the multiple
>  > endpoints, both of my service endpoints have the same name when I go
>  > to test/services and I am concerned about routing incoming requests.
>  > In addition only the first endpoint has the address changed at runtime
>  > to reflect the deployment.
>  >
>  > Is there a way to make CXF handle multiple endpoints, or a way to
>  > override the service provider in the cxf-servlet.xml?  I am looking to
>  > deploy this service as a war archive.
>  >
>  > I am using a service declaration similar to
>  >
>  >  <service name="MySOAPService">
>  >    <port binding="bindings:Op1SOAPBinding" name="Op1Port">
>  >      <soap:address location="http://localhost:8080/soap"/>
>  >    </port>
>  >    <port binding="bindings:Op2SOAPBinding" name="Op2SOAPBinding">
>  >      <soap:address location="http://localhost:8080/soap"/>
>  >    </port>
>  >  </service>
>  >
>  > thanks,
>  >
>  > Norman
>  >
>

Re: multiple service endpoints

Posted by Scott Anderson <sc...@gmail.com>.
In my application, I was not able to get CXF and Tomcat to share the (TCP)
port 8080. Is there some trick I'm missing, or is it actually impossible?
Also, how can two distinct services share the same endpoint URL?
Regards,
Scott

On Mon, Mar 10, 2008 at 3:26 PM, Norman Barker <no...@gmail.com>
wrote:

> Hi,
>
> I have used the wsdl2java tool to generate my service endpoints from
> an existing wsdl, I noticed that I had to change the port name for one
> of the endpoints in the generated java code.
> The generated code is great, and the first tool that has successfully
> handled complex xs:extensions :-)
>
> I deployed the service to Tomcat, but the problem is with the multiple
> endpoints, both of my service endpoints have the same name when I go
> to test/services and I am concerned about routing incoming requests.
> In addition only the first endpoint has the address changed at runtime
> to reflect the deployment.
>
> Is there a way to make CXF handle multiple endpoints, or a way to
> override the service provider in the cxf-servlet.xml?  I am looking to
> deploy this service as a war archive.
>
> I am using a service declaration similar to
>
>  <service name="MySOAPService">
>    <port binding="bindings:Op1SOAPBinding" name="Op1Port">
>      <soap:address location="http://localhost:8080/soap"/>
>    </port>
>    <port binding="bindings:Op2SOAPBinding" name="Op2SOAPBinding">
>      <soap:address location="http://localhost:8080/soap"/>
>    </port>
>  </service>
>
> thanks,
>
> Norman
>