SharePoint Call Web Service

I'm using Nintex workflow to create an action that will create site columns and I must have the XML messed up because it keeps coming back with "Error returned from server: The remote server returned an error: (400) Bad Request."

This is what I have.

<method ID="1">
<Fields>
   <Field Type="Choice" Name="Test" DisplayName="Test" >
      <CHOICES>
         <CHOICE>Controled</CHOICE>
         <CHOICE>Personal</CHOICE>
         <CHOICE>Business</CHOICE>
      </CHOICES>
      <Default>Personal</Default>
   </Field>
</method>

Thanks,
Mark
exonedgeAsked:
Who is Participating?
 
jessc7Commented:
You might reference this post for an example SOAP message:

http://pinoytech.org/question/4465617/webs-updatecolumns-web-service

Note however they are updating, and not creating new site columns.
0
 
exonedgeAuthor Commented:
Found some issues with my XML. Fixed those and the error went away, but still not showing up in my site columns list.

<method ID="1">
<Fields>
   <Field Type="Choice" Name="Test" DisplayName="Test" >
      <CHOICES>
         <CHOICE>Controled</CHOICE>
         <CHOICE>Personal</CHOICE>
         <CHOICE>Business</CHOICE>
      </CHOICES>
      <Default>Personal</Default>
   </Field>
</Fields>

</method>
0
 
exonedgeAuthor Commented:
It wasn't straignt forward, but it helped me figure out what I needed. Thanks for the link and below is the XML that worked. I needed single quotes and <method> tag within the <Fields> tag
<Fields>
<Method ID="1">

   <Field Type='Choice' Name='Test' DisplayName='Test' Group='Reports'>
      <CHOICES>
         <CHOICE>Controled</CHOICE>
         <CHOICE>Personal</CHOICE>
         <CHOICE>Business</CHOICE>
      </CHOICES>
      <Default>Personal</Default>
   </Field>
</Method>
</Fields>
0
 
exonedgeAuthor Commented:
figured out based on link proved.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.