1

I have a service which expects an XML input as one of its parameter for a method. In java I have done with the WSDL2java conversion and method identification.

Code :

Method Name: FindIssues()

FindIssues findIssues=new FindIssues();
findIssues.setUsername("user@example.com");
findIssues.setPassword("password");
findIssues.setSearchCriteria(searchCriteria);

Fine. Now the third parameter is of the type SearchCriteria class which expects OMElement.

So I should form the below XML input with the OMElement.

    **<searchCriteria>**
       <FindIssues>
       <ReturnSchema>N</ReturnSchema>
       <IssueStatus>Open</IssueStatus>
       <IssuesNextActionBy>
       <UsersUserID>user@example.com</UsersUserID>
       </IssuesNextActionBy>
       </FindIssues>
    **</searchCriteria>**

Can someone help me out on forming the XML input with the OMElement?

Nivetha T
  • 481
  • 1
  • 3
  • 17
  • Did you get all the Java classes generated from WSDL? i.e Classes referring your user defined complex type definitions in your schema – Keerthivasan Feb 07 '15 at 09:43
  • Yeah. I got . But I am confused with the XML formation with the Search criteria class format. Please let me know if u want any input. – Nivetha T Feb 07 '15 at 09:53
  • Were you able to construct it? and then set the values in it using the setter methods? – Keerthivasan Feb 07 '15 at 09:57
  • No. First i want to form the xml for the searchcriteria with OMElement. And that is where i am confused with the namespaces. – Nivetha T Feb 07 '15 at 10:00
  • You would have to read and understand this "Creating an object model programmatically" section in Axiom user guide. – Keerthivasan Feb 07 '15 at 10:22

0 Answers0