473,786 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Modifying WSDL Response Element

I have a web service being consume by a new client. The WebMethod they are
calling is called Process.

So in the WSDL I have has 2 elements, Process and ProcessResponse .

<s:schema elementFormDefa ult="qualified"
targetNamespace ="http://www.test.com/">
<s:import namespace="http ://www.test.com/" />
<s:element name="Process">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:TPVRequ est" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessRe sponse">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Process Result" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>

My client wants the result of ProcessResponse , "ProcessRes ult" to be named
something else.

Inside my webservice how do I dictate what the result element is going to be
names?

I hope this makes sense to you guys :)

Thanks a lot in advance,

Mike
Nov 23 '05 #1
4 5583
You can save the generated wsdl, then change it accordingly, I would
recommend using XMLSpy or other WSDL authoring tool, then regenerate the
server stub using wsdl.exe /server, You'll have to disable the wsdl auto
generation, add "remove" the documentation in web.config

regards
erymuzuan mustapa

Mike wrote:
I have a web service being consume by a new client. The WebMethod they are
calling is called Process.

So in the WSDL I have has 2 elements, Process and ProcessResponse .

<s:schema elementFormDefa ult="qualified"
targetNamespace ="http://www.test.com/">
<s:import namespace="http ://www.test.com/" />
<s:element name="Process">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:TPVRequ est" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessRe sponse">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Process Result" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>

My client wants the result of ProcessResponse , "ProcessRes ult" to be named
something else.

Inside my webservice how do I dictate what the result element is going to be
names?

I hope this makes sense to you guys :)

Thanks a lot in advance,

Mike

Nov 23 '05 #2
you can do all of that. but it is not required.
There are attributes that you can attach to your existing Webmethod and
webservice.

example: this sets the element name and namespace of both the request and
response .

[SoapDocumentMet hod
("",
RequestElementN ame="RequestEle ment",
ResponseElement Name="ResponseE lement",
RequestNamespac e="urn:MyReques tNamespace"
ResponseNamespa ce= "urn:MyResponse Namespace",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]

check the msdn doc on the SoapDocumentMet hodAttribute
http://msdn.microsoft.com/library/en...classtopic.asp

-Dino

"erymuzuan" <er*******@yaho o.com> wrote in message
news:eX******** *****@TK2MSFTNG P15.phx.gbl...
You can save the generated wsdl, then change it accordingly, I would
recommend using XMLSpy or other WSDL authoring tool, then regenerate the
server stub using wsdl.exe /server, You'll have to disable the wsdl auto
generation, add "remove" the documentation in web.config

regards
erymuzuan mustapa

Mike wrote:
I have a web service being consume by a new client. The WebMethod they
are calling is called Process.

So in the WSDL I have has 2 elements, Process and ProcessResponse .

<s:schema elementFormDefa ult="qualified"
targetNamespace ="http://www.test.com/">
<s:import namespace="http ://www.test.com/" />
<s:element name="Process">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:TPVRequ est" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessRe sponse">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Process Result" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>

My client wants the result of ProcessResponse , "ProcessRes ult" to be
named something else.

Inside my webservice how do I dictate what the result element is going to
be names?

I hope this makes sense to you guys :)

Thanks a lot in advance,

Mike

Nov 23 '05 #3
My recommendation is using WSDL 1st approach. but this may be out of
reach to certain people especially beginners to Web Services. So working
this mickey mouse way may help them to understand the process of
creating a lasting and good web services. especially the relationship
between schemas, messages and port types.

regards
erymuzuan mustap

Dino Chiesa [Microsoft] wrote:
you can do all of that. but it is not required.
There are attributes that you can attach to your existing Webmethod and
webservice.

example: this sets the element name and namespace of both the request and
response .

[SoapDocumentMet hod
("",
RequestElementN ame="RequestEle ment",
ResponseElement Name="ResponseE lement",
RequestNamespac e="urn:MyReques tNamespace"
ResponseNamespa ce= "urn:MyResponse Namespace",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,
ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]

check the msdn doc on the SoapDocumentMet hodAttribute
http://msdn.microsoft.com/library/en...classtopic.asp

-Dino

"erymuzuan" <er*******@yaho o.com> wrote in message
news:eX******** *****@TK2MSFTNG P15.phx.gbl...
You can save the generated wsdl, then change it accordingly, I would
recommend using XMLSpy or other WSDL authoring tool, then regenerate the
server stub using wsdl.exe /server, You'll have to disable the wsdl auto
generation, add "remove" the documentation in web.config

regards
erymuzuan mustapa

Mike wrote:
I have a web service being consume by a new client. The WebMethod they
are calling is called Process.

So in the WSDL I have has 2 elements, Process and ProcessResponse .

<s:schema elementFormDefa ult="qualified"
targetNamesp ace="http://www.test.com/">
<s:import namespace="http ://www.test.com/" />
<s:element name="Process">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:TPVRequ est" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessRe sponse">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Process Result" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>

My client wants the result of ProcessResponse , "ProcessRes ult" to be
named something else.

Inside my webservice how do I dictate what the result element is going to
be names?

I hope this makes sense to you guys :)

Thanks a lot in advance,

Mike


Nov 23 '05 #4
Yes, I agree that "WSDL First" is preferred for interoperabilit y.
In this case, the SoapDocumentAtt ribute may be sufficient to do the job. We
are talking only about the response element here.

Either way works. The "WSDL First" approach is a bit of an uphill struggle
with the current set of tools. For example wsdl.exe /server generates an
abstract class. You might think to just inherit from this class and then
provide your concrete implementation, but this will not work, because the
..NET webservices runtime depends on the attributes being attached to the
class itself. The .NET runtime will not interrogate and utilize the
attributes on the generated class, if you inherit from it. So in effect you
must cut-and-paste all the attributes from the generated type into your
derived type. Or, alternatively, modify the generated file to remove the
"abstract" and provide implementations directly.

In short, you have to "fight the tools" in order to practice WSDL first,
today. So for this reason I recommend it for people who are comfortable
doing so, where interop is a key priority.

If it is just the substitution of one element name for another, then the use
of an inline attribute should be fine. And simpler.
-Dino

"erymuzuan" <er*******@yaho o.com> wrote in message
news:eM******** ******@tk2msftn gp13.phx.gbl...
My recommendation is using WSDL 1st approach. but this may be out of reach
to certain people especially beginners to Web Services. So working this
mickey mouse way may help them to understand the process of creating a
lasting and good web services. especially the relationship between
schemas, messages and port types.

regards
erymuzuan mustap

Dino Chiesa [Microsoft] wrote:
you can do all of that. but it is not required.
There are attributes that you can attach to your existing Webmethod and
webservice.

example: this sets the element name and namespace of both the request and
response .

[SoapDocumentMet hod
("",
RequestElementN ame="RequestEle ment",
ResponseElement Name="ResponseE lement",
RequestNamespac e="urn:MyReques tNamespace"
ResponseNamespa ce= "urn:MyResponse Namespace",
Use=System.Web. Services.Descri ption.SoapBindi ngUse.Literal,

ParameterStyle= System.Web.Serv ices.Protocols. SoapParameterSt yle.Wrapped)]

check the msdn doc on the SoapDocumentMet hodAttribute
http://msdn.microsoft.com/library/en...classtopic.asp

-Dino

"erymuzuan" <er*******@yaho o.com> wrote in message
news:eX******** *****@TK2MSFTNG P15.phx.gbl...
You can save the generated wsdl, then change it accordingly, I would
recommend using XMLSpy or other WSDL authoring tool, then regenerate the
server stub using wsdl.exe /server, You'll have to disable the wsdl auto
generation , add "remove" the documentation in web.config

regards
erymuzuan mustapa

Mike wrote:

I have a web service being consume by a new client. The WebMethod they
are calling is called Process.

So in the WSDL I have has 2 elements, Process and ProcessResponse .

<s:schema elementFormDefa ult="qualified"
targetNames pace="http://www.test.com/">
<s:import namespace="http ://www.test.com/" />
<s:element name="Process">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:TPVRequ est" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ProcessRe sponse">
<s:complexTyp e>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="s1:Process Result" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>

My client wants the result of ProcessResponse , "ProcessRes ult" to be
named something else.

Inside my webservice how do I dictate what the result element is going
to be names?

I hope this makes sense to you guys :)

Thanks a lot in advance,

Mike



Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1946
by: Kristofer Andersson | last post by:
I have a service that returns XML in this format under the soap body: <AVAILABILITYReply> <wrappernode> <childnode></childnode> <childnode></childnode> <childnode></childnode> </wrappernode> </AVAILABILITYReply>
5
10337
by: Mike Logan | last post by:
I used WSDL.exe to generate a client side web proxy for a web service, called the web service, got the results but an array returned by the web service is not in the results. However if I use "Add Web Reference" for the same service the same function works appropriately. Here is the client proxy generated from WSDL.exe <System.Web.Services.Protocols.SoapDocumentMethodAttribute("capeconnect:AppSec:AppSecPortType#getApplicationUsers",
13
3436
by: ScottM | last post by:
I have run into a problem generating the class file via the WSDL utility. I have a WSDL file that was generated by XMLSpy and is able to be read by the Java code utility, but I get the following error from the WSDL utility. Error: Unable to import binding 'REMSOAPHttpsBinding' from namespace 'http://www.fnfis.com/services/Services-Common/REM/20040109/v1.0'. - The operation 'REMCorporationBPOOrder' on portType 'REMInterface' from...
0
2146
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService" targetNamespace="http://swaMaragatoNS" xmlns:tns="http://swaMaragatoNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
3
11695
by: jparulan | last post by:
Hi All, I'm using SOAP3.0. I was able to successfully call a WSDL file and get a value properly. But when the WSDL changed to have a MULTIPLE <element name> it was failing. This code works BEFORE: strCurrency = oSOAP.eServeSearch(CSTR(Request.Form("T1"))) until the WSDL file changed to have more <element name> T1 is just a field that accepts a STRING
3
9436
by: Siva | last post by:
Hi all, I want to Convert a WSDL to a SOAP message. Is there any way to do this. I am using .NET 2.0 Thanks in Advance Siva
2
4120
by: Grzegorz Smith | last post by:
Hi all. I have problem with ZSI and WSDL schema.I generate from WSDL by wsdl2py client method for webservice. I made soap call and something goes wrong. Doeas anyone know hot to create some server code by ZSI from WSDL?? I just suspectes that my return data from webservice is in incorrect envelope -so maybe wsdl2py can help mi generate correct server method, or just generate correct structure that webservice should return. Thanks for any...
5
4980
by: Nick K. | last post by:
I use wsdl.exe to generate client code to call a web service. The actual web service is generated with the BizTalk Web Services Publishing Wizard. I'm not sure this is particular to the BizTalk code but the calls to web methods pass parameters by ref so that I have to call it like: XmlDocument doc = new XmlDocument(); doc.LoadXml(message);
3
5005
by: axel_johard | last post by:
Hi, need some help with creating a WSDL file. I will try to summarize the problem like this: I need to create a wsdl that accepts a response that has no namespace- prefix in the first line in the body, like this: "...<soap:Body><UpdateCustomerDetailsResponse xmlns="AMI">..." I have tried setting the schema-element like <s:schema elementFormDefault="unqualified" targetNamespace="AMI"and since this
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.