You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by java kurious <ja...@gmail.com> on 2012/06/22 21:33:58 UTC
Wrong binding ID: http://cxf.apache.org/bindings/xformat error
Hi
I am trying to follow "CXF sample using WRAPPED Style in XML Binding(pure
XML)" to create a Web Service for Stock Quote. The WSDL is attached. The
difference is that I am using a web application structure and trying to
deploy it in Glassfish 3.1.
I created a Service Implementation class, and specified the binding
annotation. See below:
@javax.jws.WebService
@javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat")
public class PureXMLBindingImpl implements DelayedStockQuoteSoap{
@Override
public QuoteData getQuote(String stockSymbol, String licenseKey) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public BigDecimal getQuickQuote(String stockSymbol, String licenseKey) {
return new BigDecimal(2.0);
}
When I deploy it to Glassfish, I get following exception:
javax.xml.ws.WebServiceException: Wrong binding ID:
http://cxf.apache.org/bindings/xformat
at com.sun.xml.ws.api.BindingID.parse(BindingID.java:278)
at
org.glassfish.webservices.WSServletContextListener.registerEndpoint(WSServletContextListener.java:265)
at
org.glassfish.webservices.WSServletContextListener.contextInitialized(WSServletContextListener.java:102)
Any ideas ?
Thanks
Vineet
Re: Wrong binding ID: http://cxf.apache.org/bindings/xformat error
Posted by java kurious <ja...@gmail.com>.
I think I should clarify what I am trying to achieve.
I am trying to implement a webService that would be accessible through
SOAP1.1, SOAP1.2, HTTP GET and HTTP POST. Similar to following
asp.netwebservice.
http://www.visualwebservice.com/wsdl/ws.cdyne.com/delayedstockquote.asmx%3Fwsdl
I am trying to achieve it using Camel + CXF.
Though, I can create the SOAP 1.1 and SOAP 1.2, I am not familiar with HTTP
binding with SOAP as shown in the WSDL.
I am hoping to expose the same endpoint through multiple protocol.
I will give jax-rs/rest a try as well. Any other ideas are most welcome.
Thanks
Vineet
On Fri, Jun 22, 2012 at 4:45 PM, java kurious <ja...@gmail.com> wrote:
> Thanks for the response ! I will try out both suggestions, and respond
> back with what I find.
>
> Thanks all !
>
> Vineet
>
>
> On Fri, Jun 22, 2012 at 4:20 PM, Mark Streit <mc...@gmail.com> wrote:
>
>> Doesn't Glassfish come with the Metro stack in place as part of the
>> distribution.
>>
>> You MAY be running into a classloader issue where you have stuff from 2
>> JAX-WS stacks running in the same space. I haven't done this myself with
>> Glassfish but you may have to disable Metro
>>
>> (I know with Websphere you have to disable its JAX-WS provider (Axis2) in
>> order to use CXF).
>>
>> Just a thought.
>>
>> On Fri, Jun 22, 2012 at 3:33 PM, java kurious <ja...@gmail.com>
>> wrote:
>>
>> > Hi
>> >
>> > I am trying to follow "CXF sample using WRAPPED Style in XML
>> Binding(pure
>> > XML)" to create a Web Service for Stock Quote. The WSDL is attached. The
>> > difference is that I am using a web application structure and trying to
>> > deploy it in Glassfish 3.1.
>> >
>> > I created a Service Implementation class, and specified the binding
>> > annotation. See below:
>> >
>> > @javax.jws.WebService
>> > @javax.xml.ws.BindingType(value = "
>> http://cxf.apache.org/bindings/xformat
>> > ")
>> > public class PureXMLBindingImpl implements DelayedStockQuoteSoap{
>> >
>> > @Override
>> > public QuoteData getQuote(String stockSymbol, String licenseKey) {
>> > throw new UnsupportedOperationException("Not supported yet.");
>> > }
>> >
>> > @Override
>> > public BigDecimal getQuickQuote(String stockSymbol, String
>> licenseKey)
>> > {
>> > return new BigDecimal(2.0);
>> > }
>> >
>> > When I deploy it to Glassfish, I get following exception:
>> >
>> > javax.xml.ws.WebServiceException: Wrong binding ID:
>> > http://cxf.apache.org/bindings/xformat
>> > at com.sun.xml.ws.api.BindingID.parse(BindingID.java:278)
>> > at
>> >
>> org.glassfish.webservices.WSServletContextListener.registerEndpoint(WSServletContextListener.java:265)
>> > at
>> >
>> org.glassfish.webservices.WSServletContextListener.contextInitialized(WSServletContextListener.java:102)
>> >
>> >
>> > Any ideas ?
>> >
>> > Thanks
>> > Vineet
>> >
>>
>>
>>
>> *
>> *
>>
>
>
Re: Wrong binding ID: http://cxf.apache.org/bindings/xformat error
Posted by java kurious <ja...@gmail.com>.
Thanks for the response ! I will try out both suggestions, and respond back
with what I find.
Thanks all !
Vineet
On Fri, Jun 22, 2012 at 4:20 PM, Mark Streit <mc...@gmail.com> wrote:
> Doesn't Glassfish come with the Metro stack in place as part of the
> distribution.
>
> You MAY be running into a classloader issue where you have stuff from 2
> JAX-WS stacks running in the same space. I haven't done this myself with
> Glassfish but you may have to disable Metro
>
> (I know with Websphere you have to disable its JAX-WS provider (Axis2) in
> order to use CXF).
>
> Just a thought.
>
> On Fri, Jun 22, 2012 at 3:33 PM, java kurious <ja...@gmail.com>
> wrote:
>
> > Hi
> >
> > I am trying to follow "CXF sample using WRAPPED Style in XML Binding(pure
> > XML)" to create a Web Service for Stock Quote. The WSDL is attached. The
> > difference is that I am using a web application structure and trying to
> > deploy it in Glassfish 3.1.
> >
> > I created a Service Implementation class, and specified the binding
> > annotation. See below:
> >
> > @javax.jws.WebService
> > @javax.xml.ws.BindingType(value = "
> http://cxf.apache.org/bindings/xformat
> > ")
> > public class PureXMLBindingImpl implements DelayedStockQuoteSoap{
> >
> > @Override
> > public QuoteData getQuote(String stockSymbol, String licenseKey) {
> > throw new UnsupportedOperationException("Not supported yet.");
> > }
> >
> > @Override
> > public BigDecimal getQuickQuote(String stockSymbol, String
> licenseKey)
> > {
> > return new BigDecimal(2.0);
> > }
> >
> > When I deploy it to Glassfish, I get following exception:
> >
> > javax.xml.ws.WebServiceException: Wrong binding ID:
> > http://cxf.apache.org/bindings/xformat
> > at com.sun.xml.ws.api.BindingID.parse(BindingID.java:278)
> > at
> >
> org.glassfish.webservices.WSServletContextListener.registerEndpoint(WSServletContextListener.java:265)
> > at
> >
> org.glassfish.webservices.WSServletContextListener.contextInitialized(WSServletContextListener.java:102)
> >
> >
> > Any ideas ?
> >
> > Thanks
> > Vineet
> >
>
>
>
> *
> *
>
Re: Wrong binding ID: http://cxf.apache.org/bindings/xformat error
Posted by Mark Streit <mc...@gmail.com>.
Doesn't Glassfish come with the Metro stack in place as part of the
distribution.
You MAY be running into a classloader issue where you have stuff from 2
JAX-WS stacks running in the same space. I haven't done this myself with
Glassfish but you may have to disable Metro
(I know with Websphere you have to disable its JAX-WS provider (Axis2) in
order to use CXF).
Just a thought.
On Fri, Jun 22, 2012 at 3:33 PM, java kurious <ja...@gmail.com> wrote:
> Hi
>
> I am trying to follow "CXF sample using WRAPPED Style in XML Binding(pure
> XML)" to create a Web Service for Stock Quote. The WSDL is attached. The
> difference is that I am using a web application structure and trying to
> deploy it in Glassfish 3.1.
>
> I created a Service Implementation class, and specified the binding
> annotation. See below:
>
> @javax.jws.WebService
> @javax.xml.ws.BindingType(value = "http://cxf.apache.org/bindings/xformat
> ")
> public class PureXMLBindingImpl implements DelayedStockQuoteSoap{
>
> @Override
> public QuoteData getQuote(String stockSymbol, String licenseKey) {
> throw new UnsupportedOperationException("Not supported yet.");
> }
>
> @Override
> public BigDecimal getQuickQuote(String stockSymbol, String licenseKey)
> {
> return new BigDecimal(2.0);
> }
>
> When I deploy it to Glassfish, I get following exception:
>
> javax.xml.ws.WebServiceException: Wrong binding ID:
> http://cxf.apache.org/bindings/xformat
> at com.sun.xml.ws.api.BindingID.parse(BindingID.java:278)
> at
> org.glassfish.webservices.WSServletContextListener.registerEndpoint(WSServletContextListener.java:265)
> at
> org.glassfish.webservices.WSServletContextListener.contextInitialized(WSServletContextListener.java:102)
>
>
> Any ideas ?
>
> Thanks
> Vineet
>
*
*
Re: Wrong binding ID: http://cxf.apache.org/bindings/xformat error
Posted by Glen Mazza <gm...@talend.com>.
It looks like the Metro installed by default with GlassFish is getting
activated, not CXF. I suspect you're trying to do too much at once,
making it hard to troubleshoot. I would make it a two-step process:
1.) Get your sample below working on simple Tomcat where there's no
Metro conflicts
(http://www.jroller.com/gmazza/entry/web_service_tutorial can help even
though it's a different sample)
2.) Then try to figure out the portion of getting the same WAR to work
on GlassFish (where you'll need to suppress the Metro libraries)
*Or*
1.) Get the simplest possible web service working on GlassFish
(http://www.jroller.com/gmazza/entry/web_service_tutorial is a good
candidate, although I've never tried to get it to work on GlassFish)
2.) Then try to get things working with the
"http://cxf.apache.org/bindings/xformat" BindingType.
Incidentally, I'm not sure but there's a very good chance our XML over
HTTP binding (which I very rarely hear about nowadays) is obsolete with
JAX-RS / REST. I would first rule out CXF's JAX-RS implementation, as
well as the standard SOAP over HTTP binding, as useful options for you
before considering XML over HTTP.
Glen
On 06/22/2012 03:33 PM, java kurious wrote:
> Hi
>
> I am trying to follow "CXF sample using WRAPPED Style in XML
> Binding(pure XML)" to create a Web Service for Stock Quote. The WSDL
> is attached. The difference is that I am using a web application
> structure and trying to deploy it in Glassfish 3.1.
>
> I created a Service Implementation class, and specified the binding
> annotation. See below:
>
> @javax.jws.WebService
> @javax.xml.ws.BindingType(value =
> "http://cxf.apache.org/bindings/xformat")
> public class PureXMLBindingImpl implements DelayedStockQuoteSoap{
>
> @Override
> public QuoteData getQuote(String stockSymbol, String licenseKey) {
> throw new UnsupportedOperationException("Not supported yet.");
> }
>
> @Override
> public BigDecimal getQuickQuote(String stockSymbol, String
> licenseKey) {
> return new BigDecimal(2.0);
> }
>
> When I deploy it to Glassfish, I get following exception:
>
> javax.xml.ws.WebServiceException: Wrong binding ID:
> http://cxf.apache.org/bindings/xformat
> at com.sun.xml.ws.api.BindingID.parse(BindingID.java:278)
> at
> org.glassfish.webservices.WSServletContextListener.registerEndpoint(WSServletContextListener.java:265)
> at
> org.glassfish.webservices.WSServletContextListener.contextInitialized(WSServletContextListener.java:102)
>
>
> Any ideas ?
>
> Thanks
> Vineet
--
Glen Mazza
Talend Community Coders
coders.talend.com
blog:www.jroller.com/gmazza