Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jax-ws wsdl didn't create a set method

Tags:

wsdl

jaxb

jax-ws

I have created a wsdl based web service and for some reason one of my elements doesnt have a set method only a get method.

<xs:element name="Request">
            <xs:complexType>
                <xs:sequence>
                    <xs:element ref="ns1:source_system"/>
                    <xs:element ref="ns1:target_system"/>
                    <xs:element ref="ns1:message_id"/>
                    <xs:element ref="ns1:message_send_timestamp"/>
                    <xs:element ref="ns1:request_type"/>
                    <xs:element ref="ns1:crm_customer_id"/>
                    <xs:element ref="ns1:crm_request_id"/>
                    <xs:element ref="ns1:donor_id"/>
                    <xs:element ref="ns1:identification_value"/>
                    <xs:element ref="ns1:identification_value_2" minOccurs="0"/>
                    <xs:element ref="ns1:identification_value_3" minOccurs="0"/>
                    <xs:element ref="ns1:dn_number_item" maxOccurs="unbounded"/>
                </xs:sequence>
            </xs:complexType>
</xs:element>

now in my progrem I only have request.getDnNumberItem() and I dont have request.setDnNumberItem(). for all other parameters I have both set and get.

this has happened to me before and somehow got fixed by itself.

like image 902
susparsy Avatar asked Oct 03 '22 21:10

susparsy


1 Answers

A setter wasn't generated for dnNumberItem property because it is a collection property (maxOccurs="unbounded"), the others aren't. You can modify the List by accessing it through the getter.

like image 73
bdoughan Avatar answered Oct 11 '22 15:10

bdoughan