i have the following issue:
I get a XML-file (let's call it input.xml) from an IBM Rule Execution Server. It looks something like this:
person :
<?xml version="1.0" encoding="UTF-8"?><de.example.demo.Person xmlns:xsi="http://ift.tt/1iVD8i8">
<_age>
<int>20</int>
</_age>
<_job>
<_Jobs xomValue="Consultant"/>
</_job>
<job>
<string>Consultant</string>
</job>
<birthDate>
<ilog.rules.xml.types.IlrDate>1999-01-01</ilog.rules.xml.types.IlrDate>
</birthDate>
<surname>
<string>Doe</string>
</surname>
<schufaTokenList>
<vector/>
</schufaTokenList>
<prename>
<string>John</string>
</prename>
</de.example.demo.Person>
blacklist :
<?xml version="1.0" encoding="UTF-8"?><null xmlns:xsi="http://ift.tt/1iVD8i8"/>
And i have to put these values, in a SOAP-Request. I have already archieved to generated a XML-file by the reference of the WSDL-file (i have access to it) and using soapUI in java (requestTemplate.xml). It looks like this:
<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:scor="http://ift.tt/1lXttcb" xmlns:par="http://ift.tt/WMDMDV" xmlns:demo="http://ift.tt/WMDMUh">
<soapenv:Header/>
<soapenv:Body>
<scor:ScoringDemoRequest>
<!--Optional:-->
<scor:DecisionID>?</scor:DecisionID>
<!--Zero or more repetitions:-->
<scor:blacklist>?</scor:blacklist>
<par:person>
<person>
<demo:prename>?</demo:prename>
<demo:surname>?</demo:surname>
<demo:birthDate>?</demo:birthDate>
<demo:job>?</demo:job>
<!--Zero or more repetitions:-->
<demo:schufaToken>
<demo:code>?</demo:code>
<demo:status>?</demo:status>
<demo:score>?</demo:score>
</demo:schufaToken>
</person>
</par:person>
</scor:ScoringDemoRequest>
</soapenv:Body>
</soapenv:Envelope>
The problem i have with this, is the following: The input.xml is not the same. It can look totally different from this one. How do i archieve that, that i fill the data from input.xml to requestTemplate.xml?
Since i'm pretty new to SOAP and XML, i don't know how to access the nodes without knowing their name.
The output XML-file should look like this:
<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:scor="http://ift.tt/1lXttcb" xmlns:par="http://ift.tt/WMDMDV" xmlns:demo="http://ift.tt/WMDMUh">
<soapenv:Header/>
<soapenv:Body>
<scor:ScoringDemoRequest>
<!--Optional:-->
<scor:DecisionID>?</scor:DecisionID>
<!--Zero or more repetitions:-->
<scor:blacklist>?</scor:blacklist>
<par:person>
<person>
<demo:prename>John</demo:prename>
<demo:surname>Doe</demo:surname>
<demo:birthDate>1999-01-01</demo:birthDate>
<demo:job>Consultant</demo:job>
</person>
</par:person>
</scor:ScoringDemoRequest>
</soapenv:Body>
</soapenv:Envelope>
Thanks for your help! :-)
No comments:
Post a Comment