.svc to consume in biztalk

Home Page Forums BizTalk 2004 – BizTalk 2010 .svc to consume in biztalk

Viewing 1 reply thread
  • Author
    Posts
    • #20337

       Hi,

      I am given a webservice with .svc extension and I am supposed to pass some request to this webservice which would give me response which I am supposed to pass back to the caller.I tried using “add generated Items>consume WCF service, and I get some files like 2 .XML and 1 .ODX adn 1.XSD files.What am I supposed to after that.I am kind of lost…Please assist

    • #20340

       The XSD file is the schema that you need to send to the web service.  The ODX file is a blank orchestration containing a multi-part message type (containing a single part with the type of the XSD).  You don’t have to use this orchestration, but you can if you want to because it is good to wrap all your messages in multi-part messages (but not required to call the web service).  The 2 XML files are binding files (1 WCF-WSHttp and 1 WCF-Custom).  When you deploy your orchestration, import one of the binding files and it will create and configure the WCF send port for you.  I usually just use the WCF-WSHttp file and delete the custom file.  If you need more information, here is a walkthrough on consuming a service using the WCF-BasicHttp adapter:  http://msdn.microsoft.com/en-us/library/bb246019.aspx.  I think you are using the WCF-WSHttp adapter, but the setup is the same.

      • #20348

         Hi Gurus,

        I managed to use the .SVC file into my Orchestration and I am using Construct Message which inturn is using an expression shape.But when the msgs reaches the send port(WCF send port) I receive the following error msg.I imported the bindinginfo.xml at the appiication in the administration console.

        Event Type: Error
        Event Source: XLANG/s
        Event Category: None
        Event ID: 10024
        Date:  8/7/2008
        Time:  10:46:29 PM
        User:  N/A
        Computer: SCCUTL02-SDC
        Description:
        Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘Module_1.BizTalk_Orchestration1(bf3feb58-b47e-e0ee-8b1e-bec580b77e3d)’.
        The service instance will remain suspended until administratively resumed or terminated.
        If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
        InstanceId: 6fdbd194-f912-4da0-925a-69b286527c9b
        Shape name: Send_MTSWS_req
        ShapeId: 455d2c21-e892-4daf-97e6-7bb36cf90677
        Exception thrown from: segment 1, progress 12
        Inner exception: The value assigned to property ‘http://MeansTesting.PropertySchema.PropertySchema:MessageContent’ is not valid: ‘<MTQuery><PatientNRIC>S1234567D</PatientNRIC><PatientAddress><FloorNumber>123</FloorNumber><UnitNumber>06-81</UnitNumber><PostalCode>760123</PostalCode>
            </PatientAddress><Unborn>S</Unborn><CitizenshipStatus>P</CitizenshipStatus><DateOfValidity>2008-04-28</DateOfValidity><TierNumber>2</TierNumber><RetestIndicator>N</RetestIndicator><HealthcareFacility>1234567890</Healthc’.
               
        Exception type: InvalidPropertyValueException
        Source: Microsoft.XLANGs.BizTalk.Engine
        Target Site: Microsoft.BizTalk.Agent.Interop.IBTMessage PrepareMessage(Microsoft.XLANGs.BaseTypes.XLANGMessage, System.Collections.IList, System.Collections.IList)
        The following is a stack trace that identifies the location where the exception occured

           at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareMessage(XLANGMessage msg, IList promoteProps, IList toPromote)
           at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.WriteMessageState(IBTPEPInfoLookup pepLookup, Guid portId, XLANGMessage msg, Segment seg, String opname, String url, IList promoteProps, Boolean track, IList toPromote)
           at Microsoft.BizTalk.XLANGs.BTXEngine.BTXLogicalPortBinding.SendMessage(XLANGMessage msg, XlangStore store, Segment seg, OperationInfo op, IList additionalProps, IList toPromote, Boolean ignoreRoutingFailure)
           at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg, ActivityFlags flags)
           at Microsoft.XLANGs.Core.PortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg)
           at Module_1.BizTalk_Orchestration1.segment1(StopConditions stopOn)
           at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
        Additional error information:

                The property “MessageContent” has a value with length greater than 256 characters.
               
        Exception type: COMException
        Source:
        Target Site: Void Promote(System.String, System.String, System.Object)
        The following is a stack trace that identifies the location where the exception occured

           at Microsoft.BizTalk.Message.Interop.IBaseMessageContext_RawMapping.Promote(String strName, String strNameSpace, Object obj)
           at Microsoft.BizTalk.Message.Interop.MessageContext_ManagedViewOfNative.Promote(String strName, String strNameSpace, Object obj)
           at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.PrepareMessage(XLANGMessage msg, IList promoteProps, IList toPromote)

        For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

        Any Pointers?

        • #20349

          How are you constructing the message?  The error states that you have a promoted property named MessageContent, and that the value of the property is too long (greater than 256 characters).  Promoted properties must be 256 characters or less.

          • #20353

             Hi Russell,Yes I am having a promoted property and I have the increased the max length of this property to 4000 as I need to put in few fields(almost 12) from my Source to this field and then send out to an external system which I am consuming WCF webservice.So I thought this is the proper way of doing it.”Promoted Properties must be 256 characters or les” is this a rule?

            • #20354

              Hi Russell.

              I checked the limitations for promoting a field(http://msdn.microsoft.com/en-us/library/ms962790.aspx).Is there any way that I can achieve this still by using promoted property???or is there any other way to achieve this??Its a bit urgent.

              Cheers,Sri

              • #20356

                Can you give some more info on what you are tying to achieve with promoted properties?  You don’t need promoted properties to send data via WCF.  Sometimes you do need to use promoted properties to set SOAP header values, but typically the data is just in the body of the message.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.