Basic Profile 1.1

Discussion in 'ASP .Net Web Services' started by Nick Locke, Oct 28, 2006.

  1. Nick Locke

    Nick Locke Guest

    I have a web service with four operations in it - add/amend/delete/retrieve.
    Not surprisingly, add and amend require the same data; with delete and
    retrieve each requiring just a key field. Concepts of re-use tell me that
    my XSD should define the data once and the key field once, then in my WSDL I
    should use each definition twice. In other words, my types should get
    re-used in different WSDL messages.

    However, wsdl.exe complains, citing "R2710 - ....must result in wire
    signatures that are different.....". It's only a warning, but I am trying
    to get this right (not almost right). I have read up on why this happens
    and why it is in the standard.

    BUT is there a way out that does not mean defining identical types twice?

    Thanks, Nick.
     
    Nick Locke, Oct 28, 2006
    #1
    1. Advertising

  2. "Nick Locke" <> wrote in message
    news:...
    >I have a web service with four operations in it -
    >add/amend/delete/retrieve. Not surprisingly, add and amend require the same
    >data; with delete and retrieve each requiring just a key field. Concepts
    >of re-use tell me that my XSD should define the data once and the key field
    >once, then in my WSDL I should use each definition twice. In other words,
    >my types should get re-used in different WSDL messages.
    >
    > However, wsdl.exe complains, citing "R2710 - ....must result in wire
    > signatures that are different.....". It's only a warning, but I am trying
    > to get this right (not almost right). I have read up on why this happens
    > and why it is in the standard.
    >
    > BUT is there a way out that does not mean defining identical types twice?


    Are you wrapping the common type in a "message" type?

    <xsd:complexType name="Shared"> ... </xsd:complexType>
    <xsd:complexType name="AddMessage">
    <xsd:sequence>
    <xsd:element name="shared1" type="tns:Shared"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="AmendMessage">
    <xsd:sequence>
    <xsd:element name="shared2" type="tns:Shared"/>
    </xsd:sequence>
    </xsd:complexType>

    I believe you might get away without the wrappers if you simply named your
    elements differently, but I'm not sure. I'd have to see your schema.

    John
     
    John Saunders, Oct 28, 2006
    #2
    1. Advertising

  3. Nick Locke

    Nick Locke Guest

    Thanks John.

    Naming the elements differently does not work, I have already tried that.
    Wrapping the types was the pointer I needed.

    Cheers

    "John Saunders" <john.saunders at trizetto.com> wrote in message
    news:eI2hiAt%...
    > "Nick Locke" <> wrote in message
    > news:...
    >>I have a web service with four operations in it -
    >>add/amend/delete/retrieve. Not surprisingly, add and amend require the
    >>same data; with delete and retrieve each requiring just a key field.
    >>Concepts of re-use tell me that my XSD should define the data once and the
    >>key field once, then in my WSDL I should use each definition twice. In
    >>other words, my types should get re-used in different WSDL messages.
    >>
    >> However, wsdl.exe complains, citing "R2710 - ....must result in wire
    >> signatures that are different.....". It's only a warning, but I am
    >> trying to get this right (not almost right). I have read up on why this
    >> happens and why it is in the standard.
    >>
    >> BUT is there a way out that does not mean defining identical types twice?

    >
    > Are you wrapping the common type in a "message" type?
    >
    > <xsd:complexType name="Shared"> ... </xsd:complexType>
    > <xsd:complexType name="AddMessage">
    > <xsd:sequence>
    > <xsd:element name="shared1" type="tns:Shared"/>
    > </xsd:sequence>
    > </xsd:complexType>
    > <xsd:complexType name="AmendMessage">
    > <xsd:sequence>
    > <xsd:element name="shared2" type="tns:Shared"/>
    > </xsd:sequence>
    > </xsd:complexType>
    >
    > I believe you might get away without the wrappers if you simply named your
    > elements differently, but I'm not sure. I'd have to see your schema.
    >
    > John
    >
    >
     
    Nick Locke, Oct 29, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad
    Replies:
    1
    Views:
    1,152
    Roedy Green
    Jul 19, 2005
  2. Andy B
    Replies:
    0
    Views:
    537
    Andy B
    May 3, 2008
  3. Steven
    Replies:
    5
    Views:
    501
    Steven
    Oct 24, 2008
  4. Rasheed

    WS- I Basic Profile - Clarification

    Rasheed, Jul 26, 2006, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    148
    John Saunders
    Jul 29, 2006
  5. mehdi

    WSI Basic Profile 1.1 Compliant Web Service!

    mehdi, Dec 11, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    145
    mehdi
    Dec 11, 2006
Loading...

Share This Page