Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Thu, 28 Feb 2008 13:45:23 -0600,    group: microsoft.public.dotnet.framework.aspnet.webservices        back       


Problem matching WSDL   
Hello,

I have a web service that I am writing that has to conform to the WSDL given 
to me by my integration partner.

There is a section in the schema that I am unable to duplicate. Here is the 
snip:

      <s:element name="SubmitTransactionResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" 
name="SubmitTransactionResult" type="tns:Transaction" />
            <s:element minOccurs="0" maxOccurs="1" name="objAuthentication" 
type="tns:Authentication" />
            <s:element minOccurs="0" maxOccurs="1" name="objTransaction" 
type="tns:Transaction" />
          </s:sequence>
        </s:complexType>
      </s:element>

It appears that my method "SubmitTransaction" is expected to respond with an 
unnamed complexType. If I make an object that has these three items as 
properties and return that, my WSDL looks like this:

      <s:element name="SubmitTransactionResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="Response" 
type="tns:Response" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:complexType name="Response">
        <s:sequence>
          <s:element minOccurs="0" maxOccurs="1" 
name="SubmitTransactionResult" type="tns:Transaction" />
          <s:element minOccurs="0" maxOccurs="1" name="objAuthentication" 
type="tns:Authentication" />
          <s:element minOccurs="0" maxOccurs="1" name="objTransaction" 
type="tns:Transaction" />
        </s:sequence>
      </s:complexType>

Clearly they do not match. How do I return this unnamed complexType?

Thanks,

Rob
date: Thu, 28 Feb 2008 13:45:23 -0600   author:   Rob Hill am

RE: Problem matching WSDL   
Hi Rob,

Based on my understanding, you may need to make the 
"SubmitTransactionResponse" element the root element of your webmethod's 
response message and all the sub properites as its child elements , 
correct?   

I think you may need to use the "SoapDocumentMethodAttribute" to decorate 
your webmethod and set the ParameterStyle (and some other attributes) to 
customize the webmethod message's formatting. Here is a simple example:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebService : System.Web.Services.WebService {

    public WebService () {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod()]
    [SoapDocumentMethod(ResponseElementName="SubmitTransactionResponse", 
ParameterStyle=SoapParameterStyle.Bare)]
    [return: XmlElement(ElementName="SubmitTransactionResponse")]
    public SubmitTransactionResponse HelloWorld()
    {
        SubmitTransactionResponse rep = new SubmitTransactionResponse();
        rep.SubmitTransactionResult = "result";
        rep.objAuthentication = "objA";
        rep.objTransaction = "objT";

        return rep;
    }
    
}

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

=========I changed the class to below for test========
public partial class SubmitTransactionResponse {
    
    private string submitTransactionResultField;
    
    private string objAuthenticationField;
    
    private string objTransactionField;
    
    /// <remarks/>
    public string SubmitTransactionResult {
        get {
            return this.submitTransactionResultField;
        }
        set {
            this.submitTransactionResultField = value;
        }
    }
    
    /// <remarks/>
    public string objAuthentication {
        get {
            return this.objAuthenticationField;
        }
        set {
            this.objAuthenticationField = value;
        }
    }
    
    /// <remarks/>
    public string objTransaction {
        get {
            return this.objTransactionField;
        }
        set {
            this.objTransactionField = value;
        }
    }
}

=========================

In addition, I suggest you have a look at the Contact-First concept in XML 
webservice which is recommended for building webservice based on given XML 
schema:

#Contract-First Service Development
http://msdn.microsoft.com/msdnmag/issues/05/05/ServiceStation/

#Techniques for Contract-First Development
http://msdn.microsoft.com/msdnmag/issues/05/06/ServiceStation/


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

 

==================================================

Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

 

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
 	

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Reply-To: "Rob Hill" <robh71@nospam.nospam>
>From: "Rob Hill" <robh71@nospam.nospam>
>Subject: Problem matching WSDL
>Date: Thu, 28 Feb 2008 13:45:23 -0600

>
>Hello,
>
>I have a web service that I am writing that has to conform to the WSDL 
given 
>to me by my integration partner.
>
>There is a section in the schema that I am unable to duplicate. Here is 
the 
>snip:
>
>      <s:element name="SubmitTransactionResponse">
>        <s:complexType>
>          <s:sequence>
>            <s:element minOccurs="0" maxOccurs="1" 
>name="SubmitTransactionResult" type="tns:Transaction" />
>            <s:element minOccurs="0" maxOccurs="1" 
name="objAuthentication" 
>type="tns:Authentication" />
>            <s:element minOccurs="0" maxOccurs="1" name="objTransaction" 
>type="tns:Transaction" />
>          </s:sequence>
>        </s:complexType>
>      </s:element>
>
>It appears that my method "SubmitTransaction" is expected to respond with 
an 
>unnamed complexType. If I make an object that has these three items as 
>properties and return that, my WSDL looks like this:
>
>      <s:element name="SubmitTransactionResponse">
>        <s:complexType>
>          <s:sequence>
>            <s:element minOccurs="0" maxOccurs="1" name="Response" 
>type="tns:Response" />
>          </s:sequence>
>        </s:complexType>
>      </s:element>
>      <s:complexType name="Response">
>        <s:sequence>
>          <s:element minOccurs="0" maxOccurs="1" 
>name="SubmitTransactionResult" type="tns:Transaction" />
>          <s:element minOccurs="0" maxOccurs="1" name="objAuthentication" 
>type="tns:Authentication" />
>          <s:element minOccurs="0" maxOccurs="1" name="objTransaction" 
>type="tns:Transaction" />
>        </s:sequence>
>      </s:complexType>
>
>Clearly they do not match. How do I return this unnamed complexType?
>
>Thanks,
>
>Rob 
>
>
>
date: Fri, 29 Feb 2008 06:48:08 GMT   author:   (Steven Cheng)

Re: Problem matching WSDL   
Steven,

I tried what you suggested and I get the same result. The return sequence is 
unnamed. That is what I don't know how to do.

Rob

""Steven Cheng""  wrote in message 
news:uCbGR8peIHA.7396@TK2MSFTNGHUB02.phx.gbl...
> Hi Rob,
>
> Based on my understanding, you may need to make the
> "SubmitTransactionResponse" element the root element of your webmethod's
> response message and all the sub properites as its child elements ,
> correct?
>
> I think you may need to use the "SoapDocumentMethodAttribute" to decorate
> your webmethod and set the ParameterStyle (and some other attributes) to
> customize the webmethod message's formatting. Here is a simple example:
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> [WebService(Namespace = "http://tempuri.org/")]
> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> public class WebService : System.Web.Services.WebService {
>
>    public WebService () {
>
>        //Uncomment the following line if using designed components
>        //InitializeComponent();
>    }
>
>    [WebMethod()]
>    [SoapDocumentMethod(ResponseElementName="SubmitTransactionResponse",
> ParameterStyle=SoapParameterStyle.Bare)]
>    [return: XmlElement(ElementName="SubmitTransactionResponse")]
>    public SubmitTransactionResponse HelloWorld()
>    {
>        SubmitTransactionResponse rep = new SubmitTransactionResponse();
>        rep.SubmitTransactionResult = "result";
>        rep.objAuthentication = "objA";
>        rep.objTransaction = "objT";
>
>        return rep;
>    }
>
> }
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> =========I changed the class to below for test========
> public partial class SubmitTransactionResponse {
>
>    private string submitTransactionResultField;
>
>    private string objAuthenticationField;
>
>    private string objTransactionField;
>
>    /// <remarks/>
>    public string SubmitTransactionResult {
>        get {
>            return this.submitTransactionResultField;
>        }
>        set {
>            this.submitTransactionResultField = value;
>        }
>    }
>
>    /// <remarks/>
>    public string objAuthentication {
>        get {
>            return this.objAuthenticationField;
>        }
>        set {
>            this.objAuthenticationField = value;
>        }
>    }
>
>    /// <remarks/>
>    public string objTransaction {
>        get {
>            return this.objTransactionField;
>        }
>        set {
>            this.objTransactionField = value;
>        }
>    }
> }
>
> =========================
>
> In addition, I suggest you have a look at the Contact-First concept in XML
> webservice which is recommended for building webservice based on given XML
> schema:
>
> #Contract-First Service Development
> http://msdn.microsoft.com/msdnmag/issues/05/05/ServiceStation/
>
> #Techniques for Contract-First Development
> http://msdn.microsoft.com/msdnmag/issues/05/06/ServiceStation/
>
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>
> ==================================================
>
>
> This posting is provided "AS IS" with no warranties, and confers no 
> rights.
>
> --------------------
>>Reply-To: "Rob Hill" <robh71@nospam.nospam>
>>From: "Rob Hill" <robh71@nospam.nospam>
>>Subject: Problem matching WSDL
>>Date: Thu, 28 Feb 2008 13:45:23 -0600
>
>>
>>Hello,
>>
>>I have a web service that I am writing that has to conform to the WSDL
> given
>>to me by my integration partner.
>>
>>There is a section in the schema that I am unable to duplicate. Here is
> the
>>snip:
>>
>>      <s:element name="SubmitTransactionResponse">
>>        <s:complexType>
>>          <s:sequence>
>>            <s:element minOccurs="0" maxOccurs="1"
>>name="SubmitTransactionResult" type="tns:Transaction" />
>>            <s:element minOccurs="0" maxOccurs="1"
> name="objAuthentication"
>>type="tns:Authentication" />
>>            <s:element minOccurs="0" maxOccurs="1" name="objTransaction"
>>type="tns:Transaction" />
>>          </s:sequence>
>>        </s:complexType>
>>      </s:element>
>>
>>It appears that my method "SubmitTransaction" is expected to respond with
> an
>>unnamed complexType. If I make an object that has these three items as
>>properties and return that, my WSDL looks like this:
>>
>>      <s:element name="SubmitTransactionResponse">
>>        <s:complexType>
>>          <s:sequence>
>>            <s:element minOccurs="0" maxOccurs="1" name="Response"
>>type="tns:Response" />
>>          </s:sequence>
>>        </s:complexType>
>>      </s:element>
>>      <s:complexType name="Response">
>>        <s:sequence>
>>          <s:element minOccurs="0" maxOccurs="1"
>>name="SubmitTransactionResult" type="tns:Transaction" />
>>          <s:element minOccurs="0" maxOccurs="1" name="objAuthentication"
>>type="tns:Authentication" />
>>          <s:element minOccurs="0" maxOccurs="1" name="objTransaction"
>>type="tns:Transaction" />
>>        </s:sequence>
>>      </s:complexType>
>>
>>Clearly they do not match. How do I return this unnamed complexType?
>>
>>Thanks,
>>
>>Rob
>>
>>
>>
>
date: Fri, 29 Feb 2008 21:19:05 -0600   author:   msnews.microsoft.com am

Re: Problem matching WSDL   
Thanks for your reply Rob,

I'm not quite sure about the "The return sequence is unnamed."

If possible, would you try define a very simple class(has some simple type 
members) and then give me a webservice/webmethod to demonstrate your 
scenario. Also, you can give me a copy of the expected request & response 
SOAP xml message so that I can get what's the result you want and perform 
some further test on my side.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
>References:  

>Subject: Re: Problem matching WSDL
>Date: Fri, 29 Feb 2008 21:19:05 -0600

>
>Steven,
>
>I tried what you suggested and I get the same result. The return sequence 
is 
>unnamed. That is what I don't know how to do.
>
>Rob
>
>""Steven Cheng""  wrote in message 
>news:uCbGR8peIHA.7396@TK2MSFTNGHUB02.phx.gbl...
>> Hi Rob,
>>
>> Based on my understanding, you may need to make the
>> "SubmitTransactionResponse" element the root element of your webmethod's
>> response message and all the sub properites as its child elements ,
>> correct?
>>
>> I think you may need to use the "SoapDocumentMethodAttribute" to decorate
>> your webmethod and set the ParameterStyle (and some other attributes) to
>> customize the webmethod message's formatting. Here is a simple example:
>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>
>> [WebService(Namespace = "http://tempuri.org/")]
>> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
>> public class WebService : System.Web.Services.WebService {
>>
>>    public WebService () {
>>
>>        //Uncomment the following line if using designed components
>>        //InitializeComponent();
>>    }
>>
>>    [WebMethod()]
>>    [SoapDocumentMethod(ResponseElementName="SubmitTransactionResponse",
>> ParameterStyle=SoapParameterStyle.Bare)]
>>    [return: XmlElement(ElementName="SubmitTransactionResponse")]
>>    public SubmitTransactionResponse HelloWorld()
>>    {
>>        SubmitTransactionResponse rep = new SubmitTransactionResponse();
>>        rep.SubmitTransactionResult = "result";
>>        rep.objAuthentication = "objA";
>>        rep.objTransaction = "objT";
>>
>>        return rep;
>>    }
>>
>> }
>>
>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>> =========I changed the class to below for test========
>> public partial class SubmitTransactionResponse {
>>
>>    private string submitTransactionResultField;
>>
>>    private string objAuthenticationField;
>>
>>    private string objTransactionField;
>>
>>    /// <remarks/>
>>    public string SubmitTransactionResult {
>>        get {
>>            return this.submitTransactionResultField;
>>        }
>>        set {
>>            this.submitTransactionResultField = value;
>>        }
>>    }
>>
>>    /// <remarks/>
>>    public string objAuthentication {
>>        get {
>>            return this.objAuthenticationField;
>>        }
>>        set {
>>            this.objAuthenticationField = value;
>>        }
>>    }
>>
>>    /// <remarks/>
>>    public string objTransaction {
>>        get {
>>            return this.objTransactionField;
>>        }
>>        set {
>>            this.objTransactionField = value;
>>        }
>>    }
>> }
>>
>> =========================
>>
>> In addition, I suggest you have a look at the Contact-First concept in 
XML
>> webservice which is recommended for building webservice based on given 
XML
>> schema:
>>
>> #Contract-First Service Development
>> http://msdn.microsoft.com/msdnmag/issues/05/05/ServiceStation/
>>
>> #Techniques for Contract-First Development
>> http://msdn.microsoft.com/msdnmag/issues/05/06/ServiceStation/
>>
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>>
>> ==================================================
>>
>> Get notification to my posts through email? Please refer to
>> 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
>>
>>
>> Note: The MSDN Managed Newsgroup support offering is for non-urgent 
issues
>> where an initial response from the community or a Microsoft Support
>> Engineer within 1 business day is acceptable. Please note that each 
follow
>> up response may take approximately 2 business days as the support
>> professional working with you may need further investigation to reach the
>> most efficient resolution. The offering is not appropriate for situations
>> that require urgent, real-time or phone-based interactions or complex
>> project analysis and dump analysis issues. Issues of this nature are best
>> handled working with a dedicated Microsoft Support Engineer by contacting
>> Microsoft Customer Support Services (CSS) at
>> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>>
>> ==================================================
>>
>>
>> This posting is provided "AS IS" with no warranties, and confers no 
>> rights.
>>
>> --------------------
>>>Reply-To: "Rob Hill" <robh71@nospam.nospam>
>>>From: "Rob Hill" <robh71@nospam.nospam>
>>>Subject: Problem matching WSDL
>>>Date: Thu, 28 Feb 2008 13:45:23 -0600
>>
>>>
>>>Hello,
>>>
>>>I have a web service that I am writing that has to conform to the WSDL
>> given
>>>to me by my integration partner.
>>>
>>>There is a section in the schema that I am unable to duplicate. Here is
>> the
>>>snip:
>>>
>>>      <s:element name="SubmitTransactionResponse">
>>>        <s:complexType>
>>>          <s:sequence>
>>>            <s:element minOccurs="0" maxOccurs="1"
>>>name="SubmitTransactionResult" type="tns:Transaction" />
>>>            <s:element minOccurs="0" maxOccurs="1"
>> name="objAuthentication"
>>>type="tns:Authentication" />
>>>            <s:element minOccurs="0" maxOccurs="1" name="objTransaction"
>>>type="tns:Transaction" />
>>>          </s:sequence>
>>>        </s:complexType>
>>>      </s:element>
>>>
>>>It appears that my method "SubmitTransaction" is expected to respond with
>> an
>>>unnamed complexType. If I make an object that has these three items as
>>>properties and return that, my WSDL looks like this:
>>>
>>>      <s:element name="SubmitTransactionResponse">
>>>        <s:complexType>
>>>          <s:sequence>
>>>            <s:element minOccurs="0" maxOccurs="1" name="Response"
>>>type="tns:Response" />
>>>          </s:sequence>
>>>        </s:complexType>
>>>      </s:element>
>>>      <s:complexType name="Response">
>>>        <s:sequence>
>>>          <s:element minOccurs="0" maxOccurs="1"
>>>name="SubmitTransactionResult" type="tns:Transaction" />
>>>          <s:element minOccurs="0" maxOccurs="1" name="objAuthentication"
>>>type="tns:Authentication" />
>>>          <s:element minOccurs="0" maxOccurs="1" name="objTransaction"
>>>type="tns:Transaction" />
>>>        </s:sequence>
>>>      </s:complexType>
>>>
>>>Clearly they do not match. How do I return this unnamed complexType?
>>>
>>>Thanks,
>>>
>>>Rob
>>>
>>>
>>>
>> 
>
>
>
date: Mon, 03 Mar 2008 07:02:07 GMT   author:   (Steven Cheng)

Re: Problem matching WSDL   
This is why I posted the WSDL.

Note that the WSDL has a complexType as a return value that is a sequence of 
3 items but yet the complexType tag does not have a name attribute. It's 
truly as if the web service is returning 3 values.



""Steven Cheng""  wrote in message 
news:JYUaLyPfIHA.360@TK2MSFTNGHUB02.phx.gbl...
> Thanks for your reply Rob,
>
> I'm not quite sure about the "The return sequence is unnamed."
>
> If possible, would you try define a very simple class(has some simple type
> members) and then give me a webservice/webmethod to demonstrate your
> scenario. Also, you can give me a copy of the expected request & response
> SOAP xml message so that I can get what's the result you want and perform
> some further test on my side.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no 
> rights.
>
>
>
>
>
> --------------------
>>References: 
> 
>>Subject: Re: Problem matching WSDL
>>Date: Fri, 29 Feb 2008 21:19:05 -0600
>
>>
>>Steven,
>>
>>I tried what you suggested and I get the same result. The return sequence
> is
>>unnamed. That is what I don't know how to do.
>>
>>Rob
>>
>>""Steven Cheng""  wrote in message
>>news:uCbGR8peIHA.7396@TK2MSFTNGHUB02.phx.gbl...
>>> Hi Rob,
>>>
>>> Based on my understanding, you may need to make the
>>> "SubmitTransactionResponse" element the root element of your webmethod's
>>> response message and all the sub properites as its child elements ,
>>> correct?
>>>
>>> I think you may need to use the "SoapDocumentMethodAttribute" to 
>>> decorate
>>> your webmethod and set the ParameterStyle (and some other attributes) to
>>> customize the webmethod message's formatting. Here is a simple example:
>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>
>>> [WebService(Namespace = "http://tempuri.org/")]
>>> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
>>> public class WebService : System.Web.Services.WebService {
>>>
>>>    public WebService () {
>>>
>>>        //Uncomment the following line if using designed components
>>>        //InitializeComponent();
>>>    }
>>>
>>>    [WebMethod()]
>>>    [SoapDocumentMethod(ResponseElementName="SubmitTransactionResponse",
>>> ParameterStyle=SoapParameterStyle.Bare)]
>>>    [return: XmlElement(ElementName="SubmitTransactionResponse")]
>>>    public SubmitTransactionResponse HelloWorld()
>>>    {
>>>        SubmitTransactionResponse rep = new SubmitTransactionResponse();
>>>        rep.SubmitTransactionResult = "result";
>>>        rep.objAuthentication = "objA";
>>>        rep.objTransaction = "objT";
>>>
>>>        return rep;
>>>    }
>>>
>>> }
>>>
>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>
>>> =========I changed the class to below for test========
>>> public partial class SubmitTransactionResponse {
>>>
>>>    private string submitTransactionResultField;
>>>
>>>    private string objAuthenticationField;
>>>
>>>    private string objTransactionField;
>>>
>>>    /// <remarks/>
>>>    public string SubmitTransactionResult {
>>>        get {
>>>            return this.submitTransactionResultField;
>>>        }
>>>        set {
>>>            this.submitTransactionResultField = value;
>>>        }
>>>    }
>>>
>>>    /// <remarks/>
>>>    public string objAuthentication {
>>>        get {
>>>            return this.objAuthenticationField;
>>>        }
>>>        set {
>>>            this.objAuthenticationField = value;
>>>        }
>>>    }
>>>
>>>    /// <remarks/>
>>>    public string objTransaction {
>>>        get {
>>>            return this.objTransactionField;
>>>        }
>>>        set {
>>>            this.objTransactionField = value;
>>>        }
>>>    }
>>> }
>>>
>>> =========================
>>>
>>> In addition, I suggest you have a look at the Contact-First concept in
> XML
>>> webservice which is recommended for building webservice based on given
> XML
>>> schema:
>>>
>>> #Contract-First Service Development
>>> http://msdn.microsoft.com/msdnmag/issues/05/05/ServiceStation/
>>>
>>> #Techniques for Contract-First Development
>>> http://msdn.microsoft.com/msdnmag/issues/05/06/ServiceStation/
>>>
>>>
>>> Sincerely,
>>>
>>> Steven Cheng
>>>
>>> Microsoft MSDN Online Support Lead
>>>
>>>
>>>
>>> ==================================================
>>>
>>> Get notification to my posts through email? Please refer to
>>>
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>>> ications.
>>>
>>>
>>>
>>> Note: The MSDN Managed Newsgroup support offering is for non-urgent
> issues
>>> where an initial response from the community or a Microsoft Support
>>> Engineer within 1 business day is acceptable. Please note that each
> follow
>>> up response may take approximately 2 business days as the support
>>> professional working with you may need further investigation to reach 
>>> the
>>> most efficient resolution. The offering is not appropriate for 
>>> situations
>>> that require urgent, real-time or phone-based interactions or complex
>>> project analysis and dump analysis issues. Issues of this nature are 
>>> best
>>> handled working with a dedicated Microsoft Support Engineer by 
>>> contacting
>>> Microsoft Customer Support Services (CSS) at
>>> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>>>
>>> ==================================================
>>>
>>>
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>> --------------------
>>>>Reply-To: "Rob Hill" <robh71@nospam.nospam>
>>>>From: "Rob Hill" <robh71@nospam.nospam>
>>>>Subject: Problem matching WSDL
>>>>Date: Thu, 28 Feb 2008 13:45:23 -0600
>>>
>>>>
>>>>Hello,
>>>>
>>>>I have a web service that I am writing that has to conform to the WSDL
>>> given
>>>>to me by my integration partner.
>>>>
>>>>There is a section in the schema that I am unable to duplicate. Here is
>>> the
>>>>snip:
>>>>
>>>>      <s:element name="SubmitTransactionResponse">
>>>>        <s:complexType>
>>>>          <s:sequence>
>>>>            <s:element minOccurs="0" maxOccurs="1"
>>>>name="SubmitTransactionResult" type="tns:Transaction" />
>>>>            <s:element minOccurs="0" maxOccurs="1"
>>> name="objAuthentication"
>>>>type="tns:Authentication" />
>>>>            <s:element minOccurs="0" maxOccurs="1" name="objTransaction"
>>>>type="tns:Transaction" />
>>>>          </s:sequence>
>>>>        </s:complexType>
>>>>      </s:element>
>>>>
>>>>It appears that my method "SubmitTransaction" is expected to respond 
>>>>with
>>> an
>>>>unnamed complexType. If I make an object that has these three items as
>>>>properties and return that, my WSDL looks like this:
>>>>
>>>>      <s:element name="SubmitTransactionResponse">
>>>>        <s:complexType>
>>>>          <s:sequence>
>>>>            <s:element minOccurs="0" maxOccurs="1" name="Response"
>>>>type="tns:Response" />
>>>>          </s:sequence>
>>>>        </s:complexType>
>>>>      </s:element>
>>>>      <s:complexType name="Response">
>>>>        <s:sequence>
>>>>          <s:element minOccurs="0" maxOccurs="1"
>>>>name="SubmitTransactionResult" type="tns:Transaction" />
>>>>          <s:element minOccurs="0" maxOccurs="1" 
>>>> name="objAuthentication"
>>>>type="tns:Authentication" />
>>>>          <s:element minOccurs="0" maxOccurs="1" name="objTransaction"
>>>>type="tns:Transaction" />
>>>>        </s:sequence>
>>>>      </s:complexType>
>>>>
>>>>Clearly they do not match. How do I return this unnamed complexType?
>>>>
>>>>Thanks,
>>>>
>>>>Rob
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
date: Mon, 3 Mar 2008 09:57:04 -0600   author:   Rob Hill am

Re: Problem matching WSDL   
Thanks for your reply Rob,

The original XML fragment you posted are the XML schema definition of the 
types(it is part of the WSDL document). I'm still not quite sure at which 
position(hierarchy) will the element display and how will your SOAP 
request/response look like.  

Would you give me a sample request/resposne soap message? For example, in 
ASP.NET Webservice, when you visit the asmx page in IE and click the 
"method name" link, it will display a page with some sample soap 
request/response messages (include messages for different protocol such as 
SOAP 1.1, SOAP 1.2,  HTTP POST ....). Here is an example(generated by 
ASP.NET webservice page):

=======================
POST /linqsite/WebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/HelloWorld"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body />
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SubmitTransactionResponse xmlns="http://tempuri.org/">
      <SubmitTransactionResult 
xmlns="http://tempuri.org/customcs.xsd">string</SubmitTransactionResult>
      <objAuthentication 
xmlns="http://tempuri.org/customcs.xsd">string</objAuthentication>
      <objTransaction 
xmlns="http://tempuri.org/customcs.xsd">string</objTransaction>
    </SubmitTransactionResponse>
  </soap:Body>
</soap:Envelope>
=========================

With such a sample request/response pair, it is fairly easy to get what the 
actual format you want.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 	

This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
>Subject: Re: Problem matching WSDL
>Date: Mon, 3 Mar 2008 09:57:04 -0600

>
>This is why I posted the WSDL.
>
>Note that the WSDL has a complexType as a return value that is a sequence 
of 
>3 items but yet the complexType tag does not have a name attribute. It's 
>truly as if the web service is returning 3 values.
>
>
>
>""Steven Cheng""  wrote in message 
>news:JYUaLyPfIHA.360@TK2MSFTNGHUB02.phx.gbl...
>> Thanks for your reply Rob,
>>
>> I'm not quite sure about the "The return sequence is unnamed."
>>
>> If possible, would you try define a very simple class(has some simple 
type
>> members) and then give me a webservice/webmethod to demonstrate your
>> scenario. Also, you can give me a copy of the expected request & response
>> SOAP xml message so that I can get what's the result you want and perform
>> some further test on my side.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> This posting is provided "AS IS" with no warranties, and confers no 
>> rights.
>>
>>
date: Wed, 05 Mar 2008 03:46:58 GMT   author:   (Steven Cheng)

Re: Problem matching WSDL   
Steven,

I figured it out.

My SubmitTransaction method changes to:

public Transaction SubmitTransaction(ref Authentication objAuthentication, 
ref  Transaction objTransaction)
{
...
}

The ref keyword causes the objects passed in to be sent back with the 
response.

Thanks for your help.

Rob


""Steven Cheng""  wrote in message 
news:9eFgVOnfIHA.4200@TK2MSFTNGHUB02.phx.gbl...
> Thanks for your reply Rob,
>
> The original XML fragment you posted are the XML schema definition of the
> types(it is part of the WSDL document). I'm still not quite sure at which
> position(hierarchy) will the element display and how will your SOAP
> request/response look like.
>
> Would you give me a sample request/resposne soap message? For example, in
> ASP.NET Webservice, when you visit the asmx page in IE and click the
> "method name" link, it will display a page with some sample soap
> request/response messages (include messages for different protocol such as
> SOAP 1.1, SOAP 1.2,  HTTP POST ....). Here is an example(generated by
> ASP.NET webservice page):
>
> =======================
> POST /linqsite/WebService.asmx HTTP/1.1
> Host: localhost
> Content-Type: text/xml; charset=utf-8
> Content-Length: length
> SOAPAction: "http://tempuri.org/HelloWorld"
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body />
> </soap:Envelope>
> HTTP/1.1 200 OK
> Content-Type: text/xml; charset=utf-8
> Content-Length: length
>
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>    <SubmitTransactionResponse xmlns="http://tempuri.org/">
>      <SubmitTransactionResult
> xmlns="http://tempuri.org/customcs.xsd">string</SubmitTransactionResult>
>      <objAuthentication
> xmlns="http://tempuri.org/customcs.xsd">string</objAuthentication>
>      <objTransaction
> xmlns="http://tempuri.org/customcs.xsd">string</objTransaction>
>    </SubmitTransactionResponse>
>  </soap:Body>
> </soap:Envelope>
> =========================
>
> With such a sample request/response pair, it is fairly easy to get what 
> the
> actual format you want.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no 
> rights.
>
>
>
>
> --------------------
>>Subject: Re: Problem matching WSDL
>>Date: Mon, 3 Mar 2008 09:57:04 -0600
>
>>
>>This is why I posted the WSDL.
>>
>>Note that the WSDL has a complexType as a return value that is a sequence
> of
>>3 items but yet the complexType tag does not have a name attribute. It's
>>truly as if the web service is returning 3 values.
>>
>>
>>
>>""Steven Cheng""  wrote in message
>>news:JYUaLyPfIHA.360@TK2MSFTNGHUB02.phx.gbl...
>>> Thanks for your reply Rob,
>>>
>>> I'm not quite sure about the "The return sequence is unnamed."
>>>
>>> If possible, would you try define a very simple class(has some simple
> type
>>> members) and then give me a webservice/webmethod to demonstrate your
>>> scenario. Also, you can give me a copy of the expected request & 
>>> response
>>> SOAP xml message so that I can get what's the result you want and 
>>> perform
>>> some further test on my side.
>>>
>>> Sincerely,
>>>
>>> Steven Cheng
>>>
>>> Microsoft MSDN Online Support Lead
>>>
>>>
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>>
>
date: Sun, 9 Mar 2008 13:58:28 -0500   author:   Rob Hill am

Re: Problem matching WSDL   
Thanks for your reply Rob,

Glad that you've figured out the problem.  Yes, "Ref" key word is not quite 
often used in webservice since by ref object will cause the webservice 
communication be more expensive.

Best regards,

Steven Cheng
Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and 
suggestions about how we 

can improve the support we provide to you. Please feel free to let my 
manager know what you think of 

the level of service provided. You can send feedback directly to my manager 
at: msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>Subject: Re: Problem matching WSDL
>Date: Sun, 9 Mar 2008 13:58:28 -0500

>
>Steven,
>
>I figured it out.
>
>My SubmitTransaction method changes to:
>
>public Transaction SubmitTransaction(ref Authentication objAuthentication, 
>ref  Transaction objTransaction)
>{
>...
>}
>
>The ref keyword causes the objects passed in to be sent back with the 
>response.
>
>Thanks for your help.
>
>Rob
>
>
>""Steven Cheng""  wrote in message 
>news:9eFgVOnfIHA.4200@TK2MSFTNGHUB02.phx.gbl...
>> Thanks for your reply Rob,
>>
>> The original XML fragment you posted are the XML schema definition of the
>> types(it is part of the WSDL document). I'm still not quite sure at which
>> position(hierarchy) will the element display and how will your SOAP
>> request/response look like.
>>
>> Would you give me a sample request/resposne soap message? For example, in
>> ASP.NET Webservice, when you visit the asmx page in IE and click the
>> "method name" link, it will display a page with some sample soap
>> request/response messages (include messages for different protocol such 
as
>> SOAP 1.1, SOAP 1.2,  HTTP POST ....). Here is an example(generated by
>> ASP.NET webservice page):
>>
>> =======================
>> POST /linqsite/WebService.asmx HTTP/1.1
>> Host: localhost
>> Content-Type: text/xml; charset=utf-8
>> Content-Length: length
>> SOAPAction: "http://tempuri.org/HelloWorld"
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>  <soap:Body />
>> </soap:Envelope>
>> HTTP/1.1 200 OK
>> Content-Type: text/xml; charset=utf-8
>> Content-Length: length
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>  <soap:Body>
>>    <SubmitTransactionResponse xmlns="http://tempuri.org/">
>>      <SubmitTransactionResult
>> xmlns="http://tempuri.org/customcs.xsd">string</SubmitTransactionResult>
>>      <objAuthentication
>> xmlns="http://tempuri.org/customcs.xsd">string</objAuthentication>
>>      <objTransaction
>> xmlns="http://tempuri.org/customcs.xsd">string</objTransaction>
>>    </SubmitTransactionResponse>
>>  </soap:Body>
>> </soap:Envelope>
>> =========================
>>
>> With such a sample request/response pair, it is fairly easy to get what 
>> the
>> actual format you want.
>>
>> Sincerely,
>>
>> Steven Cheng
>>
>> Microsoft MSDN Online Support Lead
>>
>>
>> This posting is provided "AS IS" with no warranties, and confers no 
>> rights.
>>
>>
>>
>>
>> --------------------
>>>Subject: Re: Problem matching WSDL
>>>Date: Mon, 3 Mar 2008 09:57:04 -0600
>>
>>>
>>>This is why I posted the WSDL.
>>>
>>>Note that the WSDL has a complexType as a return value that is a sequence
>> of
>>>3 items but yet the complexType tag does not have a name attribute. It's
>>>truly as if the web service is returning 3 values.
>>>
>>>
>>>
>>>""Steven Cheng""  wrote in message
>>>news:JYUaLyPfIHA.360@TK2MSFTNGHUB02.phx.gbl...
>>>> Thanks for your reply Rob,
>>>>
>>>> I'm not quite sure about the "The return sequence is unnamed."
>>>>
>>>> If possible, would you try define a very simple class(has some simple
>> type
>>>> members) and then give me a webservice/webmethod to demonstrate your
>>>> scenario. Also, you can give me a copy of the expected request & 
>>>> response
>>>> SOAP xml message so that I can get what's the result you want and 
>>>> perform
>>>> some further test on my side.
>>>>
>>>> Sincerely,
>>>>
>>>> Steven Cheng
>>>>
>>>> Microsoft MSDN Online Support Lead
>>>>
>>>>
>>>> This posting is provided "AS IS" with no warranties, and confers no
>>>> rights.
>>>>
>>>>
>> 
>
>
>
date: Mon, 10 Mar 2008 01:08:45 GMT   author:   (Steven Cheng)

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us