Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Generating a WSDL for a .NET Web service

I am trying to generate a WSDL for a .NET Web service. When I append a '?WSDL' to the URL, I get the WSDL file in rpc/encoded. Can you suggest a way to get the WSDL file in the document/literal format that will allow me to access a Java application?

When you append "?WSLl" to the service endpoint URL, you retrieve the WSDL file that describes the actual service interface. Since it says it's rpc/encoded, then that's what you need to use to access the service. Both Java and .NET support rpc/encoded, so you should be able to generate your client using an rpc/encoded WSDL. (You may encounter interop issues, though, if you are using complex types.) If you want to convert the service to document/literal, then you need to regenerate the service. From your question, I can't quite figure out whether your service is implemented in .NET or Java, so I will give you guidance for both.

.NET generates document/literal by default. In order to create an rpc/encoded service in C#, you must explicitly specify the [SoapRpcMethod] annotation. Remove that annotation (but keep the [WebMethod] annotation), and it should produce a document/literal service.

Most Java Web services platforms generate rpc/encoded by default. If you're using a java2wsdl emitter tool, then there should be switch that you can use to indicate that you want to generate document/literal instead. For example, when using Apache Axis, you specify -y "WRAPPED", and it will generate a wrapped document/literal service (which is most compatible with .NET). If you're not generating your WSDL, but simply deploying your service, then you need to specify that you want the wrapped style in your deployment descriptor. For example, in Apache Axis you specify the wrapped style in the element in your WSDD:

<"deployment xmlns="http://xml.apache.org/axis/wsdd/"

xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="MyService"

provider="java:RPC"

style="wrapped"/>

</deployment>

Check your documentation to see how it's done with your platform.

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close