cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 'Nillable' property in the generated WSDL file while creating the Webservice from RFC?

Former Member
0 Kudos

Hi Experts!

I have created a webservice from the RFC which is consumed at the Java end.

I have one table in the changing parameter of the RFC.

Now although the prameters are optional but the nillbale property is not getting generated the Webservice

WSDl File. Because of which the java code throws exception when the service is called with the initial table

in the changing parameter.

Following is the piece of XML doc for the WSDL file which is getting generated:

<xsd:complexType name="ZhrpmsTNotesSav"> 

- <xsd:sequence>

<xsd:element name="item" type="tns:ZhrpmsSNotesSav" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="ZhrpmsTCellValueDetailSav">

- <xsd:sequence>

<xsd:element name="item" type="tns:ZhrpmsCellValueDetailSav" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="ZhrpmsTIndividualGoalsSav">

- <xsd:sequence>

<xsd:element name="item" type="tns:ZhrpmsIndividualGoalsSav" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

- <xsd:complexType name="ZhrpmsTNotes">

- <xsd:sequence>

<xsd:element name="item" type="tns:ZhrpmsSNotes" minOccurs="0" maxOccurs="unbounded" />

</xsd:sequence>

</xsd:complexType>

Here I shud get nillable property as mentioned below:

<xsd:element name="item" type="tns:ZhrpmsSNotesSav" minOccurs="0" nillable="true" maxOccurs="unbounded" />

As there are many fields so editing the WSDL file will be a very tedious task.

Isn't there any way to generate the WSDl doc with nillable property.

I would appreciate the timely help.

Thanks !

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anusha,

You can try with the table type instead of table parameter in RFC.

You create table type for the table that you have defined in the "Associated type" in "Tables" and then Pass an Export Parameter in RFC with this Table type with "Pass Value" Check.

Regards,

Sachin 

Former Member
0 Kudos

Thanks Sachin for such a prompt reply,

Actually my requirement is to retreive the data, modify it  and send back the modified data, so  have used the changing parameter. Although I have used table type only  bbut when the webservice is called from the java end at that time if they are not sending any value in the changing parameter  then the exception occurs. I think this is the scenario with changing parameter only. In exporting parameter it didnt happen. But I have to use changing parameter for the specific get and set functionality.

This is how the code gets generated at Java end when the webservice is consumed

if (localAppeeColIid==null){

                                     

          throw new org.apache.axis2.databinding.ADBException("AppeeColIid cannot be null!!");

     }

    localAppeeColIid.serialize(new javax.xml.namespace.QName("","AppeeColIid"),

                                                                 factory,xmlWriter);

If localAppeeColIid is sent null in the changing parameter then the exception is raised ... Now either way is to comment the code part which is to throw exception or edit the WSDL file .. but  as i have a number of such parameters ... It will be a tedious task..

Isnt there any direct solution to resolve it while generating the WSDl file from SAP end.

Former Member
0 Kudos

Anusha,

I think the Possible solution is to pass a default value in the source code of RFC with condition that if it is null then it should return some default value.

But still its upto your requirement whether you can pass any default value.

The other thing is you can put a message for such case.

Thanks & Regards,

Sachin

Former Member
0 Kudos

Hi Sachin.

I tried the stuff by making the changing parameter optional. But still the WSDL file was not getting generated with the nillable property. I think this property gets generated. But  as this property was required at Java and Asp.net end that's why we have manually added this field in the WSDL file separately and provided it to the Java Developers.

However the WSDL file was not editable through SE80 or SOAMANGER.

Best Regards!