Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2008

Tip: Looking for answers? Try searching our database.

Modifying service name and port name in WSDL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wind - 01 Apr 2008 10:27 GMT
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
Tiago Halm - 01 Apr 2008 23:52 GMT
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

> Hi All,
>
[quoted text clipped - 54 lines]
>
> Wind

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.