RE: Web Services Publishing Wizard

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you take the same schema and run it through xsd.exe to produce classes
and then take the class and use it in an ASP.NET web service, the WSDL will
most likely contain sequence elements because the XSD to .NET to XSD
conversion is lossy. The behavior is not BizTalk specific; it just appears
that way because we use .NET classes to implement the schemas for published
SOAP web services.

A possible workaround would be to save the "incorrect" dynamically
generated WSDL, edit it so it is what you are looking for, and refer to the
updated static copy instead. However, since the incoming instance document
is loaded into .NET classes, the instance document may still be transformed
in undesirable ways. For example, value types like int in .NET must have a
value, but a type like xsd:int in XSD may be nillable. If such a value is
not specified in the XSD instance, .NET will introduce the value when the
..NET class representing the instance is serialized.

Another alternative might be to use the WSE adapter. It uses generic
Message types customized with schemas taken from the /xsd folder in the
published location. More information on this adapter can be found here:
http://www.microsoft.com/biztalk/evaluation/adapter/adapters/wse/default.msp
x

HTH,
Doug Girard [MSFT]

Note: This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
Thread-Topic: Web Services Publishing Wizard
thread-index: AcZC0eyc6tJZaF8/SHWuoqk58dYJxw==
X-WBNR-Posting-Host: 169.128.252.99
From: =?Utf-8?B?S2FyY2g=?= <Karch@xxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Web Services Publishing Wizard
Date: Wed, 8 Mar 2021 09:01:21 -0800
Lines: 41
Message-ID: <194B4B9E-A003-494E-B612-755BFEEB5781@xxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
Newsgroups: microsoft.public.biztalk.general
Path: TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.biztalk.general:35509
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
X-Tomcat-NG: microsoft.public.biztalk.general

When I run the BizTalk Web Services Publishing Wizard on a schema it
converts
the xs:all elements to s:sequence elements. We do not want to require an
order for the elements. Anyone know why BizTalk does this or a workaround?
Regards,
Karch

This is the original schema:

<xs:complexType name="SalesOrderResponse">
- <xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ReportName"
type="xs:string"
/>
<xs:element minOccurs="0" maxOccurs="1" name="Closed" type="xs:boolean"
/>
<xs:element minOccurs="0" maxOccurs="1" name="VersionNum"
type="xs:string"
/>
<xs:element minOccurs="0" maxOccurs="1" name="OrdNum" type="xs:string"
/>
<xs:element minOccurs="0" maxOccurs="1" name="OrdType" type="xs:int" />
<xs:element minOccurs="0" maxOccurs="1" name="CustCodeInv"
type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="DocType" type="xs:integer"
/>
</xs:all>
</xs:complexType>

After running the Web Service Wizard for BizTalk, this is the schema
generated from the Web Service:
<s:complexType name="SalesOrderResponse">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ReportName" type="s:string"
/>
<s:element minOccurs="0" maxOccurs="1" name="Closed" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="VersionNum" type="s:string"
/>
<s:element minOccurs="0" maxOccurs="1" name="OrdNum" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="OrdType" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="CustCodeInv"
type="s:string"
/>
<s:element minOccurs="0" maxOccurs="1" name="DocType" type="s:integer"
/>
</s:sequence>
</s:complexType>

It seems that <all> has been replaced with <sequence>. This forces the
incoming XML to have the elements <ReportName>,<Closed>,<VersionNum> etc
to
be in sequence rather than in any order.


.



Relevant Pages

  • Re: Consuming Web Service without Web Reference
    ... Eventhough I extracted schema from WSDL iam not able to call the web service. ... calling a web service than creating an xml and pushing it to the SOAP adapter. ... still have to generate a proxy and configure it in your send port. ...
    (microsoft.public.biztalk.general)
  • Re: returning strongly typed dataset from web service
    ... The proxy created by VS.NET is a proxy class to the web service class and ... exposes the web service class's web methods. ... now permits the typed datasets to be created in the proxy. ... System.Data.Design.TypedDataSetSchemaImporterExtension schema importer ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Mapping results of a web service
    ... Thanks for the response. ... web service is where I placed the transform shape. ... allowing me to select it as the source schema for the mapping. ...
    (microsoft.public.biztalk.general)
  • Re: returning strongly typed dataset from web service
    ... The typed-dataset is the class and the XSD is simply an XML representation ... The proxy created by VS.NET is a proxy class to the web service class and ... now permits the typed datasets to be created in the proxy. ... System.Data.Design.TypedDataSetSchemaImporterExtension schema importer ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: XmlValidatingReader - just the FAQS?
    ... XmlSchema schema = XmlSchema.Read, ... reason that the schema collection was disconnected was an oversight on my ... > The XML schema is fine, and your instance document is valid by it, ...
    (microsoft.public.dotnet.xml)