You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Billy Bain <bi...@gmail.com> on 2014/12/12 21:16:15 UTC

Can't find the BindingOperationInfo with operation name {urn:...}login.

I get the following exception when trying to invoke the login() method
defined in this wsdl.

https://webservices.sandbox.netsuite.com/wsdl/v2014_2_0/netsuite.wsdl

java.lang.IllegalArgumentException: Can't find the BindingOperationInfo
with operation name {urn:platform_2014_2.webservices.netsuite.com}login.
Please check the message headers of operationName and operationNamespace.
at
org.apache.camel.component.cxf.CxfProducer.getBindingOperationInfo(CxfProducer.java:363)[161:org.apache.camel.camel-cxf:2.13.2]

This is the section from my blueprint.xml and the operationName &
operationNamespace are set correctly. I was successful invoking this
webservice directly from Java, but can't figure it out through Camel.

<cxf:cxfEndpoint id="nsEndpoint" address="
https://webservices.sandbox.netsuite.com/services/NetSuitePort_2014_2"
   wsdlURL="
https://webservices.sandbox.netsuite.com/wsdl/v2014_2_0/netsuite.wsdl"
   serviceName="c:NetSuiteService"
   endpointName="c:NetSuitePort"
   serviceClass="com.netsuite.webservices.platform_2014_2.NetSuiteService"
xmlns:c="urn:platform_2014_2.webservices.netsuite.com"
   >
</cxf:cxfEndpoint>

<camelContext xmlns="http://camel.apache.org/schema/blueprint">
  <route>
    <from uri="jetty:http://0.0.0.0:8080/api/v1/netsuite"/>
    <setHeader headerName="operationName">
        <constant>login</constant>
    </setHeader>
    <setHeader headerName="operationNamespace">
        <constant>urn:platform_2014_2.webservices.netsuite.com</constant>
    </setHeader>
    <setBody><simple>${ref:loginRequest}</simple></setBody>
    <log message="${body}"/>
    <to uri="cxf:bean:nsEndpoint"/>
    <log message="${body}"/>
  </route>

Any idea as to what I'm doing wrong?

Re: Can't find the BindingOperationInfo with operation name {urn:...}login.

Posted by billybobbain <bi...@gmail.com>.
That was it. Thanks for your help. 



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-find-the-BindingOperationInfo-with-operation-name-urn-login-tp5760654p5760783.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't find the BindingOperationInfo with operation name {urn:...}login.

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

It looks like you setup a wrong service class attribute, it should be “com.netsuite.webservices.platform_2014_2.NetSuitePortType” instead of “com.netsuite.webservices.platform_2014_2.NetSuiteService”

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 13, 2014 at 4:18:59 AM, Billy Bain (billybobbain@gmail.com) wrote:
> I get the following exception when trying to invoke the login() method
> defined in this wsdl.
>  
> https://webservices.sandbox.netsuite.com/wsdl/v2014_2_0/netsuite.wsdl
>  
> java.lang.IllegalArgumentException: Can't find the BindingOperationInfo
> with operation name {urn:platform_2014_2.webservices.netsuite.com}login.
> Please check the message headers of operationName and operationNamespace.
> at
> org.apache.camel.component.cxf.CxfProducer.getBindingOperationInfo(CxfProducer.java:363)[161:org.apache.camel.camel-cxf:2.13.2]  
>  
> This is the section from my blueprint.xml and the operationName &
> operationNamespace are set correctly. I was successful invoking this
> webservice directly from Java, but can't figure it out through Camel.
>  
> > wsdlURL="
> https://webservices.sandbox.netsuite.com/wsdl/v2014_2_0/netsuite.wsdl"
> serviceName="c:NetSuiteService"
> endpointName="c:NetSuitePort"
> serviceClass="com.netsuite.webservices.platform_2014_2.NetSuiteService"  
> xmlns:c="urn:platform_2014_2.webservices.netsuite.com"
> >
>  
>  
>  
>  
>  
>  
> login
>  
>  
> urn:platform_2014_2.webservices.netsuite.com
>  
> ${ref:loginRequest}
>  
>  
>  
>  
>  
> Any idea as to what I'm doing wrong?
>