on 07-09-2008 8:48 PM
Hi Guys,
I have a requirement where i need to do the HTTP post and the xml request should be as below
The AddressValidationRequest message consists of two complete XML documents. The first document is an AccessRequest. It is immediately followed by an AddressValidationRequest.
<?xml version="1.0" ?>
<AccessRequest xml:lang='en-US'>
<AccessLicenseNumber>YOURACCESSLICENSENUMBER</AccessLicenseNumber>
<UserId>YOURUSERID</UserId>
<Password>YOURPASSWORD</Password>
</AccessRequest>
<?xml version="1.0" ?><AddressValidationRequest xml:lang='en-US'>
<Request>
<TransactionReference>
<CustomerContext /><XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>XAV</RequestAction>
<RequestOption>3</RequestOption>
</Request>
<MaximumListSize>3</MaximumListSize>
<AddressKeyFormat>
<ConsigneeName>UPS Capital</ConsigneeName>
<BuildingName>Business Credit</BuildingName>
<AddressLine>425 Day Hill Road</AddressLine>
<AddressLine>P.O. Box 400</AddressLine>
<AddressLine>Main Office</AddressLine>
<PoliticalDivision2>Windsor</PoliticalDivision2>
<PoliticalDivision1>CT</PoliticalDivision1>
<PostcodePrimaryLow>06095</PostcodePrimaryLow>
<CountryCode>US</CountryCode>
</AddressKeyFormat>
</AddressValidationRequest>
I know it is invalid to have the second xml declaration, but the 3rd party system expects in this manner. Is there any way i can insert the xml verion tag either with DOM ?
any help or suggestions would be appreciated and awarded.
Thanks,
Srini
Hey
Try to play around with the prolog or epilog property of HTTP adapter,i once had a issue of adding an extra carraige return after XML and epilog worked for me.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can try that in Java Mapping without using any Parser. You have to use Java input and output stream and construct this as normal string of this format and send it to end system.
PS: by using io streams the performance will be reduced, but it will fulfill your requirement
thanks
amit
Edited by: Craig Cmehil on Jul 10, 2008 9:27 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.