From: Langston, J. <Jam...@co...> - 2010-02-04 23:20:47
|
Hi all, In creating my elements and sending them to the server, I get xsi:nil="true" put into the element, even though I have not put it there. $monitorOrder->add_elem(name=>'MonitorSite', attributes=>{ 'siteId'=>"330" }) ; expecting <MonitorSite siteId="330"/> I get <MonitorSite xsi:nil="true" siteId="330"/> I cannot attribute the reason that this is getting created in this manner, any hints, suggestions? the nil is causing issues and I need to ensure they are not interjected. Jim /////////////////////////////// Jim Langston Technical Consultant jam...@co... The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. |
From: Leo L. <le...@cu...> - 2010-02-05 08:53:12
|
On 4 February 2010 22:55, Langston, James <Jam...@co...>wrote: > $monitorOrder->add_elem(name=>'MonitorSite', > > attributes=>{ > > 'siteId'=>"330" > > }) ; > > expecting > > <MonitorSite siteId=”330”/> > > I get > > <MonitorSite xsi:nil=”true” siteId=”330”/> > I can't tell you how to stop it I'm afraid. It is standard that if the element has no value then this attribute is set (.Net also adds it by default), so I would suggest it would be better to solve the issue on the parser side (e.g. where this data is being sent to) to allow this - if at all possible. Leo Leo |
From: Langston, J. <Jam...@co...> - 2010-02-05 13:00:21
|
In this case, I’m on a RedHat system, what I can’t figure out is how it is getting put in as a value to begin with. If it is on my end, how can I stop it? The message schema provided by the server looks like: <xs:complexType name="ArrayOfMonitorSiteOrder"> − <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="MonitorSite" nillable="true" type="MonitorSiteOrder"/> </xs:sequence> </xs:complexType> − <xs:complexType name="MonitorSiteOrder"> <xs:attribute name="siteId" type="xs:int" use="required"/> </xs:complexType> Jim ///////////////////////////////////////////// Jim Langston Technical Consultant jam...@co... From: ran...@gm... [mailto:ran...@gm...] On Behalf Of Leo Lapworth Sent: Friday, February 05, 2010 3:53 AM To: Langston, James Cc: soa...@li... Subject: Re: [Soaplite-devel] xsi:nil ? On 4 February 2010 22:55, Langston, James <Jam...@co...> wrote: $monitorOrder->add_elem(name=>'MonitorSite', attributes=>{ 'siteId'=>"330" }) ; expecting <MonitorSite siteId=”330”/> I get <MonitorSite xsi:nil=”true” siteId=”330”/> I can't tell you how to stop it I'm afraid. It is standard that if the element has no value then this attribute is set (.Net also adds it by default), so I would suggest it would be better to solve the issue on the parser side (e.g. where this data is being sent to) to allow this - if at all possible. Leo Leo The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. |
From: rahed <ra...@gm...> - 2010-02-05 15:06:07
|
"Langston, James" <Jam...@co...> writes: > Hi all, > > In creating my elements and sending them to the server, I get > xsi:nil="true" put into the element, even though > I have not put it there. > > $monitorOrder->add_elem(name=>'MonitorSite', > attributes=>{ > 'siteId'=>"330" > }) ; > > expecting > > <MonitorSite siteId="330"/> > > I get > > <MonitorSite xsi:nil="true" siteId="330"/> > Cannot you set autotype to 0 before sending the message to the server? $client->autotype(0); should disable data autotyping. -- Radek |
From: Langston, J. <Jam...@co...> - 2010-02-05 16:17:33
|
I have tried this as well: -> outputxml(1) -> on_action(sub{join '', @_}) -> soapversion('1.2') -> envprefix('env') -> encprefix('enc') -> autotype(0) I know that the soapversion and envprefix are required, as the call will fail if not set. The autotype did not have any effect when I added previously. I just tried again with the same results, that is, the xsi:nil="true" is getting added in that element. another question: is this getting added by the server, or perl after getting the xsd information back from the server, but before creating the envelop to send? Jim /////////////////////////// Jim Langston Technical Consultant jam...@co... The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. From: rahed [mailto:ra...@gm...] Sent: Friday, February 05, 2010 10:06 AM To: Langston, James Cc: soa...@li... Subject: Re: [Soaplite-devel] xsi:nil ? "Langston, James" <Jam...@co...> writes: > Hi all, > > In creating my elements and sending them to the server, I get > xsi:nil="true" put into the element, even though > I have not put it there. > > $monitorOrder->add_elem(name=>'MonitorSite', > attributes=>{ > 'siteId'=>"330" > }) ; > > expecting > > <MonitorSite siteId="330"/> > > I get > > <MonitorSite xsi:nil="true" siteId="330"/> > Cannot you set autotype to 0 before sending the message to the server? $client->autotype(0); should disable data autotyping. -- Radek |
From: rahed <ra...@gm...> - 2010-02-05 19:05:50
|
"Langston, James" <Jam...@co...> writes: > I have tried this as well: > > -> outputxml(1) > -> on_action(sub{join '', @_}) > -> soapversion('1.2') > -> envprefix('env') > -> encprefix('enc') > -> autotype(0) > > > I know that the soapversion and envprefix are required, as the call will > fail if not set. The autotype > did not have any effect when I added previously. I just tried again with > the same results, that is, the > xsi:nil="true" is getting added in that element. another question: is > this getting added by > the server, or perl after getting the xsd information back from the > server, but before creating > the envelop to send? Will you send the minimal code which results in xsi:nil="true" type? With use SOAP::Lite +trace=>'all'; $soap = SOAP::Lite->new(uri=>'your_namespace',proxy=>'your_endpoint'); $soap->autotype(0); you will see that type definitions are removed. -- Radek |
From: Langston, J. <Jam...@co...> - 2010-02-22 16:06:00
|
Sorry to check out for a few of days, I recreated this same call to the service with Java, and did not have any problems. What I noticed is that with Java, the generated classes are creating the elements with arrays, on the Perl side, I did not do that. which is what is accounting for the nils, and I'm now looking at SOAP::WSDL, as well as, SOAP::Data::ComplexType. Are there any good examples of handling: <xs:complexType name="ArrayOfMonitorSiteOrder"> − <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="MonitorSite" nillable="true" type="MonitorSiteOrder"/> </xs:sequence> </xs:complexType> Jim ///////////////////////////////// Jim Langston Technical Consultant jam...@co... The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. From: rahed [mailto:ra...@gm...] Sent: Friday, February 05, 2010 2:06 PM To: Langston, James Cc: soa...@li... Subject: Re: [Soaplite-devel] xsi:nil ? "Langston, James" <Jam...@co...> writes: > I have tried this as well: > > -> outputxml(1) > -> on_action(sub{join '', @_}) > -> soapversion('1.2') > -> envprefix('env') > -> encprefix('enc') > -> autotype(0) > > > I know that the soapversion and envprefix are required, as the call will > fail if not set. The autotype > did not have any effect when I added previously. I just tried again with > the same results, that is, the > xsi:nil="true" is getting added in that element. another question: is > this getting added by > the server, or perl after getting the xsd information back from the > server, but before creating > the envelop to send? Will you send the minimal code which results in xsi:nil="true" type? With use SOAP::Lite +trace=>'all'; $soap = SOAP::Lite->new(uri=>'your_namespace',proxy=>'your_endpoint'); $soap->autotype(0); you will see that type definitions are removed. -- Radek |
From: Langston, J. <Jam...@co...> - 2010-02-05 16:26:38
|
Also, is there another way for me to look at what is getting sent to the server? I'm looking at the debug output. thanks, Jim ///////////////////////// Jim Langston Technical Consultant jam...@co... The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. From: rahed [mailto:ra...@gm...] Sent: Friday, February 05, 2010 10:06 AM To: Langston, James Cc: soa...@li... Subject: Re: [Soaplite-devel] xsi:nil ? "Langston, James" <Jam...@co...> writes: > Hi all, > > In creating my elements and sending them to the server, I get > xsi:nil="true" put into the element, even though > I have not put it there. > > $monitorOrder->add_elem(name=>'MonitorSite', > attributes=>{ > 'siteId'=>"330" > }) ; > > expecting > > <MonitorSite siteId="330"/> > > I get > > <MonitorSite xsi:nil="true" siteId="330"/> > Cannot you set autotype to 0 before sending the message to the server? $client->autotype(0); should disable data autotyping. -- Radek |