Consuming web service - how to intiate call to webservice
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > Consuming web service - how to intiate call to webservice




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Consuming web service - how to intiate call to webservice  
Ian


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-17-04 10:50 PM

I have a webservice that exports xml.  There are two methods for
calling the same service: one that takes no parameters (returns all
records), another that takes a single int parameter (returns a
specific number of records).

First problem first.  I am trying send a request to the webservice
calling the service that take a single int parameter.  Any ideas?  I
have tried setting up a receive port to receive a message that has
schema with a single int for the message type.  Biztalk then
complained about setting up a correlation set.  So I set up a
correlation set for this single int, promoted it in the original
receive schema, and now I'm getting a message: "message data property
'xxxx' in correlation 'xxxx' does not exist in message 'xxxx'".  Any
ideas?

My second problem is that I need to send an empty message to the web
service that takes no parameters.

If there's a better way to do things, I'm all ears.

Thanks

Ian





[ Post a follow-up to this message ]



    RE: Consuming web service - how to intiate call to webservice  
Dirk


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-18-04 10:52 PM

> First problem first.  I am trying send a request to the webservice
> calling the service that take a single int parameter.  Any ideas?  I
> have tried setting up a receive port to receive a message that has
> schema with a single int for the message type.  Biztalk then

Please use a message assignment shape and set properties on the message
which has the type of your request.

e.g.:

MyMessage.MyInt = 2

Keep in mind that correlation on WebServices with simple types are not
supported (afaik). However if you have a synchronous ws-call correlation is
not nessecary...

> My second problem is that I need to send an empty message to the web
> service that takes no parameters.

From the Charles Young Blog:

"The answer of course, is very simple.  A Web Message Type is really a
Multi-part Message Type, and in this case the type defined a multipart
message with no parts!  BizTalk insists that Multi-part messages have at
least one part (designated the Body part), but will make an exception for We
b
Messages.  All that was needed was an empty Construct Message shape
configured to construct the message.   This would create the necessary
'empty' message which could then be used to invoke the WebMethod.  It took m
e
a second look before I realised where he was going wrong because, like him, 
I
had got used to writing expressions in Message Assignment shapes to
initialize messages.   In this case, however, the message needed only to be
constructed.  No initialisation is required."

Hope this helps...

Dirk







[ Post a follow-up to this message ]



    RE: Consuming web service - how to intiate call to webservice  
Vikas Nahata [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-23-04 10:50 PM

Also you need to use the Add web reference feature to add the webservice to
your project. Once you do that the webmessage types and webport type will
be created for you which you can use to send/receive data from the
webservice. If your webservice method is not explicitly marked as one way
then you do not need to initialize any correlation set as it is a solicit
response operation

The response below are correct.

--------------------
| >>Thread-Topic: Consuming web service - how to intiate call to webservice
| >>thread-index: AcSFPfWtOEZneEAxRh+B6I84DjSPDA==
| >>X-WBNR-Posting-Host: 149.244.249.1
| >>From: "examnotes" <Dirk@discussions.microsoft.com>
| >>References:  <9bfe85bd.0408170732.6470a76e@posting.google.com>
| >>Subject: RE: Consuming web service - how to intiate call to webservice
| >>Date: Wed, 18 Aug 2004 09:11:03 -0700
| >>Lines: 38
| >>Message-ID: <1F526917-DBA2-4D4E-8E81-FC12079799FB@microsoft.com>
| >>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.0
| >>Newsgroups: microsoft.public.biztalk.orchestration
| >>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| >>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| >>Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.orchestration:7735
| >>X-Tomcat-NG: microsoft.public.biztalk.orchestration
| >>
| >>> First problem first.  I am trying send a request to the webservice
| >>> calling the service that take a single int parameter.  Any ideas?  I
| >>> have tried setting up a receive port to receive a message that has
| >>> schema with a single int for the message type.  Biztalk then
| >>
| >>Please use a message assignment shape and set properties on the message
| >>which has the type of your request.
| >>
| >>e.g.:
| >>
| >>MyMessage.MyInt = 2
| >>
| >>Keep in mind that correlation on WebServices with simple types are not
| >>supported (afaik). However if you have a synchronous ws-call
correlation is
| >>not nessecary...
| >>
| >>> My second problem is that I need to send an empty message to the web
| >>> service that takes no parameters.
| >>
| >>From the Charles Young Blog:
| >>
| >>"The answer of course, is very simple.  A Web Message Type is really a
| >>Multi-part Message Type, and in this case the type defined a multipart
| >>message with no parts!  BizTalk insists that Multi-part messages have
at
| >>least one part (designated the Body part), but will make an exception
for Web
| >>Messages.  All that was needed was an empty Construct Message shape
| >>configured to construct the message.   This would create the necessary
| >>'empty' message which could then be used to invoke the WebMethod.  It
took me
| >>a second look before I realised where he was going wrong because, like
him, I
| >>had got used to writing expressions in Message Assignment shapes to
| >>initialize messages.   In this case, however, the message needed only
to be
| >>constructed.  No initialisation is required."
| >>
| >>Hope this helps...
| >>
| >>Dirk
| >>
| >>
| >>

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

EBusiness Server Team






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:16 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register