Reputation: 306
I am struggling to get SOAPUI to show my operations in my service, I generate my WSDL from exposed MEX endpoints (So not manual) then I create my CLIENT proxies from the generated WSDL. From a code perspective this works fine (My unit tests pass if the host is running and fail if it is down).
I would like to use SOAPUI to do some low level testing but if I consume that same WSDL used to generate the proxies then it does not show any operations (Even though the WSDL is working)
Generate WSDL svcutil /target:metadata "net.tcp://localhost:10109/AnimalService"
Generate Proxies svcutil /t:code ..*.wsdl ..*.xsd /out:Proxy.cs /config:Proxy.config
I assume I am doing something wrong, any help will be appreciated.
The Primary WSDL
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:i0="http://spikes/WcfCodeFirstExample/services/AnimalService" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" name="AnimalService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import namespace="http://spikes/WcfCodeFirstExample/services/AnimalService" location="" />
<wsdl:types />
<wsdl:service name="AnimalService">
<wsdl:port name="NetTCPBinding_IAnimalService" binding="i0:NetTCPBinding_IAnimalService">
<soap12:address location="net.tcp://localhost:10109/AnimalService.svc" />
<wsa10:EndpointReference>
<wsa10:Address>net.tcp://localhost:10109/AnimalService.svc</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
The Secondary WSDL (Referenced in First)
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:i0="Spike.Contracts.Services" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://spikes/WcfCodeFirstExample/services/AnimalService" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" targetNamespace="http://spikes/WcfCodeFirstExample/services/AnimalService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="NetTCPBinding_IAnimalService_policy">
<wsp:ExactlyOne>
<wsp:All>
<msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"></msb:BinaryEncoding>
<wsaw:UsingAddressing></wsaw:UsingAddressing>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:import namespace="Spike.Contracts.Services" location="" />
<wsdl:types />
<wsdl:binding name="NetTCPBinding_IAnimalService" type="i0:IAnimalService">
<wsp:PolicyReference URI="#NetTCPBinding_IAnimalService_policy"></wsp:PolicyReference>
<soap12:binding transport="http://schemas.microsoft.com/soap/tcp" />
<wsdl:operation name="GetAvailableAnimalTypes">
<soap12:operation soapAction="Spike.Contracts.Services/IAnimalService/GetAvailableAnimalTypes" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="AddPetAnimalType">
<soap12:operation soapAction="Spike.Contracts.Services/IAnimalService/AddPetAnimalType" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
Please keep in mind this is generated WSDL and XSD's not hand rolled. I tried with both a netTcpbinding and basicHttpBinding configuration. It very well might be that I am using SOAPUI incorrectly but if I try the sample WSDL (http://www.webservicex.com/CurrencyConvertor.asmx?wsdl) I do see the associated operations so I assume I am doing it right.
I am using SOAPUI 5.0.
Upvotes: 4
Views: 4767
Reputation: 93
In case anyone is still looking at this 6 yrs later like I was. In my case I had several WebMethod calls that showed but a new WebMethod would not show. Ran update several times & while SoapUI said that it updated 133 methods, the new method still didn't show.
For me the fix was to delete the existing definition and then add a new definition instead of updating the existing & then the new method showed in the new defintion. A simple solution but not sure why update didn't work.
Upvotes: 0
Reputation: 15313
I ran into this exact same issue and it turns out I was using WebHttpBinding
instead of BasicHttpBinding
. Once I switched to using BasicHttpBinding
all the operations/methods were showing up in SoapUI.
Upvotes: 1