views:

502

answers:

1

Hi,

I'm not sure if there many Mule users on here but I'm hoping someone might be able to help me!

I'm having a problem calling a webservice from Mule using Axis. I've created a fairly simple example where I have xml in a file being read by Mule, it's then transformed into a Document and sent to the webservice. The relevant code in the mule config looks like this:

<inbound>
 <file:inbound-endpoint path="./files/initial" transformer-refs="FileToString xmlToDom" connector-ref="fileConnector" /> 
</inbound>
<outbound>
 <pass-through-router>
  <axis:outbound-endpoint address="http://localhost:8081/holidayService?method=echoXXXX" synchronous="true" style="DOCUMENT" use="LITERAL" /> 
 </pass-through-router>
</outbound>

However the call for the webservice fails as the above config is generating a SOAP message with an tag just after the tag and closes it just before the tag. The generated SOAP message looks like this:

POST /holidayService?method=echoXXXX HTTP/1.1
Content-Type: text/xml
X-MULE_ENDPOINT: http://localhost:8081/holidayService?method=echoXXXX
SOAPAction: http://localhost:8081/holidayService?method=echoXXXX
directory: D:\bea\weblogic92\samples\domains\wl_server\files\processed
filename: HolidayRequest.xml
method: echoXXXX
originalFilename: HolidayRequest.xml
style: document
use: literal
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 127.0.0.1:8081
Content-Length: 1183

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<soapenv:Header>
<mule:header soapenv:actor="http://www.muleumo.org/providers/soap/1.0" soapenv:mustUnderstand="0" xmlns:mule="http://www.muleumo.org/providers/soap/1.0"&gt;
<mule:MULE_CORRELATION_ID>D:\bea\weblogic92\samples\domains\wl_server\files\processed\HolidayRequest.xml</mule:MULE_CORRELATION_ID>
<mule:MULE_CORRELATION_GROUP_SIZE>-1</mule:MULE_CORRELATION_GROUP_SIZE>
<mule:MULE_CORRELATION_SEQUENCE>-1</mule:MULE_CORRELATION_SEQUENCE>
</mule:header>

</soapenv:Header>
<soapenv:Body>
<value0 xsi:type="ns1:DocumentImpl" xmlns="" xmlns:ns1="http://dom.internal.xerces.apache.org.sun.com"&gt;
<sch:HolidayRequest xmlns:sch="http://mycompany.com/hr/schemas"&gt;
<sch:Holiday>
 <sch:StartDate>2009-08-13</sch:StartDate>
 <sch:EndDate>1988-12-12</sch:EndDate>
</sch:Holiday>
<sch:Employee>
 <sch:Number>3434</sch:Number>
 <sch:FirstName>John</sch:FirstName>
 <sch:LastName>Smith</sch:LastName>
</sch:Employee>
</sch:HolidayRequest>
</value0>
</soapenv:Body>
</soapenv:Envelope>

The webservice works fine in SOAPUI without the tag and from what I've read on the Mule website I don't know why it's being inserted.

Any help would be much appreciated, Kevin.

A: 

What is the issue with this soap message, looks okay to me. Also if you are trying out mule with webservices, I would suggest using cxf. They play really well together and cxf in my opinion is well designed for extensibility in mind , especially in a spring environment. Both mule and cxf have spring built into the core.

Aswin