IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Mapforce calling a web service Options · View
TBlackbird
Posted: Thursday, April 28, 2011 2:38:14 PM
Rank: Member

Joined: 1/16/2008
Posts: 14
I have a MapForce diagram that calls a web service. Mainly it transforms a text file into XML and submits it to a web service at an external agency. I've run into a couple of problems that I could use help on:

1. Is there a way to have the Address, Username and Password in the WSDL Call Settings dialog pulled from some outside component (like an input or global resource)? Reason I ask is I'd like the ability to tell the diagram, call the production or development version (on two different servers) and supply the appropriate username and password for each. I've got code that does this, but I've had to end up modifying the generated code and it must be changed each time I regenerate.

2. The supplied WSDL doesn't seem to include any definitions for the faults that it returns. I guess the reason is that all faults are simple SOAP faults...nothing special. MapForce completely ignores these faults (generates an empty root element in my result XML file). In order to get some sort of feed back on a problem what do I have to do? (Add fault to WSDL? Or am I missing something in mapforce?)

Appreciate any help,
Scott
lsalda
Posted: Wednesday, September 2, 2015 5:46:13 PM
Rank: Newbie

Joined: 9/2/2015
Posts: 2
Scott,

Did you ever figure out how to do this? I just found myself in the same boat.

Thanks,
Lance
TBlackbird
Posted: Wednesday, September 2, 2015 6:49:09 PM
Rank: Member

Joined: 1/16/2008
Posts: 14
I never found a way to do #1 in Mapforce directly...I had to make modifications to the generated code. I replaced the hard coded values it put in with references to a configuration file and parameters.

Hope that helps,
Scott
island
Posted: Thursday, September 3, 2015 4:40:53 AM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
Quote:
1. Is there a way to have the Address, Username and Password in the WSDL Call Settings dialog pulled from some outside component (like an input or global resource)? Reason I ask is I'd like the ability to tell the diagram, call the production or development version (on two different servers) and supply the appropriate username and password for each. I've got code that does this, but I've had to end up modifying the generated code and it must be changed each time I regenerate.


There is no way to do this directly however as you pointed out you can amend the generated code. To prevent having to modify the code each time you generate code edit the underlying sps templates.



Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.