how to generate 'xsi:nil="true" attribute in wsdl document before calling to the webs

Hi All,

I have generated the wsdl document from wsdl and created consumers , connectors on that, so in flow service i have map the document with values and map to the wsdl document of the webservice ,
if run the service, it is invoking the webservice , problem here am facing is this wsdl have nillable= ""true elements

- -

if you take the element element it nillable -true, in IS wsdl document it is showing as Allow null true and required true, so i have set the value to the wsdl document, it is generating , but i require the <IncidentCallPolicyLinkID xsi:nill=""true> in the out put

how to get attribute ‘xsi:nil=“true”’ attribute in the elements of generated wsdl documents

am using the webmethods 80.

regards,
anil kumar e

there is a service in PSUtilities u can use ps.util.idata:removeNullFields and it should resolve your problem. I faced the same issue and after using this service 'xsi:nil="true was resolved. thanks

hth

use this service in the webservice connector before calling soapClient, map the input and output back to the same input doc.

thanks for reply , here i want to set the 'xsi:nil="true attribute to the elements if i am passing set the value , means before going to the webservice, the element should take null, t donot have mapping conding to this element , , so just setting value empty by set the balnk value (it is require filed) to this element becz of this it is genrating has , eventhough it is nillable=“true” , in the output i need to get null, your service to remove the null value in the elements but i require opposite way before sending to the webservice

anil kumar e

not only this element , there other elements should generate <>null</> in webservice input document(wsdl document), if it is required element with the nillable=“true” attribute,before calling webservice,

check if allow null is set to ‘True’ in your properties for that field.

yes this has allow null property has true, in runtime how to get null value to the element, am not getting , if i donot set the value it is giving that this element is manadatory, if i set the value it is not giving the null value to this element before calling the webservice (soap client).

checkout this forum link. HTH

http://www.wmusers.com/forum/showthread.php?p=43814&highlight=nillable#post43814

thanks for reply leonlee and suggestimg for forum link, here one think i like say to u here am not validating xml data,donot require to validate ,here are the steps i have done

1.i have created the IS Document against WSDL, WSDL has elements with nillable=“true” type=“xsd:string” attributes, so IS generated the IS document with those fileds with required “true”, Allow null “true” contraints properties.

  1. in flow service ,thers is a map step , am doing mapping to the WSDL generated IS Document, in some of the IS Document fileds doesnot have mapping condition, i need to pass the all the IS document fileds to the webservice connector because it is required “true”,if i donot pass the all fileds to the webservice connector it will throwing an error the “required parameter element is missing”,so i have set the blank value to the IS Document fileds because it is manadtory, if i set the value to the IS Document fileds value become “”, i need to pass null('xsi:nil=“true” OR nillable =“true” ) to webservice, becauses this fields have an attribute nillable =“true” in the WSDL, so how can i achieve this.

time being i have set the minOccurs=“0” attribute to the WSDL elements which doenot have mapping condition in Development , then it will become required propert false.

i need the solution if an element having minOccurs=“1”,nillable=“true” ,type=“xsd:string” attributes, if doesnot have mapping condition , how can i effect the nillable value to the fields before calling webservice connector.
regards,
anil kumar e