Modifying service name and port name in WSDL


W

Wind

Hi All,

I need to conform a WSDL. The WSDL was generated in Axis. Our client has
generated their classes based on the given WSDL. Now the WSDL is as follows:

<wsdl:service name="TestService">

<wsdl:port binding="impl:TestSoapBinding" name="Test">

<wsdlsoap:address location=http://localhost:8080/Test/services/Test/>

</wsdl:port>

</wsdl:service>



I know the structure of the procedure and wrote the implementation. When I
generate the web service with .NET C#, the wsdl becomes as follows:

<wsdl:service name="Test">

<wsdl:port name="TestSoap" binding="tns:TestSoap">

<soap:address location="http://localhost:8080/Test/services/Test.asmx" />

</wsdl:port>

</wsdl:service>



If this is the case, our client gets the following error:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client

faultSubcode:

faultString: Server did not recognize the value of HTTP Header SOAPAction: .

faultActor:

faultNode:

faultDetail:

{http://xml.apache.org/axis/}stackTrace:Server did not recognize the value
of HTTP Header SOAPAction: .



How can I modify <wsdl:service name="Test"> as <wsdl:service
name="TestService"> and

<wsdl:port name="TestSoap" binding="tns:TestSoap"> as <wsdl:port name="Test"
binding="tns:Test"> ?

Many thanks

Wind
 
Ad

Advertisements

T

Tiago Halm

The port (interface) is the name exposed by the interface, so
[ServiceContract(Name = "foo")]
interface IMyContract
{}

The service name is the name of the class implementing the contracts, so
[ServiceBehavior(Name = "bar")]
class ServiceImpl : IMyContract
{}

I believe "foo" and "bar" are the names you want to costumize.
Let me know what you get

Tiago Halm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top