The only way to do this at the same time that you are adding the customer is to specify unique identifiers for the addresses when you create them. You can then reference those unique identifiers in the BillingAddress and ShippingAddress nodes of the customer node. For example:
Code:
<Customer Action="Add">
<EMail>email@address.com</EMail>
<Password>password</Password>
<FirstName>First Name</FirstName>
<LastName>Last Name</LastName>
<BillingAddress GUID="f98fe683-4efa-4ce6-909e-1d5e7a4a8531"/>
<ShippingAddress GUID="e86c1be1-abca-4be0-a6e1-b0735c19d4a9"/>
<Addresses>
<Address Action="Add" GUID="f98fe683-4efa-4ce6-909e-1d5e7a4a8531">
<FirstName>First Name</FirstName>
<LastName>Last Name</LastName>
<Address1>123 Main St.</Address1>
<City>City</City>
<State>OH</State>
<Country>United States</Country>
<Zip>44145</Zip>
<Phone>1234567890</Phone>
<EMail>email@address.com</EMail>
</Address>
<Address Action="Add" GUID="e86c1be1-abca-4be0-a6e1-b0735c19d4a9">
<FirstName>Shipping Address First Name</FirstName>
<LastName>Shipping Address Last Name</LastName>
<Address1>123 Main St.</Address1>
<City>Shipping Address City</City>
<State>OH</State>
<Country>United States</Country>
<Zip>44145</Zip>
<Phone>1234567890</Phone>
<EMail>email@address.com</EMail>
</Address>
</Addresses>
</Customer>
The flow here is that the customer is created, then the addresses are created with an AddressGUID that is the one specified in the Address nodes, and then the customer record is updated with the AddressIDs that WSI finds based on the GUID you are passing in BillingAddress and ShippingAddress. When I run this, I get
Code:
<?xml version="1.0" encoding="utf-8"?>
<AspDotNetStorefrontImportResult Version="" DateTime="5/21/2009 3:44:37 PM">
<Item NodeType="Customer" Name="" GUID="0D9C8742-A97C-4126-BD30-6DC681D93C1D" ID="58748" ActionTaken="Add" Status="OK" Message="" />
<Item NodeType="Address" Name="" GUID="f98fe683-4efa-4ce6-909e-1d5e7a4a8531" ID="124" ActionTaken="Add" Status="OK" Message="" />
<Item NodeType="Address" Name="" GUID="e86c1be1-abca-4be0-a6e1-b0735c19d4a9" ID="125" ActionTaken="Add" Status="OK" Message="" />
</AspDotNetStorefrontImportResult>
so my addresses were created with IDs 124 and 125. If you go and take a look at the customer record after running this, you'll see that the BillingAddressID is correctly set to 124 and the ShippingAddressID is correctly set to 125