Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Modifying service name and port name in WSDL

Reply
Thread Tools

Modifying service name and port name in WSDL

 
 
Wind
Guest
Posts: n/a
 
      04-01-2008
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">

<wsdlort binding="impl:TestSoapBinding" name="Test">

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

</wsdlort>

</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">

<wsdlort name="TestSoap" binding="tns:TestSoap">

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

</wsdlort>

</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

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

Many thanks

Wind




 
Reply With Quote
 
 
 
 
Tiago Halm
Guest
Posts: n/a
 
      04-01-2008
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

"Wind" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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">
>
> <wsdlort binding="impl:TestSoapBinding" name="Test">
>
> <wsdlsoap:address location=http://localhost:8080/Test/services/Test/>
>
> </wsdlort>
>
> </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">
>
> <wsdlort name="TestSoap" binding="tns:TestSoap">
>
> <soap:address location="http://localhost:8080/Test/services/Test.asmx" />
>
> </wsdlort>
>
> </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
>
> <wsdlort name="TestSoap" binding="tns:TestSoap"> as <wsdlort
> name="Test" binding="tns:Test"> ?
>
> Many thanks
>
> Wind
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
webservices, wsdl & xsd (schema-2-wsdl) Dark Java 1 11-14-2008 07:58 PM
wsdl.exe fails with WebMethods generated wsdl file mrnu ASP .Net Web Services 0 06-07-2004 04:51 PM
WSDL file produces useless class when imported with WSDL.exe RH ASP .Net Web Services 1 05-27-2004 09:40 PM
is the w3c's schema for wsdl and wsdl/soap binding possibly buggy ? _clb_ Chris Bedford XML 0 08-20-2003 11:52 PM
WSDL.EXE: WSDL Import Directive Stephen Edgecombe ASP .Net Web Services 0 08-13-2003 06:38 AM



Advertisments