8 Replies Latest reply: Jul 30, 2008 7:26 AM by Peter551059 RSS

    [solved] can't assign xsi:nil=true

    592308
      I'm interfaceing with a web service which has defined its schema as using nillable elements. As such, I'd like to be able to set the xsi:nil="true" attribute during an Assignment Activity before invoking.

      I have tried these two options:

      (1)
      -------------------
      <assign>
      <copy>
      <from> </ns1:Zaak/ns1:Einddatum xsi:nil="true" /> </from>
      <to variable="MaakZaak_zaakcreatie_InputVariable" part="payload"
      query="/ns1:Zaak/ns1:Einddatum" />
      </copy>
      </assign>
      -------------------

      (2)
      -------------------
      <assign>
      <copy>
      <from expression="'true'"/>
      <to variable="MaakZaak_zaakcreatie_InputVariable" part="payload"
      query="/ns1:Zaak/ns1:Einddatum/@xsi:nil"/>
      </copy>
      </assign>
      -------------------

      When I deploy the first option and go on and test it, it can't find my instance?!

      When I try the second option it shows me the following error in the bpel console flow:
      <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns zero node.
      According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node.
      Please check the BPEL source at line number "159" and verify the <to> part xpath query.
      </summary>
      </part></selectionFailure>

      Please helpme out!

      Message was edited by:
      Roelofk
        • 1. Re: can't assign xsi:nil=true
          541452
          You need to define the namespaces too.
          An example of my bpel-code looks like that.

          <assign name="test">
          <copy>
          <from>
          <ns6:propertiesForChange xsi:nil="true"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:ns6="http://ipeng.technik.kabeldeutschland.de/interface/ccb/TransferAccount"/>
          </from>
          <to variable="keyValueList"
          part="payload"
          query="/ns6:TransferAccountProcessRequest/ns6:propertiesForChange"/>
          </copy>
          </assign>
          • 2. Re: can't assign xsi:nil=true
            592308
            Yes, they are both in my bpel document
            <process name="Vergunning" targetNamespace="http://xmlns.oracle.com/Vergunning"
            xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
            xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
            xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
            xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:client="http://xmlns.oracle.com/Vergunning"
            xmlns:ora="http://schemas.oracle.com/xpath/extension"
            xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
            xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
            xmlns:ns1="http://www.interaccess.nl/webplus/statuswfm_v2"
            xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
            xmlns:ns2="http://xmlns.oracle.com/Vergunning"
            xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
            xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
            • 3. Re: can't assign xsi:nil=true
              541452
              Yes, but you need to define the namespaces in your FROM XML-element you want to assign (see option 1 of your initial posting) too.
              • 4. Re: can't assign xsi:nil=true
                541452
                try this:

                <assign>
                <copy>
                <from><ns1:Einddatum xmlns:ns1="http://www.interaccess.nl/webplus/statuswfm_v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /></from>
                <to variable="MaakZaak_zaakcreatie_InputVariable" part="payload"
                query="/ns1:Zaak/ns1:Einddatum" />
                </copy>
                </assign>
                • 5. Re: can't assign xsi:nil=true
                  592308
                  ok i'm trying it now.
                  • 6. Re: can't assign xsi:nil=true
                    592308
                    I think it worked m8!

                    Thanx a lot. I have to straighten out some other errors I have first to be sure but this one seems to be gone.

                    You're the king!
                    • 7. Re: can't assign xsi:nil=true
                      Peter551059
                      <copy>
                      <from><ns2:dateSign xmlns:ns2="http://b2b.web.sk/wrappers/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" /></from>
                      <to variable="changeStatus_InputVariable" part="changeStatusElement" query="/ns2:changeStatusElement/dateSign"/>
                      </copy>

                      Where I do mistake?
                      Compile OK. But in assign I see: <dateSign xmlns=""/>
                      • 8. Re: can't assign xsi:nil=true
                        Peter551059
                        <copy>
                        <from>
                        <ns2:dateSign xmlns:ns2="http://b2b.web.sk/wrappers/"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:nil="true"/>
                        </from>
                        <to variable="changeStatus_InputVariable"
                        part="changeStatusElement"
                        query="/ns2:changeStatusElement/dateSign"/>
                        </copy>

                        I don't know, it work now.