Qasem Elmogy

Dears ,
when i try to add web reference in Biztalk project2006 we can find ander localhost in web reference folder the wsdl file and disco file and references files,and under references files there are odx file and xsd file,
the problem is the xsd file doesn't appear butif i add another web refrence to another web service the xsd file appear
i don't understand what is the problem!!!
thanks .

My regards,
Mohamed Qasem




Re: BizTalk R2 General Web Reference

Saravana_Kumar_

If your webservice is using standard .net types like string, int etc as input output parameters then you won't see any .XSD files generated while adding the web reference.

On the other hand if you got some custom types like this

[WebMethod]

public Employee GetEmployeeDetail(Employee emp)

then you'll see xsd files being generated to support custom Employee object.

Regards,
Saravana Kumar
http://www.biztalk247.com/v1/
http://www.digitaldeposit.net/blog
[Please mark the response as "Answer" if it solves your problem.]





Re: BizTalk R2 General Web Reference

Mick Badran - MVP

Qasem,

*.XSD files are generated due to complex types within a WebMethod.

BTS already knows about .NET simple types such as strings, ints etc.

So the following:

(1) [WebMethod()] public string RunMe(string msg) {...}

will not give you an XSD due to the fact we're dealing with strings here.

(2) [WebMethod()] public Customer SearchForCustomer(CustomerQuery qry) {...}

public class Customer

{

public string Name;

public string Email;

}

public class CustomerQuery

{

public int ID;

...

}

#2 will give you an XSD.

Why do you get an XSD in the first place

basically if you go to your WS within the browser and bring up the classic 'test' pages - you'll see that to make a request you need a certain shaped block of XML. The XSD is all about allowing BTS to create a msg that when it gets serialised and sent over the wire, it is in the same shape.

Alot of the time, when we're using these WS from many different parts within the overall system, it's common to create .NET classes out of the derived XSD from the WS/Webmethod in question.

In BTS land we can also look to promote certain fields within the XSD for tracking, or using Content Based Routing on WS SOAP Ports etc. (pretty cool stuff really)






Re: BizTalk R2 General Web Reference

Qasem Elmogy

<< Why do you get an XSD in the first place

basically if you go to your WS within the browser and bring up the classic 'test' pages - you'll see that to make a request you need a certain shaped block of XML. The XSD is all about allowing BTS to create a msg that when it gets serialised and sent over the wire, it is in the same shape.

Alot of the time, when we're using these WS from many different parts within the overall system, it's common to create .NET classes out of the derived XSD from the WS/Webmethod in question.

In BTS land we can also look to promote certain fields within the XSD for tracking, or using Content Based Routing on WS SOAP Ports etc. (pretty cool stuff really)

>>

Thanks for your help Mr. Badran,

but i could'nt understand this part , the problem i have is i could'nt asign message type of web message when i added a web reference for a web service that contining a string and integer parameters to complete my orcestration process .

so, what can i do

thanks alot

My Best Regards,

Mohamed Qasem






Re: BizTalk R2 General Web Reference

Qasem Elmogy

Dear friends, please any help




Re: BizTalk R2 General Web Reference

Saravana_Kumar_

I guess you are missing something. I'll try to put a quick tutorial here

My webmethod definition

[WebMethod]

public string HelloWorld(string emp) {

return "Hello World";

}

In your BizTalk project.

1. Add Web reference to your .asmx file

2. In the orchestration view, right-click on "Message" and select "New Message". For "Message Type" property select "BizTalk_Server_Project1.localhost.Service_.HelloWorld_request" under "Web Message Types" (NOTE: Message name will vary based on your project name and webreference name)

3. Drag and drop a "Message Assignment" shape (it will automaically include a construct shape), assign the message you created in step 2, for Construct message shape. Inside your "Message Assignment" now you should be able to enter this statement

Message_1.emp = "SK";

--
Regards,
Saravana Kumar
http://www.biztalk247.com/v1/
http://www.digitaldeposit.net/blog
[Please mark the response as "Answer" if it solves your problem.]