sql server web service & biztalk web reference

hi

I have simple sql endpoint:

create XML SCHEMA COLLECTION test AS
N'<?xml version="1.0"?>
<xsTongue Tiedchema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="res" type="xs:int">
</xs:element>
</xsTongue Tiedchema>
';

create PROCEDURE test @res xml(test)
AS
BEGIN
...
END

"Add Web Reference" wizard in biztalk project create request Multipart
message type:

<xs:complexType name="testType-res">
<xs:complexContent mixed="true">
<xs:extension
xmlns:q1="http://schemas.microsoft.com/sqlserver/2004/sqltypes" base="q1:xml"
/>
</xs:complexContent>
</xs:complexType>
<xs:element name="testType-res" nillable="true" type="tns:testType-res">
<xs:annotation>
<xs:appinfo>
<recordInfo rootTypeName="testTyperes"
xmlns="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
</xs:element>

I can't see my <xs:element name="res" type="xs:int"> from source sql endpoint.
And transform shape offer me only empty sequence that can't be mapped.

I else try to use custom sql endpoint wsdl generation by

EXEC
sp_http_generate_wsdl_defaultsimpleorcomplex
65554, FALSE, N'server01', N'wsdlsimple',
N'NativeWebServices';


and consuming that wsdl by "consume wcf servise" wizard. But result schema is:

<xsd:element name="test">
<xsd:complexType>
<xsdTongue Tiedequence>
<xsd:element minOccurs="1" maxOccurs="1" name="res" nillable="true">
<xsd:complexType mixed="true">
<xsdTongue Tiedequence>
<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />
</xsdTongue Tiedequence>
</xsd:complexType>
</xsd:element>
</xsdTongue Tiedequence>
</xsd:complexType>
</xsd:element>


Why "xsd:any"? Why not "xsd:int"?

How to add correct reference to the sql endpoint in biztalk project?
thanks.

[3345 byte] By [dmitryerkin] at [2008-1-5]
# 1

hi

problem solved.

scenario:

1. Generate custom wsdl for pipeline by

[sp_http_generate_wsdl_defaultsimpleorcomplex]
65554, FALSE, N'server01', N'wsdlcomplex',
N'NativeWebServices';

2.Replace

<xsd:any minOccurs="0" maxOccurs="unbounded" processContents="skip" />

with

<xsd:element ref="t:res" />

"t:" is the namespace alias for MSSQL xml datatype schema.

3.Generate messagetypes by "Consume WCF Service" wizard.

Now I can to operate with MSSQL stored procedire that has XMLDATATYPE parameter from orchestration through web service Smile

It a pity that biztalk can't to do it by default.

thanks

dmitryerkin at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 2
I also have problem with a using sql web service into the biz talk project.
I added the web reference to my BizTalk project and then I've got the
next files:
Reference.map
Reference.odx
<sql web service>.wsdl

But there is no any schema file like Reference.xsd.

I don't know why, and I need some help (some sample)

Zoryana at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 3

Hi guys,

the following blog post may be useful for you

http://www.digitaldeposit.net/blog/2007/05/biztalk-2006-wcf-basichttpbinding.html

kind regards

TM

etones at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 4

Thank you for the reply

I'd checked the points above and saw in the sql web service endpoint next items

1. SCHEMA=DEFAULT

2. NAMESPACE=N'http://tempUri.org/',

I am not a db developer and I dont know, maybe samething wrong is in this endpoint.

CREATEENDPOINT [BT_WebService_Endpoint]

AUTHORIZATION [computername\user]

STATE=STARTED

AS HTTP (PATH=N'/RS_EntryImport', PORTS =(CLEAR), AUTHENTICATION =(INTEGRATED), SITE=N'STREAMER', CLEAR_PORT = 80, COMPRESSION=DISABLED)

FOR SOAP (

WEBMETHOD 'ReportingItem_Insert'(NAME=N'[ReportingSystem].[dbo].[spd_ReportingItem_Insert]'

,SCHEMA=DEFAULT

, FORMAT=ROWSETS_ONLY), BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]', SESSIONS=DISABLED, SESSION_TIMEOUT=60,DATABASE=N'ReportingSystem', NAMESPACE=N'http://tempUri.org/',SCHEMA=STANDARD, CHARACTER_SET=XML)

Zoryana at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...
# 5

hi

may be I'm mistaken

but my experience is impossible to consume mssql web service in biztalk through web reference.

generating custom wsdl, changing this wsdl (described above) and consuming it as wcf service is the way to solve this problem.

thanks

dmitryerkin at 2007-10-3 > top of Msdn Tech,BizTalk Server,BizTalk R2 General...