Hey Jeff!!
First of all, CONGRATULATIONS!!
As we say in Mexico, now your son it's entirely a man! Hehehe no
offences it's just a nice way to say "The end of an age and the
beginning of a new one".
Now reading your inputs for the correct understanding about my
problem...
I have to say "Yes sir" you got the information.
If you want we can base your help (wich I appreciate really much btw)
on your example, anyway I'll give you some information based on the
reality that we have in here...
The first method to be called it's based on this signature
searchCustomers()
And well the parameters are many, that's why I'm adding the XML
<del:searchCustomers>
<Filter>
<java:City></java:City>
<java:Colonia></java:Colonia>
<java:Company></java:Company>
<java:Country></java:Country>
<java:Email></java:Email>
<java:FavcId></java:FavcId>
<java:LastName>SMITH</java:LastName>
<java:LastName2>CRAWL</java:LastName2>
<!--Zero or more repetitions:-->
<java:LoyaltyList>
<java:LoyaltyId></java:LoyaltyId>
</java:LoyaltyList>
<java:Names>SEAN MICHAEL</java:Names>
<java:Phone></java:Phone>
<java:Rfc></java:Rfc>
<java:State></java:State>
<java:Street></java:Street>
<java:SystemId>vartsjmSystem</java:SystemId>
<java:UserId>vartsjm</java:UserId>
<java:ZipCode></java:ZipCode>
</Filter>
</del:searchCustomers>
Ok so first of all I need to send this request, to a business service.
Then the business service will search the customers that might have
relation with that name.
And it will reply with an XML like this
<n1:result xmlns:n1="
http://www.innovativesystems.com">
<n2:customers xsi:type="n2:ArrayOfCustomerVO"
xmlns:n2="java:com.innovativesystems.delpack">
<n2:CustomerVO>
<n2:customerAddress
xsi:type="n3:ArrayOfCustomerAddressVO"
xmlns:n3="java:com.innovativesystems.delpack.values">
<n3:CustomerAddressVO>
<n3:addressId>9036022</n3:addressId>
<n3:addressType>HOM</n3:addressType>
<n3:city>CIUDAD DE MEXICO</n3:city>
<n3:colonia>GRANJAS COAPA</n3:colonia>
<n3:country>MX</n3:country>
<n3:state>DF</n3:state>
<n3:street>SAUZALES 39 EDIF D 102 TLALPAN
TLALPAN</n3:street>
<n3:zipCode>14330</n3:zipCode>
</n3:CustomerAddressVO>
</n2:customerAddress>
<n2:ident>9362821</n2:ident>
<n2:lastName>SMITH</n2:lastName>
<n2:lastName2>JHONS</n2:lastName2>
<n2:names>SEAN MICHAEL</n2:names>
</n2:CustomerVO>
<n2:CustomerVO>
<n2:customerAddress
xsi:type="n4:ArrayOfCustomerAddressVO"
xmlns:n4="java:com.innovativesystems.delpack.values">
<n4:CustomerAddressVO>
<n4:addressId>6903602</n4:addressId>
<n4:addressType>BUS</n4:addressType>
<n4:city>D.F.</n4:city>
<n4:colonia>LOMAS DE CHAPULTEPEC</n4:colonia>
<n4:country>MX</n4:country>
<n4:state>DF</n4:state>
<n4:street>REFORMA 155 MEXICO</n4:street>
<n4:zipCode>11000</n4:zipCode>
</n4:CustomerAddressVO>
</n2:customerAddress>
<n2:ident>8155723</n2:ident>
<n2:lastName>SMITH</n2:lastName>
<n2:lastName2>JAMES</n2:lastName2>
<n2:names>SEAN MICHAEL</n2:names>
</n2:CustomerVO>
</n2:customers>
</n1:result>
So as you can see in here, I have two options.
The parameter that I'm interested in it's the
<n2:ident>8155723</n2:ident>
That will be the key to call the next Business Service. I have to add
that value to another call, for another method "customerProfile" wich
receives the follow XML
<del:customerProfile>
<del:customerProfileRequest>
<java:blockInfo>
<!--Zero or more repetitions:-->
<java1:string>LASTEMAIL</java1:string>
<java1:string>LOY</java1:string>
</java:blockInfo>
<java:ident>9362821</java:ident>
<java:hotelCode></java:hotelCode>
<java:systemId>PEB</java:systemId>
<java:userId>vartsjm</java:userId>
</del:customerProfileRequest>
</del:customerProfile>
So I need to create a call (an XML) per ident gathered on the
searchCustomers response, and call customerProfile.
Follow the flow, I got the first "ident" value, I create this new
request, I call the service with this method, and I'll get the follow
response.
<m:customerProfileResponse xmlns:m="http://
www.innovativesystems.com">
<n1:result xmlns:n1="
http://www.innovativesystems.com/"
xmlns:n2="java:com.innovativesystems.delpack">
<n2:bas/>
<n2:comments/>
<n2:companies/>
<n2:dem/>
<n2:ident>9362821</n6:ident>
<n2:gvalue/>
<n2:hisAdd/>
<n2:hisEmail/>
<n2:hisPhone/>
<n2:hisRFC/>
<n2:histStay/>
<n2:lastAdd/>
<n2:lastEmail>
<n3:EMail
xmlns:n3="java:com.innovativesystems.delphospack.values">
sean.m...@gmail.com</
n3:EMail>
<n3:type>P</n3:type>
</n2:lastEmail>
<n2:lastPhone/>
<n3:loy xsi:type="n3:ArrayOfLoyaltyItem">
<n3:LoyaltyItem>
<n3:level>DR</n3:level>
<n3:programNumber>62T25330</n3:programNumber>
<n3:programType>DR</n3:programType>
</n3:LoyaltyItem>
<n3:LoyaltyItem>
<n3:level>DR</n3:level>
<n3:programNumber>01E74532</n3:programNumber>
<n3:programType>DR</n3:programType>
</n3:LoyaltyItem>
</n3:loy>
<n2:pref/>
<n2:reservations/>
</n1:result>
</m:customerProfileResponse>
Ok now with this we're almost a the end... But from this response, I
need information.
The tags "lastEmail" and it's descendents, the tag "loy" and it's
descendents.
I need to add that information to another XML, based on the first
response from searchCustomer.
It should end in something like this
<n1:result xmlns:n1="
http://www.innovativesystems.com">
<n2:customers xsi:type="n2:ArrayOfCustomerVO"
xmlns:n2="java:com.innovativesystems.delpack">
<n2:CustomerVO>
<n2:customerAddress
xsi:type="n3:ArrayOfCustomerAddressVO"
xmlns:n3="java:com.innovativesystems.delpack.values">
<n3:CustomerAddressVO>
<n3:addressId>9036022</n3:addressId>
<n3:addressType>HOM</n3:addressType>
<n3:city>CIUDAD DE MEXICO</n3:city>
<n3:colonia>GRANJAS COAPA</n3:colonia>
<n3:country>MX</n3:country>
<n3:state>DF</n3:state>
<n3:street>SAUZALES 39 EDIF D 102 TLALPAN
TLALPAN</n3:street>
<n3:zipCode>14330</n3:zipCode>
</n3:CustomerAddressVO>
</n2:customerAddress>
<n2:lastEmail>
<n4:EMail>
sean.m...@gmail.com</n4:EMail>
<n4:type>P</n4:type>
</n2:lastEmail>
<n4:loy xsi:type="n4:ArrayOfLoyaltyItem">
<n4:LoyaltyItem>
<n4:level>DR</n4:level>
<n4:programNumber>62T25330</n4:programNumber>
<n4:programType>DR</n4:programType>
</n4:LoyaltyItem>
<n4:LoyaltyItem>
<n4:level>DR</n4:level>
<n4:programNumber>01E74532</n4:programNumber>
<n4:programType>DR</n4:programType>
</n4:LoyaltyItem>
</n4:loy>
<n2:ident>9362821</n2:ident>
<n2:lastName>SMITH</n2:lastName>
<n2:lastName2>JHONS</n2:lastName2>
<n2:names>SEAN MICHAEL</n2:names>
</n2:CustomerVO>
<n2:CustomerVO>
<n2:customerAddress
xsi:type="n4:ArrayOfCustomerAddressVO"
xmlns:n4="java:com.innovativesystems.delpack.values">
<n4:CustomerAddressVO>
<n4:addressId>6903602</n4:addressId>
<n4:addressType>BUS</n4:addressType>
<n4:city>D.F.</n4:city>
<n4:colonia>LOMAS DE CHAPULTEPEC</n4:colonia>
<n4:country>MX</n4:country>
<n4:state>DF</n4:state>
<n4:street>REFORMA 155 MEXICO</n4:street>
<n4:zipCode>11000</n4:zipCode>
</n4:CustomerAddressVO>
</n2:customerAddress>
<n2:ident>8155723</n2:ident>
<n2:lastName>SMITH</n2:lastName>
<n2:lastName2>JAMES</n2:lastName2>
<n2:names>SEAN MICHAEL</n2:names>
</n2:CustomerVO>
</n2:customers>
</n1:result>
And the next iteration will add the information about the email and
the loy for the next ident.
Soooo....
That's the whole proxy work.
And to be honest, I have the idea of how to do it technically... I
just need to understand how would OSB woul do it.
I really appreciate this help!
I'll be waiting on you, in the meanwhile, I'll try to find information
on how to work with the For Each step.
Once again, congratulations for your son and hope you had a awesome
weekend!
Thanks and best Regards,
Mike