CMDBuild Forum

cmdbuild soap request for insert card operation along with security

Hi i am testing http://localhost:8080/cmdbuild-2.1.8/services/soap/Webservices?wsdl from soap ui.

trying to invoke insert card operation with body as

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://soap.services.cmdbuild.org">

   <soap:Header/>

   <soap:Body>

      <soap1:createCard>

         <!--Optional:-->

         <soap1:cardType>

            <!--Zero or more repetitions:-->

            <soap1:attributeList>

               <!--Optional:-->

               <soap1:code>123</soap1:code>

               <!--Optional:-->

               <soap1:name>test</soap1:name>

               <!--Optional:-->

               <soap1:value>1234</soap1:value>

            </soap1:attributeList>

            <!--Optional:-->

            <soap1:beginDate></soap1:beginDate>

            <!--Optional:-->

            <soap1:className>computer</soap1:className>

            <!--Optional:-->

            <soap1:endDate></soap1:endDate>

            <soap1:id>1</soap1:id>

            <!--Zero or more repetitions:-->

            <soap1:metadata>

               <!--Optional:-->

               <soap1:key>test</soap1:key>

               <!--Optional:-->

               <soap1:value>1234</soap1:value>

            </soap1:metadata>

            <!--Optional:-->

            <soap1:user>?</soap1:user>

         </soap1:cardType>

      </soap1:createCard>

   </soap:Body>

</soap:Envelope>

and passing username and password as admin.But getting error

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">

   <soap:Body>

      <soap:Fault>

         <soap:Code>

            <soap:Value>soap:Sender</soap:Value>

            <soap:Subcode>

               <soap:Value xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:InvalidSecurity</soap:Value>

            </soap:Subcode>

         </soap:Code>

         <soap:Reason>

            <soap:Text xml:lang="en">An error was discovered processing the &lt;wsse:Security> header</soap:Text>

         </soap:Reason>

      </soap:Fault>

   </soap:Body>

</soap:Envelope>

Can anybody help me out.Thanks

<soap:Text xml:lang="en">An error was discovered processing the &lt;wsse:Security> header</soap:Text>
 
The error message above states it clear, something is wrong with your soap envelope header.
Follow the CMDBuild Web Service manual, look up for some information about  "Web Services Security (WS-Security, WSS)" 
and as well about how does soap envelope according to WSS standards look like.
 
Previously raju wrote:

Hi i am testing http://localhost:8080/cmdbuild-2.1.8/services/soap/Webservices?wsdl from soap ui.

trying to invoke insert card operation with body as

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://soap.services.cmdbuild.org">

   <soap:Header/>

   <soap:Body>

      <soap1:createCard>

         <!--Optional:-->

         <soap1:cardType>

            <!--Zero or more repetitions:-->

            <soap1:attributeList>

               <!--Optional:-->

               <soap1:code>123</soap1:code>

               <!--Optional:-->

               <soap1:name>test</soap1:name>

               <!--Optional:-->

               <soap1:value>1234</soap1:value>

            </soap1:attributeList>

            <!--Optional:-->

            <soap1:beginDate></soap1:beginDate>

            <!--Optional:-->

            <soap1:className>computer</soap1:className>

            <!--Optional:-->

            <soap1:endDate></soap1:endDate>

            <soap1:id>1</soap1:id>

            <!--Zero or more repetitions:-->

            <soap1:metadata>

               <!--Optional:-->

               <soap1:key>test</soap1:key>

               <!--Optional:-->

               <soap1:value>1234</soap1:value>

            </soap1:metadata>

            <!--Optional:-->

            <soap1:user>?</soap1:user>

         </soap1:cardType>

      </soap1:createCard>

   </soap:Body>

</soap:Envelope>

and passing username and password as admin.But getting error

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">

   <soap:Body>

      <soap:Fault>

         <soap:Code>

            <soap:Value>soap:Sender</soap:Value>

            <soap:Subcode>

               <soap:Value xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:InvalidSecurity</soap:Value>

            </soap:Subcode>

         </soap:Code>

         <soap:Reason>

            <soap:Text xml:lang="en">An error was discovered processing the &lt;wsse:Security> header</soap:Text>

         </soap:Reason>

      </soap:Fault>

   </soap:Body>

</soap:Envelope>

Can anybody help me out.Thanks

 

Raju,
 
Did you ever get this to work?  I am trying the exact same thing using soap sonar and getting the exact same message.  Did you ever find out what to do?  If so, please send me an email or reply here.
 
Thanks,
Mike
 
mwhitlock@ercot.com
 
 
Previously raju wrote:

Hi i am testing http://localhost:8080/cmdbuild-2.1.8/services/soap/Webservices?wsdl from soap ui.

trying to invoke insert card operation with body as

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:soap1="http://soap.services.cmdbuild.org">

   <soap:Header/>

   <soap:Body>

      <soap1:createCard>

         <!--Optional:-->

         <soap1:cardType>

            <!--Zero or more repetitions:-->

            <soap1:attributeList>

               <!--Optional:-->

               <soap1:code>123</soap1:code>

               <!--Optional:-->

               <soap1:name>test</soap1:name>

               <!--Optional:-->

               <soap1:value>1234</soap1:value>

            </soap1:attributeList>

            <!--Optional:-->

            <soap1:beginDate></soap1:beginDate>

            <!--Optional:-->

            <soap1:className>computer</soap1:className>

            <!--Optional:-->

            <soap1:endDate></soap1:endDate>

            <soap1:id>1</soap1:id>

            <!--Zero or more repetitions:-->

            <soap1:metadata>

               <!--Optional:-->

               <soap1:key>test</soap1:key>

               <!--Optional:-->

               <soap1:value>1234</soap1:value>

            </soap1:metadata>

            <!--Optional:-->

            <soap1:user>?</soap1:user>

         </soap1:cardType>

      </soap1:createCard>

   </soap:Body>

</soap:Envelope>

and passing username and password as admin.But getting error

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">

   <soap:Body>

      <soap:Fault>

         <soap:Code>

            <soap:Value>soap:Sender</soap:Value>

            <soap:Subcode>

               <soap:Value xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:InvalidSecurity</soap:Value>

            </soap:Subcode>

         </soap:Code>

         <soap:Reason>

            <soap:Text xml:lang="en">An error was discovered processing the &lt;wsse:Security> header</soap:Text>

         </soap:Reason>

      </soap:Fault>

   </soap:Body>

</soap:Envelope>

Can anybody help me out.Thanks