I am using the CXF-BC component in Servicemix 3.3 to connect to an
external web service for sending SMS messages. The configuration of my
xbean.xml is shown below:
<cxfbc:provider
wsdl="http://ws.textanywhere.net/TA_SMS.asmx?wsdl"
service="text:TextAnywhere_SMS"
endpoint="TextAnywhere_SMSSoap"
useJBIWrapper="false"
useSOAPEnvelope="false"/>
I am using SoapUI to generate a sample request message for testing.
This sample request is placed onto a JMS queue in JConsole with a Camel
route using the JBI component sending the message to the CXF endpoint
above. Route shown below:
from("activemq:queue.sms.request")
// Send to TextAnywhere Web Service
.to("jbi:service:http://ws.textanywhere.net/TA_WS/TextAnywhere_SMS?opera
tion={http://ws.textanywhere.net/TA_WS}SendSMSEx&mep=in-out").convertBod
yTo(String.class)
The sample request (shown below) contains a parameter called "Body",
however this seems to break the parser and prevents the webservice from
being called with the following error: fault: <?xml version="1.0"
encoding="UTF-8"?><JBIFault
xmlns="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><detail
xmlns="">org.apache.xerces.dom.DeferredTextImpl cannot be cast to
org.w3c.dom.Element</detail></JBIFault>
Sample Message (client_id and client_pass values removed):
<ta:SendSMSEx xmlns:ta="http://ws.textanywhere.net/TA_WS">
<!--Optional:-->
<ta:Client_ID>xxxxxx</ta:Client_ID>
<!--Optional:-->
<ta:Client_Pass>xxxxxx</ta:Client_Pass>
<!--Optional:-->
<ta:Client_Ref>TEST</ta:Client_Ref>
<!--Optional:-->
<ta:Billing_Ref>TEST</ta:Billing_Ref>
<ta:Connection>1</ta:Connection>
<!--Optional:-->
<ta:Originator>Bluefin</ta:Originator>
<ta:OType>1</ta:OType>
<!--Optional:-->
<ta:DestinationEx>+4470000000</ta:DestinationEx>
<!--Optional:-->
<ta:Body>Test</ta:Body>
<ta:SMS_Type>0</ta:SMS_Type>
<ta:Reply_Type>0</ta:Reply_Type>
<!--Optional:-->
<ta:Reply_Data></ta:Reply_Data>
</ta:SendSMSEx>
This error only occurs when the Body element is present in the message.
If I remove this then I get the error "Server was unable to process
request. --> Object reference not set to an instance of an object" in
the fault response message - which is normally seen when the message is
malformed (as it's missing the body element).
I'm not sure which classes are actually throwing this JBI error above
and so I am unable to provide further debugging information, however I
am certain that no message is sent to the web service (none appears in
Wireshark).
Thanks in advance for your time and help.
Ben Brown
This email and any files or information it contains are confidential and may be
privileged. It is for the intended addressee(s) only. The unauthorised use,
disclosure or copying of this email or any information it contains, is
prohibited and could, in certain circumstances be a criminal offence. If you
are not the intended recipient you should not disseminate or copy this email.
Please notify the sender immediately and delete this message from your system.
Please note that any opinions presented in this email are solely those of the
author (or those of a third party whose statement is forwarded) and do not
necessarily represent those of any company within the Bluefin Group Limited
group of companies.
Email transmission cannot be guaranteed to be secure or error free as
information could be intercepted, corrupted, lost, destroyed, late in arriving
or incomplete as a result of the transmission process. The sender therefore
does not accept liability for any errors or omissions in the contents of this
message which arise as a result of email transmission.
WARNING: Computer viruses can be transmitted by email. The recipient should
check this email and any attachments for the presence of viruses. The Bluefin
Group Limited group of companies accepts no liability for any damage caused by
any virus transmitted by this email.