Re: Document Type WS


Andreas Sedlmeier
 

Hi Adam,

On Fri, Dec 20, 2019 at 01:12 PM, Jackson, Adam wrote:
Start element 'Import' from namespace 'http://tempuri.org/' expected. Found element 'soapenv:Envelope'
That error message makes it quite clear. Look into the parameters of your WS Lite operation and probably you''ll see one there, Type: xsd:Sting or "Blob".
We could telly you exactly when you share the WSDL which you did use to create that WS client.

I suppose you are fine if you write following to a Blob variable (Type: Unicode) and use that variable as a parameter:

<tem:Import>

         <tem:request>

            <mtp:Jobs>

               <mtp1:Job>

                  <mtp1:JobNumber>5</mtp1:JobNumber>

                  <mtp1:Weight>10.5</mtp1:Weight>

                  <mtp1:Cube>2.75</mtp1:Cube>

                  <mtp1:Duration>PT5M</mtp1:Duration>

                  <mtp1:Revenue>10</mtp1:Revenue>

                  <mtp1:JobTypes>type1</mtp1:JobTypes>

                  <mtp1:Skills>TL</mtp1:Skills>

                  <mtp1:CompanyName>TAP V3</mtp1:CompanyName>

                  <mtp1:CompanyPostcode>EH54 5NS</mtp1:CompanyPostcode>

                  <mtp1:CompanyAddressLine1>The Green Dragon Hotel</mtp1:CompanyAddressLine1>

                  <mtp1:CompanyAddressLine2></mtp1:CompanyAddressLine2>

                  <mtp1:CompanyCity>Hereford</mtp1:CompanyCity>

                  <mtp1:Notes>lorem ipsum</mtp1:Notes>

               </mtp1:Job>

            </mtp:Jobs>

            <mtp:UserName>mark.whelan@...</mtp:UserName>

         </tem:request>

      </tem:Import>

Now Magic will find what it expects at position 1: "
<tem:Import>" (and no longer "<soapenv:")
Your WS client operation will look similar to this one:



By coincidence I do work since yesterday on good old SOAP clients too for Dun & Bradstreet connectivity.
Im quite happy that I do not have to use Magic for this ^^. Magic & SOAP is a bit of a nightmare.

Try to get things work with SOAP UI first. And then think about using the code which it generates for you automatically.
Alternative: Use CURL or so do send your SOAP request to somewhere. That will result in far less issues.

Best regards,

Andreas


Join main@magicu-l.groups.io to automatically receive all group messages.