<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How can I make a parameter of a webservice process required?</title><link>https://answers.axonivy.com/questions/925/how-can-i-make-a-parameter-of-a-webservice-process-required</link><description>&lt;p&gt;Normally the definition in the WSDL says minOccurs="0" which means optional, how can this be changed. See example part of a WSDL:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;xs:sequence&amp;gt;
  &amp;lt;xs:element minOccurs="0" name="param" type="xs:string"/&amp;gt;
&amp;lt;/xs:sequence&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/925/how-can-i-make-a-parameter-of-a-webservice-process-required" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 18 Aug 2014 16:41:16 -0400</lastBuildDate><item><title>Answer by Christian Strebel</title><link>https://answers.axonivy.com/questions/925/how-can-i-make-a-parameter-of-a-webservice-process-required/926</link><description>&lt;p&gt;To make a whole parameter required is not possible in Ivy, because you have to change the generated webservice class. This is not recommended because ivy has to regenerated the class if something changes int the associated webservice process.&lt;/p&gt;
&lt;p&gt;To make an field of an complex attribute required you have to create an own Java class which you then use as parameter. See example Java class below which makes the field &lt;code&gt;param&lt;/code&gt; &lt;em&gt;required&lt;/em&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class MyWsBean {
    @javax.xml.bind.annotation.XmlElement(required=true)
    private String param;
    ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The generated WSDL looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;xs:sequence&amp;gt;
  &amp;lt;xs:element name="param" type="xs:string"/&amp;gt;
&amp;lt;/xs:sequence&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Strebel</dc:creator><pubDate>Mon, 18 Aug 2014 16:41:16 -0400</pubDate><guid>https://answers.axonivy.com/questions/925/how-can-i-make-a-parameter-of-a-webservice-process-required/926</guid></item></channel></rss>