Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Input as text and output as xml

 
Karthik Krishnamurthy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I dont know if this is the right place to post but I am at my wits' end.
I am developing an application using Open ESB.
The requirement is that a text file will be submitted and the data needs to be converted to XML.

when I try this as a text to text conversion it is working fine. But when I write the WSDL for text to XML, it is unable to read the source file data and says no data available. Is there any work around? I am attaching the 2 WSDLs.

Thanks
Karthik

WSDL 1 - Text to Text:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="newWSDL" targetNamespace="http://j2ee.netbeans.org/wsdl/newWSDL"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://j2ee.netbeans.org/wsdl/newWSDL" xmlns lnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:file="http://schemas.sun.com/jbi/wsdl-extensions/file/">
<types/>
<message name="newWSDLOperationRequest">
<part name="part1" type="xsd:string"/>
</message>
<message name="newWSDLOperationReply">
<part name="part1" type="xsd:string"/>
</message>
<portType name="newWSDLPortType">
<operation name="newWSDLOperation">
<input name="input1" message="tns:newWSDLOperationRequest"/>
<output name="output1" message="tns:newWSDLOperationReply"/>
</operation>
</portType>
<binding name="newWSDLBinding" type="tns:newWSDLPortType">
<file:binding/>
<operation name="newWSDLOperation">
<file peration/>
<input name="input1">
<file:message use="literal" fileName="testdata_%d.txt" pollingInterval="1000" fileNameIsPattern="true"/>
</input>
<output name="output1">
<file:message use="literal" fileName="output.txt"/>
</output>
</operation>
</binding>
<service name="newWSDLService">
<port name="newWSDLPort" binding="tns:newWSDLBinding">
<file:address fileDirectory="D:\kk:\Temp" lockName="filebc.lck" workArea="filebc_tmp" seqName="filebc.seq"/>
</port>
</service>
<plnk artnerLinkType name="newWSDL1">
<!-- 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="newWSDLPortTypeRole" portType="tns:newWSDLPortType"/>
</plnk artnerLinkType>
</definitions>


WSDL 2: Text to XML

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="TestFileWSDL" targetNamespace="http://j2ee.netbeans.org/wsdl/TestFileWSDL"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://j2ee.netbeans.org/wsdl/TestFileWSDL" xmlns:ns="http://xml.netbeans.org/schema/TestFileSchema" xmlns lnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" xmlns:file="http://schemas.sun.com/jbi/wsdl-extensions/file/">
<types>
<xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/TestFileWSDL">
<xsd:import namespace="http://xml.netbeans.org/schema/TestFileSchema" schemaLocation="TestFileSchema.xsd"/>
</xsd:schema>
</types>
<message name="TestFileWSDLOperationRequest">
<part name="source" type="xsd:normalizedString"/>
</message>
<message name="TestFileWSDLOperationReply">
<part name="destination" element="ns:EmployeeElement"/>
</message>
<portType name="TestFileWSDLPortType">
<operation name="TestFileWSDLOperation">
<input name="input1" message="tns:TestFileWSDLOperationRequest"/>
<output name="output1" message="tns:TestFileWSDLOperationReply"/>
</operation>
</portType>
<binding name="TestFileWSDLBinding" type="tns:TestFileWSDLPortType">
<file:binding/>
<operation name="TestFileWSDLOperation">
<file peration/>
<input name="input1">
<file:message use="literal" fileName="testdata_%d.txt" pollingInterval="1000" fileNameIsPattern="true"/>
</input>
<output name="output1">
<file:message use="literal" fileName="testoutput.xml" multipleRecordsPerFile="true" fileNameIsPattern="false"/>
</output>
</operation>
</binding>
<service name="TestFileWSDLService">
<port name="TestFileWSDLPort" binding="tns:TestFileWSDLBinding">
<file:address fileDirectory="D:\kk\temp" lockName="filebc.lck" workArea="filebc_tmp" seqName="filebc.seq"/>
</port>
</service>
<plnk artnerLinkType name="TestFileWSDL1">
<!-- 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="TestFileWSDLPortTypeRole" portType="tns:TestFileWSDLPortType"/>
</plnk artnerLinkType>
</definitions>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!