-122 Problem processing POST request: no Content-Type specified taskid=nul

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krusk
    Mini Mivite

    • Oct 2015
    • 29

    #1

    -122 Problem processing POST request: no Content-Type specified taskid=nul

    Hi all,

    I am trying to process the following mvt:call but getting an error. Any clues as to why it is failing?


    <mvt:assign name="l.xml" value="'<?xml version=\"1.0\" encoding=\"utf-8\"?>' $ asciichar(10)"/>
    <mvt:assign name="l.xml" value="l.xml $ '<OrderID>' $ l.settings:order:id $ '</OrderID>' $ asciichar(10)"/>
    <mvt:foreach iterator="item" array="order:groups">
    <mvt:assign name="l.xml" value="l.xml $ '<Item>' $ asciichar(10)"/>
    <mvt:assign name="l.xml" value="l.xml $ '<ItemID>' $ l.settings:item:code $ '</ItemID>' $ asciichar(10)"/>
    <mvt:assign name="l.xml" value="l.xml $ '</Item>' $ asciichar(10)"/>
    </mvt:foreach>

    <mvt:call action="'http://myvendorapi.net/orders'" method="'XML'" content-type="'text/xml'" fields="XML">
    <mvt:eval expr="s.callvalue" />
    </mvt:call>
  • Bruce - PhosphorMedia
    Developer Partner











    • Mar 2006
    • 11256

    #2
    Re: -122 Problem processing POST request: no Content-Type specified taskid=nul

    what is the specific error?

    also, probably not good to separate all these posts which essentially are about the same process...
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment

    • krusk
      Mini Mivite

      • Oct 2015
      • 29

      #3
      Re: -122 Problem processing POST request: no Content-Type specified taskid=nul

      Thanks Bruce on both points:

      122-Problem-processing-POST-request-no-Content-Type-specified-taskid-nul

      Originally posted by Bruce - PhosphorMedia View Post
      what is the specific error?

      also, probably not good to separate all these posts which essentially are about the same process...

      Comment

      • dcarver
        Director of Software Dev.




        • May 2013
        • 400

        #4
        Re: -122 Problem processing POST request: no Content-Type specified taskid=nul

        Originally posted by krusk View Post
        Hi all,

        I am trying to process the following mvt:call but getting an error. Any clues as to why it is failing?


        <mvt:assign name="l.xml" value="'<?xml version=\"1.0\" encoding=\"utf-8\"?>' $ asciichar(10)"/>
        <mvt:assign name="l.xml" value="l.xml $ '<OrderID>' $ l.settings:order:id $ '</OrderID>' $ asciichar(10)"/>
        <mvt:foreach iterator="item" array="order:groups">
        <mvt:assign name="l.xml" value="l.xml $ '<Item>' $ asciichar(10)"/>
        <mvt:assign name="l.xml" value="l.xml $ '<ItemID>' $ l.settings:item:code $ '</ItemID>' $ asciichar(10)"/>
        <mvt:assign name="l.xml" value="l.xml $ '</Item>' $ asciichar(10)"/>
        </mvt:foreach>

        <mvt:call action="'http://myvendorapi.net/orders'" method="'XML'" content-type="'text/xml'" fields="XML">
        <mvt:eval expr="s.callvalue" />
        </mvt:call>
        Hi krusk,

        The issue is you need to have the fields parameter value wrapped in single quotes, otherwise it evaluates the current l.xml value as the variable name which returns blank. You should also prefix the fields value with "l." for "l.xml" which will give an ever so slight performance increase.

        Let me know if you have any other questions.

        Thanks
        Last edited by dcarver; 12-01-15, 12:55 PM.
        David Carver
        Miva, Inc. | Software Developer

        Comment

        • krusk
          Mini Mivite

          • Oct 2015
          • 29

          #5
          Re: -122 Problem processing POST request: no Content-Type specified taskid=nul

          Thanks David!

          Comment

          Working...
          X