×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Send XML to WebService

Send XML to WebService

Send XML to WebService

(OP)
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="http://www.company.com/schemas/inc/coolie/1" 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="http://www.company.com/schemas/comp/gateway/1">
<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="http://www.company.com/schemas/comp/gateway/1">
<CustomerId>"string_1"</CustomerId>
<Date>"2020-02-02T05:05:00"</Date>
</CustomerRegistration>
ENDTEXT

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

<CustomerRegistration xmlns="http://www.company.com/schemas/comp/gateway/1" xmlns="http://www.company.com/schemas/comp/gateway/1">
<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

RE: Send XML to WebService

JensReyniss,

Is the WSDL of the service public? And does it have a URL?

RE: Send XML to WebService

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
https://www.doschke.name

RE: Send XML to WebService

(OP)
atlopes,
thank you for your response.
No, the WSDL is not public.

RE: Send XML to WebService

(OP)
Thank you Olaf for your suggestions.
I will look into Telerik Fiddler.
I will let you know how it goes.

RE: Send XML to WebService

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)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close