SOAP to Rest Array Issue

Category: azure logic apps


LangyAmps on Tue, 20 Mar 2018 15:34:19

I have created a custom connector that uses SOAP to REST and uploaded my WSDL. 

This service passes in a header ID and gets back the proposal header information as well as the line items. 

I’m trying to GetProposalID

It works great when there are 2 or more line items.  However, if the proposal has 1 or 0 lines, it fails saying BadRequest. Http request failed: the content was not a valid JSON.

Can you help?  I provided the WSDL info below.

<s:element name="GetProposalById">



            <s:element minOccurs="0" maxOccurs="1" name="appKey" type="s:string" />

            <s:element minOccurs="1" maxOccurs="1" name="proposalid" type="s:int" />




      <s:element name="GetProposalByIdResponse">



            <s:element minOccurs="0" maxOccurs="1" name="GetProposalByIdResult" type="tns:ProposalHeader" />




      <s:complexType name="ProposalHeader">

        <s:complexContent mixed="false">

         <s:extension base="tns:Opportunity">


              <s:element minOccurs="0" maxOccurs="1" name="reference" type="s:string" />

              <s:element minOccurs="1" maxOccurs="1" name="proposal_termsid" nillable="true" type="s:int" />

              <s:element minOccurs="0" maxOccurs="1" name="proposal_terms" type="s:string" />

              <s:element minOccurs="0" maxOccurs="1" name="reference_drawing_number" type="s:string" />

              <s:element minOccurs="1" maxOccurs="1" name="order_statusid" nillable="true" type="s:int" />

              <s:element minOccurs="0" maxOccurs="1" name="order_status" type="s:string" />

              <s:element minOccurs="1" maxOccurs="1" name="proposal_statusid" nillable="true" type="s:int" />

              <s:element minOccurs="0" maxOccurs="1" name="proposal_status" type="s:string" />

              <s:element minOccurs="0" maxOccurs="1" name="submitted" nillable="true" type="s:dateTime" />

              <s:element minOccurs="1" maxOccurs="1" name="active" nillable="true" type="s:boolean" />

              <s:element minOccurs="0" maxOccurs="1" name="proposal_url" type="s:string" />

              <s:element minOccurs="1" maxOccurs="1" name="markup_percentage" type="s:double" />

              <s:element minOccurs="1" maxOccurs="1" name="proposal_markup_discount_percentage" type="s:double" />

              <s:element minOccurs="1" maxOccurs="1" name="outside_agent_commission_percentage" type="s:double" />

              <s:element minOccurs="0" maxOccurs="1" name="items" type="tns:ArrayOfLineItem" />





      <s:complexType name="ArrayOfLineItem">


          <s:element minOccurs="0" maxOccurs="unbounded" name="LineItem" nillable="true" type="tns:LineItem" />



      <s:complexType name="LineItem">


          <s:element minOccurs="1" maxOccurs="1" name="product_id" nillable="true" type="s:int" />

          <s:element minOccurs="0" maxOccurs="1" name="product" type="s:string" />

          <s:element minOccurs="1" maxOccurs="1" name="quantity" type="s:int" />

          <s:element minOccurs="1" maxOccurs="1" name="total_price" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="discount_percentage" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="markup_percentage" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="discount_amount" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="adjusted_price" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="base_price_with_options" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="markup_discount_percentage" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="proposal_outside_agent_commission_percentage" type="s:double" />

          <s:element minOccurs="1" maxOccurs="1" name="adjusted_unit_price" type="s:double" />





Divya S on Fri, 23 Mar 2018 04:56:02

is this complete WSDL ? 

Mike Urnun (Azure) on Mon, 02 Apr 2018 22:50:24

Hey LangyAmps

It looks like it's been some time since you have posted this question here. Even though you didn't get a resolution here yet, were you able to get this issue resolved through different means/methods?

If so, would you kindly share the solution with us here so that others visiting this post can learn from it?

LangyAmps on Mon, 09 Apr 2018 21:12:31

Hi Mike,

I've got a case open with Microsoft on this.  I found out that it is working now as long as there is 1 line item on the proposal.  If there are none, it still fails.


LangyAmps on Mon, 09 Apr 2018 21:14:14

No Divya, there are some additional methods on that WSDL not relevant to the issue.  Are you looking for something else?  Update:  I found out that it is working now as long as there is 1 line item on the proposal.  If there are none, it still fails.

nuncatsji on Tue, 24 Jul 2018 09:17:15

Hi @LangyAmps ,

I'm facing the same issue in a project, do you have any fix from Microsoft or a work around?