Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond
Join
Sign in
Search Options
Search Everything
Search BizTalk 2004
Home
AppFabric
BizTalk Server
Windows Azure
Windows Workflow
Jobs (Hire A Guru)
More ...
Home
»
BizTalk Server
»
BizTalk 2004
»
BizTalk 2004 Forum
»
Newbie: Simple webservice orchestration
Newbie: Simple webservice orchestration
BizTalk 2004
This group is for all content related to BizTalk Server 2004. This includes a forum, samples, videos, labs, whitepapers, and tools. Most of the content here also applies to other versions of BizTalk beyond 2004.
Get this RSS feed
Home
Forum
Files
Sitewide Application Navigation
Home
Blogs
Media
Forums
Wikis
Groups
Details
8
Replies
0
Subscribers
Posted
over 8 years ago
Options
Subscribe via RSS
Share this
BizTalk 2004 Forum
Newbie: Simple webservice orchestration
rated by 0 users
This post has
8 Replies |
0
Followers
Posted by
Anonymous
on
Wed, Oct 19 2005 11:55 AM
Newbie: Simple webservice orchestration
I'm trying to make a simple orchestration and deploying it as a webservice. The orchestration is actually now just relaying webservice calls, but I'm planning to incorporate other stuff later.
Process:
1a. A user of a client application hits the Add button and sends data to the BizTalk webservice.
1b. The orchestration calls the database' webservice method to store the information.
1c. The response is relayed back to the client application.
2a. Another application will later call another biztalk webservice method to fill in some additional information and update the record.
2b. The orchestration calls database' webservice method to update the information.
2c. The response is relayed back to the calling appliaction.
http://home.no.net/phpnet/bilder/orchestration.jpg
The data sent from the two client applications both have the same two fields uniqely identifying the record being added or updated. They are \"OrganizationNumber\" and \"Name\" both of type String.
So I want to add correlation between the messages from the two client application. I added correlation between 1b (initiating) and 2a (following)
As message types in all receive and send messages, I used the ones from the DatabaseWS like [databaseWS].Add_request, [databaseWS].Add_response, databaseWS.Update_response and databaseWS.Update_response. Maybe I should make local schemas and map between the two ?
Anyways. Is this kind of orchestration even possible ? Any ideas on how to make it work ? I've been struggling for some time. Facing problems with correlation.
=============================
Event Type: Error
Event Source: XLANG/s
Event Category: None
Event ID: 10034
Date: 19.10.2005
Time: 13:12:12
User: N/A
Computer: Computername
Description:
Uncaught exception terminated service com.domainname.project.portal.biztalk.RegisterOrchestration(2d35c649-1b3d-a4bf-2b6a-93867077b424), instance c24b00df-93b1-4855-a2f4-18f85acfb303
Failed to initialize the correlation property name: OrganizationNumber namespace: http://project.domainname.com/portal/biztalk/ from message: AddReq.
Exception type: CorrelationViolationException
Source: Microsoft.XLANGs.Engine
Target Site: Void InitializeFromMsg(Microsoft.XLANGs.BaseTypes.XLANGMessage, Microsoft.XLANGs.Core.XlangStore)
Help Link:
Additional error information:
A property cannot be associated with the type 'com.domainname.project.portal.schemas.OrganizationNumber'.
Exception type: InvalidPropertyTypeException
Source: Microsoft.XLANGs.Engine
Target Site: Microsoft.XLANGs.RuntimeTypes.MessagePropertyDefinition _getMessagePropertyDefinition(System.Type)
Help Link:
Additional error information:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
=============================
I was thinking of expanding the orchestration if I get i to work. The idea was that if process 2 isn't started before say 5 days after process 1 is finnished, a mail should be sent to the administrator, then looping back to waiting for the updatemessage.
Edit tags
Edit
Reply
Posted by
scolestock
on
Thu, Oct 20 2005 2:33 PM
Newbie: Simple webservice orchestration
A couple of thoughts -
1) Is correlation really necessary in this case? Is there state that needs to be preserved across the calls?
2) When you associated the correlation property with 'com.domainname.project.portal.schemas.OrganizationNumber' did everything seem to work? (Does this property occur just once in the schema? Is it of a datatype that biztalk is happy with? etc.)
Reply
Posted by
Anonymous
on
Fri, Oct 21 2005 9:12 PM
Newbie: Simple webservice orchestration
1) Thanks for your reply. Process 2 updates the record with some info that is not provided during process 1, hence giving two states. State1 record created but infoA is not yet provided. State2: record is created and infoA is provided. To have the 2 processes being handled by the same orchestration process (I think it's called a sequencial process or something simular) the second receive message needs to be correlated to the a send message of process 1.
2) I'll try creating the correlation again posting back the results. FYI: The correlation property is associated to the OrganizationNumber AND Name from the referenced webservice-schema.
Edit tags
Edit
Reply
Posted by
Anonymous
on
Sat, Oct 22 2005 2:54 PM
Newbie: Simple webservice orchestration
I've gone throug the creation of correaltion again. No error messages or compilation failures. OrganizationNumber is of type xs:string and should not be problem.
I'm starting to think it's the format of the schema that is autogenerated from the webservice that is the problem. You said something about the OrganizationNumber had to be unique in the schema. Well, the schema shows all the classes that are used throughout all the webservice-methods. I'm using only two of those web-methods. The class I'm using to correlate on, lets call it ClassA has an inherited ClassAExtended that of course also holds the OrganizationNumber. Could that be the problem ? In the Schema, it's looks like this.
<Schema>
ClassSomething
...
ClassSomethingElse
...
ClassA
____<Equivalent>
______<ClassAExtended>
_______<Sequence> (This one is grey and contains all the info of ClassA)
_______<Sequence>
__________AdditionalAttribute1
__________AdditionalAttribute2
______<ClassA>
_________<Sequence>
____________Name
____________OrganizationNumber
____________AnotherAttribute1
____________AnotherAttribute2
The XML look like this
...
<xs:complexType name=\"ClassA\">
<xs:sequence>
<xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Name\" type=\"xs:string\" />
<xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"OrganizationNumber\" type=\"xs:string\" />
...
</xs:sequence>
</xs:complexType>
...
- <xs:complexType name=\"ClassAExtended\">
- <xs:complexContent mixed=\"false\">
- <xs:extension base=\"tns:ClassA\">
- <xs:sequence>
<xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExtraAttribute\" type=\"tns:ExtraType\" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name=\"ExtraType\">
<xs:sequence>
<xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExtraAttribute1\" type=\"xs:string\" />
<xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ExtraAttribute2\" type=\"xs:string\" />
</xs:sequence>
</xs:complexType>
...
There is automatically generated Request and Response Message Types for all the webmethods. I have used these Message Types to define all my messages.
The messages I defined are
1. AddReq
2. AddRes
3. UpdateReq
4. UpdateRes
AddReq is used in 1a) and 1b)
AddRes is used in 1c)
UpdateReq is used in 2a) and 2b)
UpdateRes is used in 2c)
Another thought. Could there be a namespace problem ? The DatabaseWS has the namespace \"http://project.domain.com/portal/ws/\". The BizTalkWS is deployed with the namespace \"http://project.domain.com/portal/biztalk/\"
I'm really lost here, can anyone verify if this orchestration should even work, or maybe how You would constructed an orchestration based on the same functionality.
Edit tags
Edit
Reply
Posted by
scolestock
on
Wed, Oct 26 2005 3:20 PM
Newbie: Simple webservice orchestration
I haven't had a chance to digest your last post - but...once more on the issue of correlation. Do you really need to have the same instance of the orchestration handle the second request -- or does the information that comes with the second request give you all you need to update the database? (i.e. do you have the key you need, etc.?)
Just because the operations are logically grouped doesn't meet you actually need to use the same orchestration instance. Just checking, since complexity would be reduced for you.
Reply
Posted by
Anonymous
on
Wed, Oct 26 2005 5:05 PM
Newbie: Simple webservice orchestration
Do I need correlation ?
Yes, I beleive so. Process2 should not be allowed unless process1 has been run.
To the good news!
I finally got the first part of the orch to run. I'm running BTS 2004 SP1. I had not installed a M$ patch
BizTalk Server 2004 SP1 Update for .NET Framework 1.1 on Windows Server 2003, (KB890673).
http://www.microsoft.com/downloads/details.aspx?FamilyID=0FE6C10D-587C-4F7C-AC5C-3890C69A08D1&displaylang=en
This patch deals with a problem that occurs if you import schemas from assemblies that contain redundant imports. I beleive this is the reason it now started to work, though I'm not sure.
Bad thing:
Now I have a new problem. When initiating process2 I seem to get a routing problem...
First errormessage:
The Messaging Engine encountered an error committing a transport adapters batch containing the following work items: SOAP messages to be published, 0 request-response messages to be published, 1 messages to be suspended, 0 messages to be deleted from a host queue, 0 messages to be resubmitted for later transmission, 0 messages to be moved to their backup transport. Please refer to Health and Activity Tracking tool for more detailed information on this failure.
Second error message:
The \"SOAP\" adapter is suspending a message coming from Source URL:\"/project/com_domain_project_biztalk_RegisterOrchestration__ReceivePort.asmx\". Details:\"The message found multiple request response subscriptions. A message can only be routed to a single request response subscription. \".
Any clue ? The argument for both webservice methods are of same type, but that should not be a problem, should it ?
Edit tags
Edit
Reply
Posted by
scolestock
on
Wed, Oct 26 2005 5:28 PM
Newbie: Simple webservice orchestration
Hmm, I'd start by using the subscription viewer (prior to submitting your second request) to see what the state of your subscriptions are.
Reply
Posted by
Anonymous
on
Wed, Oct 26 2005 6:26 PM
Newbie: Simple webservice orchestration
Working on solution. I don't fully understand how to read the output from the subscription-viewer, but after posting a message in process1 I found this new row in the subscription-viewer. It seems correct. It show the two properties I have promoted, Name and OrganizationNumber. It also shows the next expected method to be run, namely Update.
http://home.no.net/phpnet/bilder/subscription_viewer.jpg
I read in this blog (Debugging Routing Failures)
http://blogs.msdn.com/biztalk_core_engine/archive/2004/12/18/325057.aspx
I figure after reading this, that there might be a problem that I actually put the correlation between 1b) and 2a), since 1b) send to a request/response service. What I'm testing now, is to make sure the correlation properties are returned in 1c, thereby changing the correlation to be between 1c) and 2a) instead. I'll post my results...
Any other Ideas on how to debug this problem ?
Edit tags
Edit
Reply
Posted by
Stephen W. Thomas
on
Thu, Oct 27 2005 6:28 AM
Newbie: Simple webservice orchestration
Sorry, I have not been following the full thread…
You might have already said this, but how are you initializing the Correlation? On the Send or the Receive? Make sure you are doing so on the Send Shape prior to the Receive.
Also, in the Subscription Viewer was the record you get this data from something link “XLANG\\” or like “Activate”?
Stephen W. Thomas
http://www.BizTalkGurus.com
Reply
Page 1 of 1 (9 items)