Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send XML to WebService

Status
Not open for further replies.

JenniReyniss

Programmer
Mar 23, 2010
12
IS
I have been using VFP for several years to send XML with WebService (WS) and it has worked well.
Now I have to make another WS call to send another XML. I will use the same WS but another method.
But it's not working well and the XML is not delivering properly.
I thought I could use the same way to create XML as I did in the older call.
This is the XML in the older and it delivers ok:
(Parameter names and such have been changed.)

TEXT TO lcXML TEXTMERGE NOSHOW
<coolio_words xmlns=" message_id="string_1">
<customer_insert staffId="string_4" ktl="string_5" rejectReason="" batchID="string_6" countryCode="string_7">
<customer cost="string_8" date="2020-02-02T00:00:00" costSystem="string_9" costName="string_10" />
</customer_insert>
</coolio_words>
ENDTEXT

This XML is created in consultation with the receiving company. And it is working well.


But the new XML is like this (and also in consultation with the receiver) but it doesn't deliver properly:

TEXT TO lcXML TEXTMERGE NOSHOW
<CustomerRegistration>
<CustomerId>"string_1"</CustomerId>
<Date>"2020-02-02T05:05:00"</Date>
</CustomerRegistration>
ENDTEXT

It returns to them like this:

<CustomerRegistration xmlns=" <CustomerId>"string_1"</CustomerId>
<Date>"2020-02-02T05:05:00"</Date>
</CustomerRegistration>

It delivers to them with added 'xmlns'.
I don't understand why.

And if I add 'xmlns' in the code, like I do in the older call:

TEXT TO lcXML TEXTMERGE NOSHOW
<CustomerRegistration xmlns=" <CustomerId>"string_1"</CustomerId>
<Date>"2020-02-02T05:05:00"</Date>
</CustomerRegistration>
ENDTEXT

It yet adds 'xmlns' so it will be twice:

<CustomerRegistration xmlns=" xmlns=" <CustomerId>"string_1"</CustomerId>
<Date>"2020-02-02T05:05:00"</Date>
</CustomerRegistration>


I don't understand what is going on and the reaction from the receiver company is:
"it's like the SOAP-client that you are using is misunderstanding the 'any tag' in the wsdl and likely failing on your side".

Is this some settings in SOAP or is this about MSXML? I am using MSXML 4.0.
Or are changes in the WS-world which no longer supports VFP?

With thanks in advance,
JensReyniss
 
JensReyniss,

Is the WSDL of the service public? And does it have a URL?
 
What if you single step through the process with the debugger?

Also, Telerik Fiddler (and similar network monitoring tools) can show you what goes over the wire how and when.

It feels you have some component, third party or not, internal or external, that influences your XML.

Bye, Olaf.

Olaf Doschke Software Engineering
 
atlopes,
thank you for your response.
No, the WSDL is not public.
 
Thank you Olaf for your suggestions.
I will look into Telerik Fiddler.
I will let you know how it goes.
 
Are you using West Wind? If not, maybe you should check it out, I'm sure it is easy to find. I am NOT any kind of expert on this kind of thing, so I always used Rick's products for this, and he is (was, at least) always available to help.

Larry (TPG)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top