If you have control of your XML schema, you can set minOccurs=0 for each
child element of carpalTunnelJointIssues instead of setting nillable=true.
This would omit the child element instead of including an empty element with
the nil attribute.

See: http://www.w3.org/TR/2008/WD-xmlschema-patterns-20080328/#optional and
http://www.w3.org/2002/ws/databinding/edcopy/advanced/advanced.html#group-El
ement (2.7.9) for some examples of schema and instance documents using these
two options.

There is a lot of good discussion out there about the semantics of nillable
vs. minOcurrs.  Try Google for more info.  As far as controlling how your
messages get serialized if nillable=true and minOcurrs=0, I will leave that
up to the folks who know far more about databinding tools and XML processing
than I do, but I do know that JAX-B 2.x can handle this ternary state
situation (nil, omitted, and complete) using JAXBElement objects. 

-----Original Message-----
From: Chris Hardin [mailto:[email protected]] 
Sent: Wednesday, March 31, 2010 9:38 AM
To: [email protected]
Subject: Re: Performance

Here is an example of where I thought I might create a performance increase.
My Soap contain a lot of below for an object. I have a really large object
that has a lot of Fields, but the Soap message contains a field even if that
field doesn't contain values.

         <ns2:carpalTunnelJointIssues ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:compensationNotSalary ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:country ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:disabilityNoworNext90days ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:disabledMore60 ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:emailAddress ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:homePhone ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:id>18</ns2:id>
                  <ns2:idnumber ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:idplaceOfIssuance ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:legalAddressCity ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:legalAddressState ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:legalAddressStreet ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:legalAddressZip ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:mailingAddressCity ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:mailingAddressState ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:mailingAddressStreet ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:mailingAddressZip ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:maritalStatus ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:monthsAtCurrentAddress ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:monthsAtPreviousAddress ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:mothersMaidenName ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:nearestRelativeAddressCity ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:nearestRelativeAddressPhone ns3:nil="true"
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:nearestRelativeAddressState ns3:nil="true"
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:nearestRelativeAddressStreet ns3:nil="true"
xmlns:ns3="http://www.w3.org/2001/XMLSchema-instance"/>
                  <ns2:nearestRelativeAddressZip ns3:nil="true" xmlns:ns3="
http://www.w3.org/2001/XMLSchema-instance"/>


On Wed, Mar 31, 2010 at 8:34 AM, Chris Hardin <[email protected]>wrote:

> Is there anything I can do to help increase performance? For example, are
> there some strategies for cutting back on the size of the SOap message
> generated? Compression? anything would be helpful. I want to squeeze a few
> micros off my calls.
>
> thanks in advance
>

Reply via email to