Hi,
A couple of issues in your wsdl
1. The jms namespace in your wsdl isn't valid for cxf, it should be http://cxf.apache.org/transports/jms
instead,
2. Also, the binding part in your wsdl is incorrect, it should use
soap binding, but not jms binding, jms is transport, not binding.
3. To use mtom, your wsdl should define element with something like
xmime:expectedContentTypes="application/octet-stream"
4. And the jms:address in your port part is incorrect.
We have an wsdl example[1] how the wsdl should look like when use soap
binding over jms transport with mtom enabled, and a testcase[2]
which use this wsdl and in this testcase there's a cxf bc consumer
using mtom/soap/jms, I guess you may need take a look at those example.
[1]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/mtom_xop.wsdl
[2]https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/java/org/apache/servicemix/cxfbc/CxfBcHttpJmsBridgeMtomTest.java
Freeman
On 2009-8-4, at 下午8:17, lekkie wrote:
Hi Freeman,
After following your advice, I got this far.
Here is the exception thrown during deployment of my sa:
Caused by: org.apache.cxf.endpoint.EndpointException
at
org.apache.cxf.endpoint.EndpointImpl.createBinding(EndpointImpl.java:
132)
at org.apache.cxf.endpoint.EndpointImpl.<init>(EndpointImpl.java:81)
at
org
.apache.servicemix.cxfbc.CxfBcConsumer.validate(CxfBcConsumer.java:
402)
... 13 more
Caused by: org.apache.cxf.BusException: No binding factory for
namespace
http://schemas.sun.com/jbi/wsdl-extensions/jms/ registered.
at
org
.apache
.cxf
.binding
.BindingFactoryManagerImpl
.getBindingFactory(BindingFactoryManagerImpl.java:91)
at
org.apache.cxf.endpoint.EndpointImpl.createBinding(EndpointImpl.java:
129)
... 15 more
Here is the content of my wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="isJMSConsumer" targetNamespace="http://services.is"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://services.is"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:jms="http://schemas.sun.com/jbi/wsdl-extensions/jms/">
<types/>
<message name="isJMSConsumerOperationRequest">
<part name="part1" type="xsd:base64Binary"/>
</message>
<portType name="isJMSConsumerPortType">
<operation name="isJMSConsumerOperation">
<input name="input1"
message="tns:isJMSConsumerOperationRequest"/>
</operation>
</portType>
<binding name="isJMSConsumerBinding"
type="tns:isJMSConsumerPortType">
<jms:binding/>
<operation name="isJMSConsumerOperation">
<jms:operation destination="Queue/A"
destinationType="Queue"/>
<input name="input1">
<jms:message messageType="BytesMessage"
bytesPart="part1"
forwardAsAttachment="true"/>
</input>
</operation>
</binding>
<service name="isJMSConsumerService">
<port name="isJMSConsumerPort"
binding="tns:isJMSConsumerBinding">
<jms:address connectionURL="mq://localhost:7676"/>
</port>
</service>
<plnk:partnerLinkType name="isJMSConsumer">
<plnk:role name="isJMSConsumerPortTypeRole"
portType="tns:isJMSConsumerPortType"/>
</plnk:partnerLinkType>
</definitions>
and here is my xbean.xml
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:is="http://services.is">
<!-- wsdlResource="classpath:isFileConsumer.wsdl" -->
<cxfbc:consumer wsdl="classpath:isJMSConsumer.wsdl"
service="is:isJMSConsumerService"
targetService="is:isFTPWriter"
mtomEnabled="true"/>
</beans>
thanks.
Freeman Fang wrote:
Hi,
If you want to send attachment over soap with jms transport, could
you
consider to use the cxf bc component with mtom over jms transport?
Freeman
On 2009-8-3, at 下午8:02, lekkie wrote:
Hi Guys,
While trying to create a WSDL for my consumer JMS BC on servicemix I
got the
following error
<loc-message>WSDL is not WS-I BP compliant: [binding
"{http://services.is}isJMSFileConsumerInBinding" : Basic Profile
Violation
#R2401: A wsdl:binding element in a DESCRIPTION MUST use WSDL SOAP
Binding
as defined in WSDL 1.1 Section 3.]</loc-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException: WSDL
is not
WS-I BP compliant: [binding "{http://
services.is}isJMSFileConsumerInBinding"
: Basic Profile Violation #R2401: A wsdl:binding element in a
DESCRIPTION
MUST use WSDL SOAP Binding as defined in WSDL 1.1 Section 3.]
at
org
.apache
.servicemix
.jms
.endpoints
.JmsSoapConsumerEndpoint.validateWsdl1(JmsSoapConsumerEndpoint.java:
198)
at
org
.apache
.servicemix
.jms
.endpoints
.JmsSoapConsumerEndpoint.validate(JmsSoapConsumerEndpoint.java:138)
While the exception is in itself self explanatory, I ws wondering
what the
best way it is to generate a WSDL.
Here is the WSDL I generated from Netbeans wizard:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="isJMSFileConsumer" targetNamespace="http://services.is
"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://services.is"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:jms="http://schemas.sun.com/jbi/wsdl-extensions/jms/">
<types/>
<message name="isJMSFileConsumerInOperationRequest">
<part name="part1" type="xsd:base64Binary"/>
</message>
<portType name="isJMSFileConsumerInPortType">
<operation name="isJMSFileConsumerInOperation">
<input name="input1"
message="tns:isJMSFileConsumerInOperationRequest"/>
</operation>
</portType>
<binding name="isJMSFileConsumerInBinding"
type="tns:isJMSFileConsumerInPortType">
<jms:binding/>
<operation name="isJMSFileConsumerInOperation">
<jms:operation destination="DefaultQueue"
destinationType="Queue"/>
<input name="input1">
<jms:message messageType="BytesMessage"
bytesPart="part1"/>
</input>
</operation>
</binding>
<service name="isJMSFileConsumerIn">
<port name="isJMSFileConsumerInPortType"
binding="tns:isJMSFileConsumerInBinding">
<jms:address connectionURL="mq://localhost:61616"/>
</port>
</service>
<plnk:partnerLinkType name="isJMSFileConsumer">
<!-- A partner link type is automatically generated when a
new port
type is added. Partner link types are used by BPEL processes.
In a BPEL process, a partner link represents the interaction between
the
BPEL process and a partner service. Each partner link is associated
with a
partner link type.
A partner link type characterizes the conversational relationship
between
two services. The partner link type can have one or two roles.-->
<plnk:role name="isJMSFileConsumerInPortTypeRole"
portType="tns:isJMSFileConsumerInPortType"/>
</plnk:partnerLinkType>
</definitions>
And here is the xbean.xml for this service unit
<beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:is="http://services.is"
xmlns:amqpool="http://jencks.org/amqpool/2.0">
<classpath>
<location>.</location>
</classpath>
<bean id="connectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="connectionFactory">
<bean
class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:
61616" />
</bean>
</property>
<!--Configure maximum connections used by the pool -->
<property name="maxConnections" value="10" />
<!--Configure maximum sessions per connection -->
<property name="maximumActive" value="10" />
</bean>
<!-- add the sender endpoint here -->
<bean id="myMarshaler"
class="org.apache.servicemix.components.util.BinaryFileMarshaler"/>
<jms:soap-consumer service="is:isJMSFileConsumer"
endpoint="isJMSFileConsumer"
wsdl="classpath:isJMSFileConsumer.wsdl"
validateWsdl="true"
targetService="is:isFTPWriter"
destinationName="queue/A/Soap"
connectionFactory="#connectionFactory"/>
</beans>
What is the best way to generate a WSDL for a binary message
(attachment)
through JMS BC over SOAP?
kr.
--
View this message in context:
http://www.nabble.com/Binary-Message-WSDL-for-JMS-BC-%28Consumer%29-tp24789561p24789561.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
--
View this message in context:
http://www.nabble.com/Binary-Message-WSDL-for-JMS-BC-%28Consumer%29-tp24789561p24807302.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com