views:

904

answers:

2

I'm working with multiple third party webservices (from the same vendor) that appear to be using the same object structure server side. One of the services allows me to query a list of users by role, and another allows me to query a single user by ID. In order to get this to work the best way possible, the users returned from both services need to be able to be used interchangeably.

Enter wsdl.exe. I'm aware that /sharetypes does what I want it to do, however, when I generate my proxy, there end up still being multiple versions of the objects (i.e. Person, Person1, ...).

The command I'm executing is as follows:

wsdl.exe /sharetypes /language:VB http://mbptest2.seniormbp.com:8080/SeniorSystemsWS/UserManagementService.asmx?wsdl http://mbptest2.seniormbp.com:8080/SeniorSystemsWS/DataExportService.asmx?wsdl http://mbptest2.seniormbp.com:8080/SeniorSystemsWS/UserProfileService.asmx?wsdl

+1  A: 

According to the MSDN documentation for this to work, the namespace, name, and wire signature must be identical in all services. Something looks like they're not matching up so these are a good place to start looking.

Ray Booysen
I'm not trying to sound dumb ;), but what is the wire signature?
Wes P
Hi wes. this will be the fully qualified name of the child element of the soap:body element in your wsdl.
Ray Booysen
I'm appreciative of your assistance, but I'm going to need a little more to go on. I see multiple soap:body elements, located inside wsdl:input and wsdl:output elements for wsdl:operations. All are empty, and all look exactly the same. These 3 services all have the same NS and object names. :-\
Wes P
Can we see some of the soap body?
Ray Booysen
all 3 wsdl's are available through the links above, but the soap:body looks like <soap:body use="literal"/>. Or are you wanting to see a sample soap request/response? Thanks :)
Wes P
A: 

The schema for DataExportService has tns and the target namespace defined as http://www.senior-systems.com/. The schema for UserProfileService has tns and the target namespace defined as http://senior-systems.com/.

Those are different, even if they happened to resolve to the same web server when used as a URL. XML namespaces are compared textually, not according to URL syntax. For example, http://senior-systems.com/ and http://senior-systems.com would be two different namespaces (hint: one is missing the trailing slash).

John Saunders