Loading ...
Sorry, an error occurred while loading the content.

Re: Help with Soap / XML

Expand Messages
  • Roger Beauregard
    Hi Jeff thanx for replying, sorry I have not yet replied back, but my other business needs took priority and I am just getting back to trying things out. The
    Message 1 of 2 , Aug 5, 2009
      Hi Jeff

      thanx for replying, sorry I have not yet replied back, but my other business needs took priority
      and I am just getting back to trying things out.

      The Following is pretty long and I would understand if you said sorry have a noce day.


      You wanted me to try a few things,

      1st I changed  to the following as you suggested
      SOAP::Data->name(SubParty=> "NOT VALUE"

      2nd the <PlexViewRequest Command="ent-ngfs-subscriber-v2"
      is stating its a PlexViewRequest Command and that command is
      ent-ngfs-subscriber-v2 so I believe that is closed?
      The Command looks closed in the Server Side XML

      I am still running in to problems, and I have been trying lots of different avenues
      I have been working with trying to get this to work.

      I will add my complete script for you're reference

      Basically the script logs in to the server its a API application that in turn sends the xml
      to an element,

      regardless if the the provsioin passes of fails the script loops thru the BASEID values 1100 to 1101
      so 2 times and that works fine, the looping works fine, login and logout work fine


       use SOAP::Lite +trace => debug;
       #use SOAP::Lite;
      $soap=  SOAP::Lite
              -> proxy("");
      $method = SOAP::Data->name('PlexViewRequest')->attr({Command=>'act-user'});

      @params = (

      $som=$soap->call( $method => @params );


      print "\t$SID\n";

      while ( $BASEAID <= "1101" ){
      $formatedBASEAID = sprintf("%04d", $BASEAID);
      @params_ent_ngfs_subscriber_v2 = (
      $method_ent_ngfs_subscriber_v2 = SOAP::Data->name('PlexViewRequest')->attr({Comm
      $som_ent_ngfs_subscriber_v2 = $soap->call($method_ent_ngfs_subscriber_v2 => @par

      $method2 = SOAP::Data->name('PlexViewRequest')->attr({Command=>'canc-user',Sessi
      @params2 = ();
      $som2=$soap->call( $method2 => @params2 );

      I execute the script and verify and look at the XML at the server looks like it should work,
      the XML is very comparable to a working example, that I am looking at and comparing with the customer supplied logs

      below is my server side xml. here is the xml for reference that is sent to the element that I am trying to provision

      I see the command, Subparty open and all the attributes open and close and at the end I see
         </SubParty> "CLOSE   </PlexViewRequest> "CLOSE  </soap:Body> "Close
      and the </soap:Envelope> "CLOSE"

      2009-08-05 20:26:18,526 [http-8080-Processor23] INFO PLXWSServlet - Got soap request:
      2009-08-05 20:26:18,529 [http-8080-Processor23] INFO Soap - <?xml version="1.0" encoding="UTF-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <PlexViewRequest Command="ent-ngfs-subscriber-v2" SessionId="admin_rtb2:439487158" SwitchName="afs5000">
          <DisplayName xsi:type="xsd:string">afs5000-1100</DisplayName>
          <Category xsi:type="xsd:string">RESIDENTIALSUBSCRIBER_R2</Category>
          <PartyId xsi:type="xsd:long">9785551100</PartyId>
          <PrimaryPUID xsi:type="xsd:long">+19785551100</PrimaryPUID>
          <PrimaryPUIDCPEProfileNumber xsi:type="xsd:int">22</PrimaryPUIDCPEProfileNumber>
          <PrimaryPUIDFlashable xsi:type="xsd:boolean">true</PrimaryPUIDFlashable>
          <AssocOtasRealm xsi:type="xsd:string">stas-stdn.fsimsgroup0-000.afs50.tssims1.slrnet.lucent.com</AssocOtasRealm>
          <CallLimit xsi:type="xsd:int">2</CallLimit>
          <ServiceSuspension xsi:type="xsd:boolean">false</ServiceSuspension>
          <MaxFwdHops xsi:type="xsd:int">10</MaxFwdHops>
          <CsdFlavor xsi:type="xsd:string">TAS_CSD_NONE</CsdFlavor>
          <SipErrorTableId xsi:type="xsd:int">0</SipErrorTableId>
          <TreatmentTableId xsi:type="xsd:int">0</TreatmentTableId>
          <IsGroupCPE xsi:type="xsd:boolean">false</IsGroupCPE>
          <Receive181Mode xsi:type="xsd:string">TAS_181_NONE</Receive181Mode>
          <CcNdcLength xsi:type="xsd:int">0</CcNdcLength>
          <MaxActiveCalls xsi:type="xsd:int">0</MaxActiveCalls>

      I get the following error back from the server logs from the elemennt

      2009-08-05 20:26:18,531 [http-8080-Processor23] INFO PLXWSServlet - Sending response:
      2009-08-05 20:26:18,531 [http-8080-Processor23] INFO Soap - <?xml version="1.0" encoding="UTF-8"?>
      <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
       <soap-env:Header />
        <PlexViewResponse Command="ent-ngfs-subscriber-v2" SwitchName="afs5000" Fsdb="fsdb0" RequestId="" SessionId="admin_rtb2:439487158" CongestionIndicator="false" Status="FAILURE" FailureReason="org.jdom.IllegalAddException: The attribute already has an existing parent &quot;DisplayName&quot;

      For reference there is a ent-ngfs-subparty-v2 command that I can get to work and provision
      the element, I have to make ent-ngfs-subscriber-v2 to work, subparty attribute
      can be used as a child to the parent of the subscriber "if this makes sence"

      Thanx for you're help



      Old Email Thread

      Couple of things are missing from your examples.

      Start your data structure with SOAP::Data->name, not value.

      Narrow down your problem and provide the smallest amount of code to reproduce it.

      What's returning that error?  

      Look at that code to see why.  Use your generated XML, to help debug that part on its own.
      You can validate your XML separately.

      Your XML example has the root as Request:

      <Request Command=....>

      However that's not closed:


      Lastly,  see:


      Start small, don't try to do everything all at once.  Start with the DisplayName element.
       Build the XML, ensure it's valid, and use it on the side that's producing the error to debug it.

      From: Roger Beauregard <rtb2@...>
      To: Soap Lite Yahoo Grp <soaplite@yahoogroups.com>
      Cc: rtb2@...
      Sent: Friday, July 24, 2009 3:10:02 PM
      Subject: [soaplite] Help with Soap / XML


      Hello Folks,


      I am new to the user group and very new using soap lite I am trying to set element attributes,

      and a sub-set of attributes to an element.


      I have had some success but have been wrestling with setting an attribute called

      a SubParty and the sub-set of attributes" below is the part of the script \

      that is being set via perl to call soap and XML attributes.


      I am currently performing the following


       SOAP::Data->value(SOAP:: Data->name('SubParty' =>
        SOAP::Data->name("DisplayName" =>"afs5000$formatedBA SEAID"),      

        SOAP::D= Data->name("PartyId" =3D>"978555$formatedBAS EAID"),
        SOAP::Data->name("Category" =3D>"RESIDENTIALSUBSCRI BER_R2"),
        SOAP::Data->name("PrimaryPUID" =3D>"+1978555$formatedB ASEAID"),
        SOAP::Data->name("PrimaryPUIDCP EProfileNumber" =3D>"22"),
        SOAP::Data->name("PrimaryPUIDFl ashable"= 3D>"true"),
        SOAP::Data->name("AssocOtasReal m"=3D>"stas-stdn.fsimsgro up.test.com" ),
        SOAP::Data->name("CallLimit" =3D>"2"),
        SOAP::Data->name("ServiceSuspen sion"=3D>"false"),
        SOAP::Data->name("MaxFwdHops" =3D>"10"),
        SOAP::Data->name("CsdFlavor" =3D>"TAS_CSD_NONE" ),
         SOAP::Data->name("SipErrorTable Id"=3D>"0"),




      once the element recieves the request I see the following exception


       "The Attribute already has an existing parent" $quot;DisplayName&quot;


      I have been thru a large amount of script changes to try and change the outcome

      with no luck :-(


      I watch the xml that is provided to the elenemt, it looks ok,

      but I must have something incorrect in my scripting.


      Here is the element provided XML


      <Request Command="ent- ngfs-subscriber- v2" SessionId="admin_ rtb2:146911856" SwitchName=" afs5000">


          <DisplayName xsi:type="xsd: string">afs50001101</DisplayName>

          <PartyId xsi:type="xsd: long">9785551101</PartyId>

          <Category xsi:type="xsd: string">RESIDENTIALSUBSCRIB ER_R2</Category>

          <PrimaryPUID xsi:type="xsd: long">+19785551101</PrimaryPUID>

          <PrimaryPUIDCPEProfi leNumber xsi:type="xsd: int">22</PrimaryPUIDCPEProf ileNumber>

          <PrimaryPUIDFlashabl e xsi:type="xsd: boolean">true</PrimaryPUIDFlashab le>

          <AssocOtasRealm xsi:type="xsd: string">stas-stdn.fsimsgrou p0-000.afs50. tssims1.slrnet. test.com</AssocOtasRealm>

          <CallLimit xsi:type="xsd: int">2</CallLimit>

          <ServiceSuspension xsi:type="xsd: boolean">false</ServiceSuspension>

          <MaxFwdHops xsi:type="xsd: int">10</MaxFwdHops>

          <CsdFlavor xsi:type="xsd: string">TAS_CSD_NONE</CsdFlavor>

          <SipErrorTableId xsi:type="xsd: int">0</SipErrorTableId>

          <TreatmentTableId xsi:type="xsd: int">0</TreatmentTableId>

          <IsGroupCPE xsi:type="xsd: boolean">false</IsGroupCPE>

          <Receive181Mode xsi:type="xsd: string">TAS_181_NONE</Receive181Mode>

          <CcNdcLength xsi:type="xsd: int">0</CcNdcLength>

          <MaxActiveCalls xsi:type="xsd: int">0</MaxActiveCalls>





      In addition this element has additional attributes to be set and those attributes
      have a sub-set of attributes
       SOAP::Data->name(AnonymousCallR ej=>
                     SOAP::Data->name("Activated" =>"true"),
                     SOAP::Data->name("PublicUID" =>"+1978555$formatedB ASEAID"),
                     SOAP::Data->name("Assigned" =>"true"),
                     SOAP::Data->name("PerPuid" =>"false")
      What I need to to do is transition from SubParty to the other Attribute AnonymousCallRej
      Once the setting of the SubParty is worked out and the Transition is Worked out I 
      have 15 additional Attributes to Set with there sub-set of attributes
      Please Help!!!

      Roger Beauregard
      Tewksbury Ma

      Roger Beauregard
      Tewksbury Ma

    Your message has been successfully submitted and would be delivered to recipients shortly.